Skip to content
Discussion options

You must be logged in to vote

So basically the parser complains that it can parse both alternatives using the ID token. You can solve this easily by just merging the reference into a single declaration and referencing that:

FunctionBlock:
    'FUNCTION_BLOCK' name=ID 'END_FUNCTION_BLOCK';

Type:
    'TYPE' name=ID  'END_TYPE';

type Declaration = FunctionBlock | Type;

Dtypes: ... | type=[Declaration :ID];

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Serhioromano
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants