BNFC / bnfc

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

Absent `entrypoints` should default to first NT rather than all NTs #335

Open andreasabel opened 3 years ago

andreasabel commented 3 years ago

Haskell: if no entrypoints are given, everything is an entry point. Maybe we should have a special entrypoints * for that purpose, and otherwise default to the first category (like in other backends). The problem of exporting all non-terminals (NTs) is that unused rules are unlikely to be reported by happy, e.g. for useless list pragmas. BNFC could also warn of unused rules if it weren't for the default entrypoints behavior.