BNFC / bnfc

BNF Converter
http://bnfc.digitalgrammars.com/
586 stars 165 forks source link

ANTLR backend: start rules needed #272

Closed andreasabel closed 4 years ago

andreasabel commented 4 years ago

See #163 and https://github.com/antlr/antlr4/issues/2689 : ANTLR will sometimes require a start rule

  StartX : X EOF;

for entrypoint X. The current ANTLR backend does not emit such start rules (the LR parser generators add it automatically), thus, the parser fails in some cases. TODO: emit such start rules when generating the ANTLR input.

andreasabel commented 4 years ago

BNFC now emits start rules for all entrypoints in the ANTLR backend.