Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pdt-dev] Two AST models and parsers

One of JDT AST models contains also logic for FlowAnalysis.

At first look PDT ASTs works like in JDT, but… Older (JDT like) AST contains binding resolver, which using compiler AST and sometimes whole DLTK TI framework. 
Older AST (JDT like) is mostly used directly in UI with many utils, functions and widget ported from JDT (many of them still contains java/jdt keyword in comments and strings). And as I see, it is always created while using editor. He has ability to record his changes.
Second AST (compiler subnamespace) its created for DLTK integration, but it also used in outline, syntax coloring etc… This AST is cashed by DLTK

In summary, it looks like an unfinished migration to DLTK.  I do not see the terms of use of these models.

Maybe will be possible to transform from one to another (by special visitor), instead of duplicating parsers.

Dawid

From: Alexey Panchenko Alexey Panchenko
Actually, JDT also uses 2 ASTs :)
One is used in indexing/search/model building etc - the so called compiler AST. It uses less resources, so can be created faster.
The other one supports rewrite, so it uses more resources because of that and is used mostly for refactorings.

Regards,
Alex


On Sat, Nov 16, 2013 at 1:01 AM, Seva Lapsha <seva.lapsha@xxxxxxxxx> wrote:
I have a good idea why. Because it it's a time consuming project to migrate everything. So it was decided to postpone it until there is necessary time frame. But as always happens the time never came. Now none of the people who took that decision is longer in the team :)

So: "why" - is not really a helpful question IMO. The good questions are: "what" priority should the migration take and "when" should it happen.

Hope this helps.


On Fri, Nov 15, 2013 at 6:32 AM, Kaloyan Raev <kaloyan.r@xxxxxxxx> wrote:
Good catch! I am currently working on improving performance in Zend Studio and noticed the same. Yet no idea why they both co-exist.

Hopefully there is someone who still remember the early days of PDT.


On Fri, Nov 15, 2013 at 1:17 PM, Dawid Pakuła <zulus@xxxxxxxxx> wrote:
Hi PDT-team,

while working on php 5.5 support for PDT I understood that this project have two very similar AST models and parsers for each one.

Is this necessary?
First model is older and is very similar to JDT/JSDT AST
Second is extended DLTK generic model. (compiler AST)

First model is used in ASTRewrite, Formatter etc…
Second in DLTK TI framework, error reporting, etc...

Each one contains own visitors, utils etc...

Maybe is this possible to link them? This should improve performance and simplify the further development.

Thanks,
Dawid

_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pdt-dev



_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pdt-dev



_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pdt-dev


_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pdt-dev

Back to the top