whitespace not acting as expected wrt newline
Scannerless GLR parser generator
Brought to you by:
jplevyak
The behavior of 'whitespace' seems to be different for spaces and for newlines. Using the following grammar, I'm seeing some weird behavior:
$ cat k.g
A: 'a' 'b' 'c';
whitespace: "[ \n]";
now build grammar and parser using the default options (make_dparser k.g)
$ echo "a bc" | ./parser
success
$ echo -e "a\nbc" | ./parser
:2: syntax error after 'a'
It seems to me to be a bug, that the parser doesn't expect the newline after 'a'. I'm not sure how to work around this either. Any help would be appreciated!
I've attached the output of running make_dparser.