Pretty printer generates code for reject rules.
Whenever there are {reject} rules code is still generated.
In case you have two different constructs that share a prefix and the reject comes first, you get things parsed as the second rule, but pretty printed as the first.
Despite being a bad idea to have grammars of this sort (at least in the example where I found this issue it was), it is still bad that we pretty print things that should not have been parsed in the first place.
Submitted by Augusto on 23 January 2014 at 14:45
Log in to post comments