Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

New parser model for Code completion

<< < (11/16) > >>

anonuser:
First I need Yiannis to put in those FreeBSD changes I submitted    :shock:
So I can go ahead and resubmit my port.

grv575:
The problem with elsa (which is an alkhound-based parser) is if you look at the source, it's absolutely huge.  It looks like getting elkhound to work with a new desired parser (say to parse java or python or whatever) would be a lot of work.  Plus it uses external tools like ast to produce the abstract syntax tree.  This looks all very complex and not modular and pluggable for anything other than c++.

The antlr compiler compiler looks like it might be a better bet.  The tutorials show that's it's easy to specify both the lexer, the parser, and an AST walker all with antlr.  This would make adding different parsers much more painless as it does it all (including generating the AST instead of using a seperate tool for that).

There's already a c++, java, c#, etc specifications for antlr as well.  So, it looks overall like a better fit.

anonuser:
Alright then I'll start with looking over antler making a few test projects seeing how it holds up.

takeshimiya:
Improving the current one, or creating a new parser, it doesn't matter, as in the end the best one would be used. :)

But for ANTLR C++, which is a complete C++ parser and generates an AST, the entire code weights 150KB and are only 14 files of pure c++ standard code.
Unfortunately, I can't say the same for other parsers like Elsa. :)

anonuser:
You're forgetting this all needs to integrate with the editor.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version