[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: language neutral parser
From: |
Hans Aberg |
Subject: |
Re: language neutral parser |
Date: |
Sat, 20 Oct 2001 11:58:23 +0200 |
At 18:08 -0500 2001/10/18, Pinku Surana wrote:
>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.
A scheme that I have made use of in another context, but translated as
though implemented in Bison, is to let Bison to generate a sequence of
environments, which a special macro language then can process. Then one can
change output language by merely changing the macro formatting file.
The point with this approach is that it is very easy to generate these
environments. Writing directly in a computer language is always tricky,
because one has to sort out where things have to be written.
I am not able to deal with this approach right now, but I may return to it
in the future.
Hans Aberg
Re: language neutral parser,
Hans Aberg <=