|
|
|
|
|
by ithkuil
1414 days ago
|
|
Ok that's about the "parser generator" part. But what about the "formal grammar" part? Do you really want your language to be defined by a particular imperative parser implementation? I'm asking because I do have a practical problem: my team has a hand crafted parser for a language. It should follow a spec written in EBNF. That spec could be ambiguous it's not because an automated tool checks that that EBNF grammar is not ambiguous. I find the ability to document the grammar using something that everybody understands (BNF and variants) to be very useful. Yet, your comment seems to imply that since it allows ambiguous grammars we should be using it. EDIT: our grammar is implemented by three different parsers, written in two programming languages. |
|
Yes please. The code defines completely and unambiguously how the language is parsed.