Skip to content
Discussion options

You must be logged in to vote

Hey @rempAut,

Langium barely exposes any internals of it using Chevrotain, so that makes the GATE approach quite difficult to use. In theory it's still possible, but you would have to basically copy all of the generic internal parser code (see here) to create your own parser and modify parts in order to support the gate statements.

Another way, which would be way easier, is to create a special identifier token which is only able to match identifiers within case elements:

Case_list_element:
(numCase=Signed_Integer ('..' numericCaseEnd+=Signed_Integer)?) | (enumCase=CaseElementIdentifier);

terminal CaseElementIdentifier: ((Underscore (Digits | Letters))| Letters) ((Underscore)? (Digits | L…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@rempAut
Comment options

@msujew
Comment options

@msujew
Comment options

Answer selected by rempAut
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