Open crguezl opened 3 years ago
Hi,
Thanks for giving us Nearley.js. It is a great tool and I have used successfully in the classroom this course.
This pull request is about the arithmetic.ne grammar example in examples/calculator. When you run it, it has a peculiar behavior for some inputs like:
arithmetic.ne
examples/calculator
➜ calculator git:(master) . ./build-and-test.sh > sinpi 1.2246467991473532e-16 > sqrtsinpi 1.1066376096750703e-8
that is due to the set of rules for N and P and _
N
P
_
With the proposed change, this is the new behavior:
➜ calculator git:(master) ✗ . ./build-and-test.sh > sinpi -----^ Error. > sin(pi) 1.2246467991473532e-16 > sqrtsinpi ------^ Error. > sqrt(sin(pi)) 1.1066376096750703e-8 >
Nothing else changes
Hi,
Thanks for giving us Nearley.js. It is a great tool and I have used successfully in the classroom this course.
This pull request is about the
arithmetic.ne
grammar example inexamples/calculator
. When you run it, it has a peculiar behavior for some inputs like:that is due to the set of rules for
N
andP
and_
With the proposed change, this is the new behavior:
Nothing else changes