[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.tmf] Re: Keywords vs. tokens
|
Hi Sebastian,
Thank you for the hint. I tried it but still keywords are recognized as IDs.
From_import :
____'from' FQN 'import' ('*' | ((FQN ('as' FQN)?) (',' FQN ('as' FQN)?)*)) ;
Foo_KW returns ecore::EString :
___'foo' | 'FOO' ;
FQN :
____ID ('.' ID)* ;
terminal ID : '^'?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')* ;
I get an 'No viable alternative error' if the text intended to be FQN is FOO.
I do not understand why and how to work-around.
The only chance I see is to split ID in ID_first_letter and ID_trailing_letter, and write a data type rule to compose ID out of it. But this not really concise.
br
m