Skip to content

2.0 - Parser rewrite

Choose a tag to compare

@boxbeam boxbeam released this 07 Oct 03:51
· 8 commits to master since this release

A bug was reported by Discord user ErikH which I couldn't find the cause of, due to the old parser code being practically unreadable. I've rewritten the parser entirely, and the code is now much cleaner, along with several improvements and one breaking change.

Breaking changes

Implicit multiplication is no longer supported

Changes

  • Parser performance improved by 15%
  • Fixed bug causing expression max( 0.0, (378044 * 100 / 100.0 - 294964) * 1.0 ) - 0.0 to not be parsable
  • Improved error messages display where in the input an error happened by visually pointing it out:
    image
  • Updated benchmarks written with jmh now available at https://github.com/Redempt/CrunchBenchmark, results in readme
  • Repeating unary operators no longer breaks the parser (!!true, --1)