help-bison
[Top][All Lists]
Advanced

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

Re: Bison back-tracking


From: Akim Demaille
Subject: Re: Bison back-tracking
Date: 24 Nov 2000 11:03:03 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

>>>>> "Hans" == Hans Aberg <address@hidden> writes:

Hans> Is Bison deterministic or does sometimes Bison back-track? If
Hans> Bison sometimes back-track, is there a way to know when Bison is
Hans> back-tracking or to enforce determinism?

It does not backtrack, it is fully deterministic.  Look for Btyacc for
a back tracking Yacc.  It's funny to see that Corbett worked on it,
and pretty many files are common with Bison :)

Hans> By back-tracking, I mean that there are rules
Hans> <variable>: <rule 1> { ... } | <rule 2> { ... } ...  
Hans> where Bison first investigates <rule 1> and in that course
Hans> executes some of the associated actions, then decides that rule
Hans> 1 is not applicable, and then decides for <rule 2> instead.

This cannot happen.  Nevertheless, if you insert actions between the
symbols, and you have `error' tokens then something somewhat similar
can happen.  See the nodes about lexical tie-ins in the documentation.



reply via email to

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