help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-greedy wildcard possible? (Long)


From: Frank Heckenbach
Subject: Re: Non-greedy wildcard possible? (Long)
Date: Thu, 27 May 2004 00:43:42 +0200
User-agent: semail 20040101

Hans Aberg <address@hidden>:

> LALR(1) may export some actions before detecting the error. Both
> algorithms will though neither gulp up extra tokens.

Are you sure? The manual says:

: But Bison can force the situation to fit the rule, by discarding part of
: the semantic context and part of the input.  First it discards states
: and objects from the stack until it gets back to a state in which the
: @code{error} token is acceptable.  (This means that the subexpressions
: already parsed are discarded, back to the last complete @code{stmnts}.)
: At this point the @code{error} token can be shifted.  Then, if the old
: look-ahead token is not acceptable to be shifted next, the parser reads
: tokens and discards them until it finds a token which is acceptable.

Frank

-- 
Frank Heckenbach, address@hidden
http://fjf.gnu.de/
GnuPG and PGP keys: http://fjf.gnu.de/plan (7977168E)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]