[KDevelop-PG-Qt] [Patch] Full CC-Example
Milian Wolff
mail at milianw.de
Sun Oct 18 13:32:43 UTC 2009
On Sunday 18 October 2009 16:50:57 Jonathan Schmidt-Dominé - Developer wrote:
> Hi!
>
> The cc-example for the parser-generator KDevelop-PG-Qt is very outdated
> (wrong syntax, no functionality). So I decided to learn the syntax be
> patching the cc-example. I have added a Lexer and corrected the Parser. A
> Visitor dumps the parse-tree to console. I have not corrected everything,
> a few syntax-elements like export are still missing. So the small test
> works, but the bigger test does not. (I have added it to check the
> functionality after changes) I hope you can apply the patch. ;)
>
> Jonathan
>
> PS:
> The patch was created from /playground/devtools.
Nice! The patch looks good.
What is
#line 2 "cclexer.cpp"
#line 4 "cclexer.cpp"
supposed to do in cclexer.cpp ?
On a different matter:
David Nolden, who wrote the Cpp support for KDevelop, wrote is parser by hand
afaik. Maybe one should investigate whether one should take the cc approach.
Of course that won't happen before 4.0 as it might break a lot, yet in the
future it could make sense...
If you want to continue working with this stuff, I'd have tons of languages
that need a working parser :) So if it is fun for you, here's a list of
languages I would like to have a parser for:
- Css
- MySQL
- Bash
- XML
- .ini (like in .desktop files)
If you are up to it, please contribute :D I once started with Css but failed
horribly, because I could not find much documentation on the *.g syntax, did
you find any? If not, I would also appreciate it greatly if you could write
some documentation!
--
Milian Wolff
mail at milianw.de
http://milianw.de
More information about the KDevelop-devel
mailing list