Hello,
I try to build a grammar for ruby and I have a problem with a specific string definition..
An example
I made a grammar to mark the string. The strings starts with << followed by a free delimiter (in my example I used 'helloworld'). The delimiter must be repeated later on a single line to finish the string
I tried <<(\w+)$ and wanted to finish it with \1 or ^\1$
BC3 recognize the start of the string, but not the end.
Is there an error, or is the usage of \1 in the to-text not possible?
Attached my rule and a bit ruby-code to test (including some more string definitions in ruby).
I try to build a grammar for ruby and I have a problem with a specific string definition..
An example
Code:
text = <<helloworld This is some Text, saying Hello World A 2nd line is possible (and a 3rd, 4th…) helloworld puts text
I tried <<(\w+)$ and wanted to finish it with \1 or ^\1$
BC3 recognize the start of the string, but not the end.
Is there an error, or is the usage of \1 in the to-text not possible?
Attached my rule and a bit ruby-code to test (including some more string definitions in ruby).
Comment