what's wrong with this grammar? (newbie) #1729
-
Hi! I'm a complete newbie to Langium and I'm trying to cobble a state transition grammar.
So I tried this grammar:
It causes the content (right) pane to hang with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @VladimirAlexiev, So there are a few issues with the terminal
In the end, your language isn't really a type 2 language (context-free language) that can be parsed using a separated tokenization/parsing phase, because tokenizing the Some advice in general on the grammar: I would create a string token (i.e. |
Beta Was this translation helpful? Give feedback.
Hey @VladimirAlexiev,
So there are a few issues with the terminal
NOQUOTE
; In no particular order:NOQUOTE
does not have an end delimiter. Once the lexer starts tokenizing it, it will not stop until it encounters a"
character (which isn't possible if you are in aTransition
rule, so it consumes the rest of the input stream).NOQUOTE
, which is why it shadows everything.NOQUOTE
terminal can also be lexed as anID
. I.e. they are ambiguous. This means that in…