[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: Thu, 8 Nov 2001 19:26:58 +0100

At 09:30 -0800 2001/11/08, Nathan Inada wrote:
>  Hans> So what I did was to create a language making that part easy.
>I looked through the bug-bison archives for a bit more
>discussion, but found none.

You can try search on the word "formatter".

>Have you more info on this?

I did this only in order to simplify my own programming, so there is no
docs general docs for it. I worked on a runtime model, originally
implemented in C++, but eventually I decided to make my own OOPL, using
Flex/Bison generating C++ as output. I then discovered it to be quite
complicated to write C++ code.

If I should describe it via Axel Kittenberger's XML description, then one
might by means of direct C++ code create runtime lookup tables
corresponding to
    <action value="4">
      <text value="printf ("\t%d\n\", "/>
     <action value="5">
        <text value=" = "/>
That is, the information of these lookup tables can be built in any order
without having to worry about (syntactic) environmental lifetimes. (I am
not sure if the stuff above would be OK in XML.)

This means that these lookup tables can then be merged with other
environmental information (read say from a file) telling how to produce
output files.

In actual implementation, I merely use iterated containers, say like
std::map if one wants entries to be indexed by strings.

  Hans Aberg

reply via email to

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