Commit Graph

7 Commits

Author SHA1 Message Date
Lephe 32fbcf143a
more atomic committing
* Proper coordinate rounding, as in Arond()
* Forgotten EOL now consumed if found (still optional)
* Convert unit tests images to 1-bit before comparing
* Much better unit testing script
* Add 17 test scripts from the 2019 TI-Planet and Planète Casio contest
  which consisted in reproducing an image with minimum code
2019-10-26 13:51:54 +02:00
Lephe ff6013b603
parser: allow semicolons to finish arguments early
Similarly to how parentheses are omitted at the end of commands, this
change allows them to be omitted at the end of function arguments.
Notice however than this omission is *ambiguous* when the parser does
not know in advance the number of arguments.

  GCD(Ent(x;y -> GCD(Ent(x;y))
              -> GCD(Ent(x);y)

The fx-92 SC+ parser knows the number of arguments for each function,
and will use the second interpretation, because Ent() has one argument
and GCD() has two. This interpreter, however, uses a generic extensible
construction for function calls and cannot decide on this ground. The
current interpretation is the first.
2019-10-26 09:55:59 +02:00
Lephe f1cc4ace40
update atomically (like a bomb)
* Fix angle units for reverse trigonometric functions
* Add a streaming option to capture the output in real-time as a series
  of bitmap images
* Switch to Decimal due to the non-continuity of Ent() breaking
  assumptions about the fidelity of floats. Trigonometry functions are
  still computed as floats.
* Fix the line rendering algorithm for edge cases and add a new test
  line-positive.txt that ensures basic patterns are all correct.
* Use custom rules to generate text representation of decimal numbers as
  to better match the output of the fx-92.
* Improve the test constants.txt to better evaluate this representation.
  The interpreter automatically checks that the representation matches
  the value and fails on error to avoid scratching heads.
* Fix EQUAL not being treated as a relational symbol.
2019-10-25 13:38:10 +02:00
Lephe 053c1ebfaf
add exponentation in the bitcode lexer 2019-10-08 22:32:27 +02:00
Lephe 14846e56ae
add functions with multiple parameters 2019-10-08 21:20:08 +02:00
Lephe 9bf03c52be
allow <sign><function> atoms 2019-10-06 10:57:58 +02:00
Lephe 69b5b52fdd
structural update: move files to a subfolder
Also update the documentation of supported tokens and features for more
clarity.
2019-10-06 01:34:42 +02:00
Renamed from parser.py (Browse further)