[antlr-interest] Problem with .* : RecognitionException never thrown

chintan rao chintanraoh at gmail.com
Sun Jul 1 09:44:15 PDT 2007


Hi,
I was testing antlr
I found a possible bug

I do something  like the thing enclosed in <code> and </code>
<code>
grammar test;

TOKEN	:	'token';

test:(.)*
;
</code>

i get an error

testParser.java:97: exception org.antlr.runtime.RecognitionException
is never thrown in body of corresponding try statement
 catch (RecognitionException re) {

i make rule test to
test:(.)* EOF

this error is not flagged .
The possible problem could be  "." also matches the token EOF. ( I
don't really know :) )
I don't know whether this has been reported earlier . Just thought I
should report this.

regards,
Chintan Rao H


More information about the antlr-interest mailing list