|
|
|
|
|
by bd82
3173 days ago
|
|
That is a very good question because afaik many(most?)
commercial (meaning "serious"...) programing languages
are developed using hand crafted recursive decent parsers
which usually mean that the first alternative takes precedence and that there are no grammar validations to detect ambiguities at all. I do agree that grammar validations and ambiguity detection is very important, but even if the semantics of a PEG grammar define that the first matching alternative should be taken, should it be possible to detect some cases such as unreachable alternatives as long as the grammar is structure is known in advance? |
|