An attempt at an FPCore 2.0 compliant parser in python.
Relevant information can be found at FPBench's website
SLY, a lexer and parser generator.
(# <expr>)added as syntactic sugar for(! precision integer <expr>)- strings regex extended to include all whitespace characters
- added Greek Unicode letters (α-ωΑ-Ω) to symbols and strings
- added Unicode × to strings
<data>can be<operation> | <let> | <binding><data>can also be( if <expr> <expr> <expr> )- changed
( <operation> <expr>+ )to( <operation> <expr>* ) <property>can beoperation <data>- Created the new lex token
ADDED_OPERATIONthat gets populated with named FPCores - Also added parse rule to use these as normal operators
Files indicated have been modified in this repo.
- Using reserved names as variables
benchmarks/existing/FPBench/benchmarks/fptaylor-real2float.fpcore
- Using parenthesis for let bindings
benchmarks/existing/herbie/bench/demo.fpcorebenchmarks/existing/herbie/bench/hamming/quadratic.fpcorebenchmarks/existing/herbie/bench/libraries/jmatjs.fpcorebenchmarks/existing/herbie/bench/libraries/octave/CollocWt.fpcorebenchmarks/existing/herbie/bench/libraries/octave/randgamma.fpcorebenchmarks/existing/herbie/bench/mathematics/latlong.fpcorebenchmarks/existing/herbie/bench/numerics/every-cs.fpcorebenchmarks/existing/herbie/bench/numerics/martel.fpcorebenchmarks/existing/herbie/bench/numerics/rosa.fpcorebenchmarks/existing/herbie/bench/physics/tea-flows.fpcorebenchmarks/existing/herbie/bench/physics/tea-whistle.fpcore
- ascii font used in header comments is "Graceful" from patorjk.com