Re:Ohm: Parsing Made Easy
by pdubroy on Tuesday October 17, 2017 @12:18PM
(#15492184)
I understand your concern, but can you tell me a bit more about how you think "serious" languages should be developed?
[ Parent
| on HN ]
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?