KDevelop / Bachelor thesis

Roberto Raggi roberto at kdevelop.org
Mon Oct 3 20:42:07 UTC 2005


Hi Adam!

Quoting Adam Treat <treat at kde.org>:

> On Monday 03 October 2005 10:09 am, Roberto Raggi wrote:
> > http://websvn.kde.org/branches/work/kdevelop-pg/
>
> And that is the problem for other languages Roberto.  Your new parser is sooo
> nice that it'll allow us to do things with C++ that will be hard for other
> language parts to keep up with short of writing their own parsers.
heheh

>
> Now, are you suggesting Jakob should write a full blown Java parser in C++
> using your new parser as inspiration?  If so, and he decides to do it, COOL

not really. I'm suggesting to use kdevelop-pg. The parser generator I wrote a
couple of days before the KDevelop conference in ukrain! It generates exactly
the same code I wrote by *hand* for the C++ parser :-) The generated parser is
pretty fast and it is human readable!! for a _real_ example you can take a look
at the C99 parser I wrote using kdevelop-pg.
http://websvn.kde.org/branches/work/kdevelop-pg/examples/cc/cc.g?rev=442884&view=markup

or *fact*!! a small and stupid parser for a C-like language
http://websvn.kde.org/branches/work/kdevelop-pg/examples/fact/

the code generated by kdevelop-pg is very clean :-)
http://websvn.kde.org/branches/work/kdevelop-pg/examples/fact/fact.h?rev=442962&view=markup
http://websvn.kde.org/branches/work/kdevelop-pg/examples/fact/fact.cpp?rev=442962&view=markup

kdevelop-pg generates
  1) the recognizer
  2) the AST
  3) the visitor
  4) the default visitor
  5) and code suitable for code refactoring

ciao robe


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the KDevelop-devel mailing list