help-bison
[Top][All Lists]
Advanced

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

RE: Any Bison generating Bison tools ?


From: Karen Loughran
Subject: RE: Any Bison generating Bison tools ?
Date: Fri, 20 Feb 2004 09:45:39 -0000

Thanks a lot Hans,  this is very helpful.  If I produce any skeleton files I
will certainly donate,

Karen

-----Original Message-----
From: Hans Aberg [mailto:address@hidden 
Sent: 19 February 2004 18:05
To: Karen Loughran
Cc: address@hidden
Subject: Re: Any Bison generating Bison tools ?


At 15:11 +0000 2004/02/19, Karen Loughran wrote:
>   e    Hi  there,   Can you tell me if  there is such a thing as a Bison
>grammar generating Bison  ?

Just pick down the Bison sources and look into the .y file in the "src"
directory. :-) There is also a .l Flex lexer grammar.

I think you might do the same thing with the (later) Flex sources.

So Bison is compiled using earlier versions of itself, even though the
distribution comes with an already compiled file as well.

>I have an XML  document which contains meta data describing the 
>contents of a flat  file (which comes from a database dump). I would 
>like to define a flex/bison lexer/parser for this XML meta file and 
>then get bison to generate another bison grammar (instead of  C) which 
>would define grammar for any flat file document conforming to the 
>original XML meta rules.

If you want use Bison to generate parsers in other languages than C, Bison
now uses the macro program M4 for that, which makes it real easy to write
such skeleton files. Just modify the existing C skeleton files (in the
directory "data".

If you write new skeleton files, the GNU folks might be happy for a
donation. This stuff is nest discussed in the Bug-Bison and the
Bison-Patches lists.

  Hans Aberg







reply via email to

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