[antlr-interest] Strange MismatchedTokenException(0!=0)
Peizhao Hu
peizhao at itee.uq.edu.au
Sun Oct 14 20:31:58 PDT 2007
Hi All,
I tried to use the following rule:
//============================
tokens{
TEMPLATE='TEMPLATE';
}
template_statement
: TEMPLATE
manufacturer_code comma
id_number_of_bits comma
template_id COMMA
optional_description
;
manufacturer_code
: INTEGER ;
INTEGER : (Sign)? Digit ;
protected Digit : ('0' | '1'..'9' ('0'..'9')*) ;
//============================
to match the following statements:
TEMPLATE 0,8,29,"Capacitive Microphone"
however, it throws out MismatchTokenException(0!=0) when it tried to
match 0 after the token TEMPLATE.
any idea?
--
regards;
Peizhao
More information about the antlr-interest
mailing list