Replies: 1 comment
-
Some suggestions:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm reading through Terence Parr's book and experimenting as I go, I'm a Windows user.
The tools seem to work, everything it setup and I'm generating Java for now (will do C# later when I'm more accustomed to all this).
Anyway, I'm stumped, a tiny grammar (literally a tweak from what's in the book) causes me issues, look, here's the grammar and a sample input file:
This is the output from the
grun
command:I cannot understand why the simplest input
a=1
causes a problem! Surely a single digit1
meets the definition ofINT
in that grammar?Here is the file itself as a raw data dump:
If I change the definition of
INT
to be simplyINT: '1' ;
then it parses that file fine.Resolved
Ok its Unicode again, here is what's actually in the
g4
file:Note, that's actually a 'EN DASH' character with code
E28093
- see here.Beta Was this translation helpful? Give feedback.
All reactions