[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FYI: lalr1.cc: Remove the traits
From: |
Hans Aberg |
Subject: |
Re: FYI: lalr1.cc: Remove the traits |
Date: |
Mon, 19 Sep 2005 14:06:27 +0200 |
On 19 Sep 2005, at 13:26, Hans Aberg wrote:
std::stack is an adaptor l´class, which uses std::deque as default,
but otherwise can use std::vector and std::list as well.
One alternative, for the Bison parser, might be to write a similar
adaptor class, which admits looking down the stack. Then people
easily can choose. But in general, I propose to make the C++ parser
as simple as possible, to get it off the ground.
One way to do it, might be to define a macro that expands to
std::deque by default. Then, if one wants to change that, one writes
in the .y file say
%define parser_stack "std::vector"
causing the macro to expand to std::vector instead.
Hans Aberg
- FYI: lalr1.cc: Remove the traits, Akim Demaille, 2005/09/19
- Re: FYI: lalr1.cc: Remove the traits, Hans Aberg, 2005/09/19
- Re: FYI: lalr1.cc: Remove the traits, Akim Demaille, 2005/09/19
- Re: FYI: lalr1.cc: Remove the traits, Hans Aberg, 2005/09/19
- Re: FYI: lalr1.cc: Remove the traits, Akim Demaille, 2005/09/19
- Re: FYI: lalr1.cc: Remove the traits, Hans Aberg, 2005/09/19
- Re: FYI: lalr1.cc: Remove the traits,
Hans Aberg <=
- Re: FYI: lalr1.cc: Remove the traits, Akim Demaille, 2005/09/19
- Re: FYI: lalr1.cc: Remove the traits, Hans Aberg, 2005/09/19
- Re: FYI: lalr1.cc: Remove the traits, Akim Demaille, 2005/09/19
- Re: FYI: lalr1.cc: Remove the traits, Hans Aberg, 2005/09/19
- FYI: lalr1.cc: Single parser stack, Hans Aberg, 2005/09/19