position token Name (letter (letter | digit | '_')*) ;
separator Name "";
separator nonempty Name ",";
generates Haskell code of the form:
instance Print [Vehicle.Syntax.External.Abs.Name] where
prt _ [] = concatD []
prt _ [x] = concatD [prt 0 x]
prt _ (x:xs) = concatD [prt 0 x, prt 0 xs]
prt _ (x:xs) = concatD [prt 0 x, doc (showString ","), prt 0 xs]
Obviously case 4 will never fire as it is handled by case 3.
I guess BNFC should either error if you provide two separator declarations for the same class or the backend should be patched to handle it. I'm unsure whether the same problem exists in other backends.
generates Haskell code of the form:
Obviously case 4 will never fire as it is handled by case 3.
I guess BNFC should either error if you provide two separator declarations for the same class or the backend should be patched to handle it. I'm unsure whether the same problem exists in other backends.