[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.tmf] Re: How to mix long and int?

Hi,

How can I set the int and the long without having to
change the existing model?

  Foo returns my::Foo:
    'int' intValue=INT
    'long' longValue=LONG;

Don't make LONG and INT terminal rules but datatype rules. Then you can implement different value converters for them.


Long returns ecore::ELong: NUMBER;
Int returns ecore::EInt: NUMBER;

terminal NUMBER: '-'? ('0'..'9')+;

Alex