BNFC release 2.8, and up to the latest commit.
The Java backend is sensitive to the order of the macros/productions.
For instance the following gives errors, both using CUP and ANTLR4:
separator Exp ",";
List . Something ::= [Exp];
A . Exp ::= "a";
B . Exp ::= "b";
Instead
List . Something ::= [Exp];
separator Exp ",";
A . Exp ::= "a";
B . Exp ::= "b";
seems to work fine.
I did not try all the other backends, but Haskell seems to work without problem with both formulations.
BNFC release 2.8, and up to the latest commit.
The Java backend is sensitive to the order of the macros/productions.
For instance the following gives errors, both using CUP and ANTLR4:
Instead
seems to work fine.
I did not try all the other backends, but Haskell seems to work without problem with both formulations.