help-bison
[Top][All Lists]
Advanced

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

Re: About bison's development


From: Hans Aberg
Subject: Re: About bison's development
Date: Sun, 13 Jan 2002 18:33:46 +0100

At 16:54 +0100 2002/01/13, address@hidden wrote:
>> About of the new version I have a question (note i haven't seen the source
>> yet) how can I add a new parser file? ( I mean bison.simple or bison.hairy.
>> cause the DR method needs a different parser)
>
>There are still open questions to solve here.  One of the problem being
>that we didn't have to really face the problem yet since there is only
>a single parsing techno for the time being.  So we improved, but did not
>finalized, for lack of concrete needs to meet.

I can give one input, as I had to think a bit about it when making my C++
skeleton files. This latter is a simpler thing though, because I only had
to tweak Bison a little bit, and then I can change the skeleton file by the
--skeleton=<filename> startup command.

First, I decided that my skeleton files should have the ending ".bison".
They would then be called C.bison, C++a.0.2.bison (C++ type "a" version
0.2), etc.

As for introducing entirely new algorithms, I think one would need that an
option like
  %drlr
selecting a new default skeleton file, named say drlr.bison (and I do not
imply that the two "drlr" in this example must be the same). This can then
still be overridden by the --skeleton command.

To Carlos: it should suffice to currently for you making a %drlr option
that does not select a new skeleton file, and before it has been integrated
into the Bison proper, making sure to compile the files with right skeleton
file using the --skeleton command. (BTW, should there not be a %skeleton
command?)

It is fairly easy to do such tweaks in Bison: Search the Bison sources for
some % option name, and one then finds that in lex.c there is a
percent_table; then work further to see how the other entries in this table
are used. After that, just add a customized "drlr" entry into this table,
and install your own routines. It for example set an added drlr_flag, which
you can use to select your DRLR algorithm.

  Hans Aberg





reply via email to

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