3 ms·
I notice that the grammar specified requires an else after every if. The wikipedia article also says that the dangling else problem doesn't exist because the g
by tedunangst 17y ago
I notice that the grammar specified requires an else after every if. The wikipedia article also says that the dangling else problem doesn't exist because the grammar is never ambiguous, but doesn't say much more. So does this mean you can't use PEG to parse a language with an optional else? How would you specify it?
Edit: oh duh, now I see the part I just glanced over. The answer is that prioritization is implicit in a rule's productions.