[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnubol: Recovery
I have a quetion. Does anyone know how to get the line number of the
lookahead token?
My guess is that when a nasty dangling unterminated condtional is being
recursed that, should we want to we can build a tree that represents its
various open levels. As we get to the reduction of the problem child we
might, if we have so designed, have that tree available for walking.
If we then walk we can say that at each line S, an open conditional started
that did not end explicitly so we are ending it implicitly. The thing that
ends the problem is the lookahead, which is not quite here in the current
rule. Can we get the line number of the lookahead that is precipitating the
multiple reductions. So that we can say the implied terminator was assumed
at line T, (which line T is the line number of the lookahead token)? Where
would a lexer have been able to put that? is there any chance that (speaking
bison here) a hyper extended $n can reference a YYSTYPE with the line number
in tow? even though it is the lookahead. Can we ever get to the lookahead
with $n?
Bob Rayhawk
--
This message was sent through the gnu-cobol mailing list. To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body. For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.