[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison and C++
From: |
Robert Anisko |
Subject: |
Re: Bison and C++ |
Date: |
Tue, 14 Aug 2001 00:10:05 +0200 |
> >...STL stack might NOT be a good idea if
> >the bison algorithm has to look forward and backward in the stack; I
dunno
> >if it allows that...
>
> The standard LR(1) state machine does not look deeper into the stack, but
> the DR does (I take it from the description given in the Bison lists).
> Then just use say std::vector instead. The std::stack is just an adaptor
> class.
>
> Or it should be easy to merely require the use of an abstract class A,
> which the user specifies. For example, the LR(1) algorithm would require A
> to have A::push_back(), A::pop_back(), etc., and some other parser
> algorithm may require extra class functions
This is true if you only consider parsing, but we still need a data
structure with random access for semantic actions.
Re: Bison and C++, Hans Aberg, 2001/08/11