[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ code generation
From: |
Hans Aberg |
Subject: |
Re: C++ code generation |
Date: |
Sun, 8 Apr 2001 12:46:29 +0200 |
At 09:24 -0700 2001/04/07, Petar Teodosin jr. wrote:
>Why there are no open source flex and bison tools
>generating C++ code?
Flex ftp://ftp.digital.com/pub/GNU/non-gnu/flex/flex-2.5.4a.tar.gz isn't
GNU, but has an option to write a C++ class. -- I had to add some "std::"
to the skeleton file.
Bison works excellently under C++ by simply compiling the C files it
outputs as C++.
More advanced solutions may appear in the future, but not the current
version (but I'm not GNU either, so I don't know exactly).
One idea I have is this: I made a small "formatter" macro language (with
the capacity to merge environments defined in different contexts), which
can be used to produce more advanced outputs than what is possible by using
merely a skeleton file. The idea I have then is to somehow link up this
formatter with Bison, by which it would be simple to change the output
language by merely changing a formatting file.