Skip to content

v2.0.0 – Pratt parser, exponentiation, grouping, HELP and CLEAR

Latest

Choose a tag to compare

@davisroman456 davisroman456 released this 21 Nov 07:25
e02ae98

What's new

  • Pratt parser: replaces the recursive descent expression parser
  • Exponentiation: ^, right-associative (2^3^2 is 2^(3^2))
  • Grouping: () and [], each opener must close with its own kind
  • Keywords: HELP and CLEAR, and PRINT, HELP, CLEAR, QUIT are now reserved words
  • > prompt for statements

Run it

Requires Java 21 or later.

java -jar Mini_Integer_Programming_Language.jar

CLEAR needs an ANSI-compatible terminal (like Windows Terminal), not Eclipse's console.

See the README for syntax and examples.