|Creating terminal STRING rule with start and end tokens? [message #1839800]
||Mon, 29 March 2021 09:59
| M D
Registered: January 2021
Is it possible to create the terminal rule STRING such that instead of it using e.g. single quotes to start and stop the string, it uses a long sequence of characters?|
The reason is I want the user to be able to write everything inside the string.
Something like this, except this doesn't work.
terminal STRING: 'START' ( '\\' . /* 'b'|'t'|'n'|'f'|'r'|'u'|'"'|"'"|'\\' */ | !('\\'|'START'|'END') )* 'END';
[Updated on: Tue, 30 March 2021 09:15]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02406 seconds