Parser
W. Tasin
tasin at e-technik.fh-muenchen.de
Wed Feb 16 22:32:52 GMT 2000
John Zedlewski wrote:
>
> > Or any other parser generater (thinking about antlr)
> > Ben
>
> I was looking into antlr and it seems quite cool, but it definitely has
> something of a Java bias. There isn't really a complete C++ grammar
> available, although there is a "work in progress" that works with an
> earlier generation of antlr. I'm surprised that it's not easier to find
> a high-quality, pre-written C++ grammar. The one embedded in gcc is
> pretty damn confusing, but it's certainly the most relevant, considering
> how many KDevelop users are also g++ users.
> It's also worth looking into "Lemon"
> (http://www.hwaci.com/sw/lemon/lemon.html) if you're interested in this
> sort of thing. It claims to be faster than bison, and it has some good
> syntax extensions (like naming expressions rather than using $x),
> without being unfamiliar to yacc-users.
> --JRZ
MY PERSONAL OPINION:
I don´t like the idea of an external package (which parses ... either
bison, yacc, etc.) ...
in the end we should have a parser written in c++.
Ok... it´s right using packages like these would simplify the whole
thing... but only in the first degree.
I remember only the trouble we always have with external packages,
"where can I find this library... where do I have to put it", some
autoconf/automake trouble to implement a non supported language (e.g.
"lemon") etc.)
The "startup" with Jonas´ parser should be the way...
yes yes... i know it is a hard work... but the possibilities would also
be great...
think about a script language inside kdevelop (in the future... far far
away!! ;-) )
My ideal wish of a parser would include:
parsing memoryfiles and "real" files
some little preparsing options (to solve the "using namespace inside
includes" problem or "#define" problem)
parsing in a very very generic way... abstracted in classes from the
root/base
(maybe to loose also the (f)lex stuff... and in the end interpret the
*.l by these classes)
and all the rest :-), which is already implemented.
(Does somebody know if there are already free c++ libraries for this???)
Ok it is very idealistic, but I think step by step also implementable...
Bye
Walter
--
oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
(Zucchero)
:-------W. Tasin, FB 04,
FHM-------------------PGP-KeyID:0x7961A645----------:
<Key-Fingerprint: 1610 835F 0080 32F4 6140 6CF7 A7D0 44CD 7961A645>
<http://wwwkeys.pgp.net:11371/pks/lookup?op=index&search=0x7961A645&fingerprint=on>
More information about the KDevelop
mailing list