
|
If you were logged in you would be able to see more operations.
|
|
|
ANTLR v3
Created: 14/Mar/07 11:17 AM
Updated: 14/Mar/07 01:24 PM
|
|
| Component/s: |
ANTLR Core
|
| Affects Version/s: |
3.0b6
|
| Fix Version/s: |
3.0b7
|
|
|
Jim Idle reports:
lexer grammar jim;
fragment EOLTOK
: ( '\n' | '\r' )
;
ALINE : ((~EOLTOK))+ ;
ANOTHER : ( (~('\n' | '\r')) + );
You will see that ALINE calculates the set using the token number assigned to EOLTOK, and so the set is:
{'\u0000'..'\u0003', '\u0005'..'\uFFFE'}
Whereas ANOTHER calculates the correct set as it uses the literals it finds and negates that.
|
|
Description
|
Jim Idle reports:
lexer grammar jim;
fragment EOLTOK
: ( '\n' | '\r' )
;
ALINE : ((~EOLTOK))+ ;
ANOTHER : ( (~('\n' | '\r')) + );
You will see that ALINE calculates the set using the token number assigned to EOLTOK, and so the set is:
{'\u0000'..'\u0003', '\u0005'..'\uFFFE'}
Whereas ANOTHER calculates the correct set as it uses the literals it finds and negates that.
|
Show » |
|