Replies: 2 comments 1 reply
-
Hey @raylras, parser generators (or parser engines in general) generally don't support not parsing something. You instruct what to parse, and they will do it. For your case in particular, you might be able to get away with defining a terminal that matches everything until it sees the
Note that this is slightly hacky - this isn't a language that is well parsable by a parser with a separate tokenization and parsing phase. Often times, those languages require a custom lexer/tokenizer that is aware of some of the context of the text. |
Beta Was this translation helpful? Give feedback.
-
Even if I place this terminal rule at the end of the
I'm not sure. This syntax comes from a handwritten LL parser originally. |
Beta Was this translation helpful? Give feedback.
-
I have a rule defined as follows:
However, it seems that this syntax is not permitted in Langium 3.1.1:
While I could technically enumerate all the tokens, this approach is clearly not ideal.
Beta Was this translation helpful? Give feedback.
All reactions