Closed gdetrez closed 3 years ago
With the following example:
S. S ::= "#" [A] ; A. A ::= "a" ; delimiters A "[" "]" separator "," ;
$ bnfc --haskell --cnf -m test.cf && make $ echo "# [ a ]" | ./TestCNF
You get TestCNF: Printtest.hs:(92,16)-(93,64): Non-exhaustive patterns in case because the following doesn't have a case for a non empty list:
TestCNF: Printtest.hs:(92,16)-(93,64): Non-exhaustive patterns in case
prtList es = case es of [] -> (concatD [doc (showString "[") , doc (showString "]")])
The delimiters pragma has been removed in 2.9.0.
delimiters
With the following example:
You get
TestCNF: Printtest.hs:(92,16)-(93,64): Non-exhaustive patterns in case
because the following doesn't have a case for a non empty list: