Skip to content

List entrypoints reverse parsed lists (Haskell/C) #163

@gapag

Description

@gapag

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.

Metadata

Metadata

Assignees

Labels

bugentrypointsConcerning entry points for the parser and the `entrypoints` directivelistsConcerning list categories and separator/terminator/delimiter pragmas

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions