Skip to content

XFA - Add a lexer/parser for FormCalc language #12936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2021

Conversation

calixteman
Copy link
Contributor

@calixteman
Copy link
Contributor Author

For the scripting stuff, an idea is to generate some javascript from the generated AST and then execute it in the js sandbox.
It's the way chose by pdfium:
https://pdfium.googlesource.com/pdfium/+/refs/heads/master/xfa/fxfa/fm2js/cxfa_fmexpression.cpp

@benbro
Copy link
Contributor

benbro commented Feb 3, 2021

Will it be possible to disable scripting?

@timvandermeij
Copy link
Contributor

It's a preference now and it's disabled by default. There are no plans to remove this preference because scripting is a feature that we can imagine that people want to disable.

This question is unrelated to this PR though, so let's leave it at this.

 - the language specifications are: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.364.2157&rep=rep1&type=pdf#page=1049
 - it can be used to:
   * as a scripting language for calculation, validations, ...
   * in SOM expressions to select nodes: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.364.2157&rep=rep1&type=pdf#page=101
@brendandahl
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @brendandahl received. Current queue size: 0

Live output at: http://3.101.106.178:8877/5b6379c693a60ad/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_test from @brendandahl received. Current queue size: 0

Live output at: http://54.67.70.0:8877/1e9165aee5b0f01/output.txt

Copy link
Contributor

@brendandahl brendandahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+ with tests passing

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/1e9165aee5b0f01/output.txt

Total script time: 23.82 mins

  • Font tests: Passed
  • Unit tests: FAILED
  • Integration Tests: Passed
  • Regression tests: FAILED

Image differences available at: http://54.67.70.0:8877/1e9165aee5b0f01/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://3.101.106.178:8877/5b6379c693a60ad/output.txt

Total script time: 29.34 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED

Image differences available at: http://3.101.106.178:8877/5b6379c693a60ad/reftest-analyzer.html#web=eq.log

@calixteman calixteman merged commit b5be515 into mozilla:master Feb 17, 2021
@nmtigor nmtigor mentioned this pull request Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants