Dmitry Ivankov
2007-03-01 20:17:11 UTC
Why can't I write expression like ";[ \t\r\n]*;"?
Syntax I want to parse
is sequence of quoted strings, separated by spaces, tabs and newlines,
prefixed by a special char.
For example $"abc" "def" "ghi"; or @"123" "456" "789";
And for different prefixes I want different schemes for strings.
Without newlines it's simple
block:
start: $\"
end: \"
scheme = S1
S1:
regexp: \"[ \t]*\" //just eat that sequence
//and of course other rules, concerning content of strings
Block can't be
used instead of regexp, because it's start will be matched with any quote.
Syntax I want to parse
is sequence of quoted strings, separated by spaces, tabs and newlines,
prefixed by a special char.
For example $"abc" "def" "ghi"; or @"123" "456" "789";
And for different prefixes I want different schemes for strings.
Without newlines it's simple
block:
start: $\"
end: \"
scheme = S1
S1:
regexp: \"[ \t]*\" //just eat that sequence
//and of course other rules, concerning content of strings
Block can't be
used instead of regexp, because it's start will be matched with any quote.