Open bvssvni opened 8 years ago
One idea: Allow meta data on sequence and select rules.
// sequence
[a b c]:"foo"
// select
{a b c}:"foo"
In the case of comments, this text includes the special characters, so their meaning becomes application specific:
// includes `//` and `/* ... */` in "text".
1 comment = {multi_line_comment ["//" ..."\n"?]}:"text"
Another idea is to pass it to another rule.
Sometimes you want to match over a pattern of rules and use it as a string.
Examples of usage: