help-bison
[Top][All Lists]
Advanced

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

Re: Token types with constructor


From: Hans Aberg
Subject: Re: Token types with constructor
Date: Mon, 13 Sep 2004 19:08:25 +0200

At 10:51 +0200 2004/09/13, Akim Demaille wrote:
> >> Well, did you try Bison's C++ parser?  There's work to do, but I've
> >> been using it for years.
>
> > I recall that I was not able to get it working, so wrote my own.
>
>Yes, you keep on repeating this.  But we've been using this parser for
>years with success.

I am not sure was not working, as I wrote my own C++ skelton file, which
also has been working for years. :-) One problem was that I wanted to place
the code in different specific locations, so I tweaked Bison: I made to
that the two segments Bison produces under %union could be also used when
%union was not invoked.

This is a problem which would be solved with a %code command.

Another problem was that it had some strange templates, which did not seem
well motivated, at least not to me. In my view, as it is easy to write out
the correct C++ code directly, there is no need for invoking complicated
C++ templates. So the situation is different from when writing say a C++
library.

So I think that what happened was, in view of the code placement problem, I
decided to write my own skeleton file. Then I did not have time to figure
out your template ideas, so I merely zipped them out. :-)

Again, with a suitable Bison %define command, one can easily get the C++
flexibility to accommodate different Bison users.

  Hans Aberg






reply via email to

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