Replies: 2 comments 1 reply
-
I think I found it, just a dot ! |
Beta Was this translation helpful? Give feedback.
-
@KvanTTT - thanks, that's interesting. I am a bit puzzled though. My grammar is parsing this correctly just now:
As you can see it is able to handle, recognize that multi line "string_literal" assignment to "text" halfway down the code, whose rule is:
(I'm anticipating additional sub rules for It correctly recognizes the closing quote! It does not get confused by the text Is it able to do this because it's a parser rule rather than a lexer only rule? It seems too easy, too powerful, many languages have all kinds of fiddly syntax for embedding quotes inside strings yet the above is recognized perfectly - I wonder if my grammar only seems OK, that there might be some hidden gremlin that will bite me later! |
Beta Was this translation helpful? Give feedback.
-
I'm trying to define a basic
string_literal
rule that can accept:"dhkjahdkhksfksdfksdf837598ecfeo8t*^*&^BTuyy";
as an example.
I don't know how to express the idea of
'"'
[any-char]*
'"'
though.Beta Was this translation helpful? Give feedback.
All reactions