antlr/antlr4 — Issue #20: tokens not introducing keyword rules in lexer?
Author: parrt
Created: 2012-02-18 18:14:51+00:00
State: open
Labels: lexers, type:bug:1

the lexer wouldn't match correctly and would cast them all as id tokens

tokens { TRUE='true'; FALSE='false'; TYPE_BOOL='boolean'; TYPE_VOID='void'; TYPE_INT='int';
TYPE_FLOAT='float'; TYPE_CHAR='char';}

primitiveType
returns [CymbolProperties props]
@init{$primitiveType.props = new CymbolProperties();}
: 'float'
| 'int'
| 'char'
| 'boolean
| 'void'
;