[antlr-interest] Recovering from missing tokens
Joan Pujol
joanpujol at gmail.com
Tue Nov 16 14:07:14 PST 2004
Hello,
I have a pseudocode language similar to java. Now I want to start the
syntactic error checks and recovery.
(I use lookahead of 1 token)
If I have:
algorism
const
CONST1:integer=10 //CONST1 is an ident
fconst
var
a:integer //a is an ident
fvar
//Start of code for exemple an assignment
a:=10 //a is an ident
falgorism
If for example the user forgot to put the const token.
What is the best way to solve the error and recovery from it?
Because the parser gets CONST1 (an identifier) and put the parser in
the code rule. And the I think that is very hard to recovery.
A lot of thanks in advance,
--
Joan Jesús Pujol Espinar
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list