BNFC / bnfc

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

BNFC crashes on input that has no rules #254

Closed andreasabel closed 5 years ago

andreasabel commented 5 years ago
$ bnfc --haskell -m -d Empty.cf 

0 rules accepted

Use Alex 3.0 to compile Empty/Lex.x.
Empty/Par.y Tested with Happy 1.15
writing new file ./Empty/Abs.hs
writing new file ./Empty/Lex.x
writing new file ./Empty/Par.y
writing new file ./Empty/Test.hs
bnfc: Prelude.head: empty list
andreasabel commented 4 years ago

BNFC now checks that there is at least one rule, exits otherwise.