how to allow a space in an identifier in an expression

Jan 15, 2014 at 10:30 AM
Edited Jan 15, 2014 at 2:21 PM

I would like to modify the expression grammar that comes with irony.
I would like to allow the use of spaces within any identifier.
I naively tried to allow a space by including a space in the AllChars property.
But parsing an expression like
3 * Brazil coffee ... 
detects two identifiers (Brazil and coffee) and a syntax error in between:

Syntax error, expected: operator, ), ., [, :, ,

Would there be a possibility to allow one or more spaces in an identifier?


Jan 15, 2014 at 11:28 PM
I think the easiest way is to write custom identifier terminal that skips spaces until special symbol; maybe subclass IdentifierTerminal or just copy/modify it.
Marked as answer by lalbatros on 1/15/2014 at 11:26 PM
Jan 16, 2014 at 6:26 AM