[antlr-interest] What's missing......?

Gavin Lambert antlr at mirality.co.nz
Thu Jan 29 01:59:27 PST 2009


At 22:32 29/01/2009, Meena Vinod wrote:
>Here is my test grammar file:
[...]
>An input like "junk" comes back with an indeterminate state. The 
>ANTLRWorks interpreter does not show an error.
>There is no exception thrown. The debugger times out saying, 
>"Time-out waiting to connect to the remote parser".
>
>Infact, the EOF is around for every command.
>
>Am I missing something here?

I think you're missing the errors that the lexer should be 
printing to the console :)

You haven't defined a lexer rule that can match an arbitrary 
sequence of characters (or just letters), so it won't be able to 
generate a token for them.

Remember, the lexer runs first (and by itself), and must 
completely convert the input text into a token sequence before the 
parser can figure out what it actually means.



More information about the antlr-interest mailing list