help-bison
[Top][All Lists]
Advanced

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

Re: language neutral parser


From: Pascal Bart
Subject: Re: language neutral parser
Date: Fri, 19 Oct 2001 08:04:48 +0000 (GMT)

Hi,

>How about this: bison could process a grammar and generate an XML file
>containing all relevant info for a parser: parser states, arbitrary actions
>(in CDATA fields), etc. Then any other language implementation can process
>the XML file and spit out a parser in their language. They would have to
>write their own parser interpreter, of course, but that is fairly easy. For
>many languages, it might simply take an XSL transform to turn the XML file
>into code for their language. Whaddya' think? I've got a Scheme compiler and
>this would make things very easy for me.

In fact experimental trunk of bison development try to generate parser
written with C++. C++ is absolutely not a limit, because we've changed the
generation method. In the past bison wrote code C in a file, now all the
code C is in the skeleton, which contains muscle (like macros), and that
muscles are substitute by bison, with this method every body could write a
skeleton to generate parser with a particular language (or with better
error recovery, ...). With this method, every programming language could
not have its own bison parser, but this will open bison to more languages.

Pascal Bart (address@hidden)




reply via email to

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