Parsing expression grammars differ from context free grammars in that their choice operator is
Answer: A
Correct answer: ordered, so the first successful alternative is taken
In a parsing expression grammar the choice operator is ordered: alternatives are tried in sequence and the first that succeeds is committed to. This makes every PEG unambiguous by construction, since there is exactly one parse - but it also means a rule can silently shadow a later alternative if the order is wrong.
Please log in or register to report this question.