Closed pragdave closed 2 years ago
This is the expected and documented behavior.
You may want to rewrite your grammar as something like:
grammar = all: (one two) ;
one = one: "a";
two = two:"b" ;
You may reopen with a pull request that provides the desired behavior without breaking existing unit tests.
I do think that the behavior you seek is reasonable, but I think it would break automatic model generation.
The task is in part to define how the desidred JSON output should map to Python @dataclass
objects.
Given the following:
I get the output:
I was expecting:
I'm probably misunderstanding something, but this doesn't seem right.
Dave