-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Labels
Description
I have a grammar for a programming language. It defines %whitespace, because whitespaces are not significant.
Now, I want to parse string literals with a rule like this:
StrQuot <- '"' (StrEscape / StrChars)* '"'
StrEscape <- < '\\' any >
StrChars <- < (!'"' !'\\' any)+ >
StrEscape and StrChars both have rules that produces std::string
, that I combine together in the rule of StrQuot. The problem is that the whitespaces in the strings are ignored, and thus the resulting string has all the whitespaces filtered out.
Is there a way to deactivate locally the %whitespace rule?