|Parsing *some* comments [message #1752953]
||Tue, 31 January 2017 09:32
| Chris Bryan
Registered: April 2016
I'm trying to parse a language where some (but not all) single-line comments are semantically important.|
'--' 'Revision' INT;
terminal INT returns ecore::EInt:
'-'? ('0'..'9' | '_')+;
'--' !('\n' | '\r')* NL?;
('\r'? '\n') (WS | '\r' | '\n')*;
SL_COMMENT is *not* hidden.
I was hoping that the '--' keyword in Revision would override the SL_COMMENT terminal at lexing, but this doesn't seem to be the case. Can anyone explain why?
Powered by FUDForum
. Page generated in 0.01446 seconds