Community
Participate
Working Groups
Integers followed by dots are not correctly handled by the ATL parser. For instance, when 1.toString() is parsed, number 1 is considered as a RealExp because of the dot. However, no error is reported. The correct behaviour is to consider number 1 as an IntExp. To correct this issue, the lexer needs to be modified from this: INT : (DIGIT)+ ; FLOAT : DIGIT+ (('.' DIGIT)=>'.' DIGIT+)? ; to this: INT : (DIGIT)+ (|{ ((input.LA(2) >= '0') && (input.LA(2) <= '9')) }? => '.' DIGIT+ {$type = FLOAT;}) ; because it seems that the syntactical predicate of the ealier version is not sufficient (or maybe incorrect), whereas the semantic predicate of the later version works.
The proposed solution has been committed to CVS HEAD.
This was released for ATL 3.1 or earlier - closing.