Hi,

short: we need some advice/help on the parser :)
This mail was posted to jython-dev as well.
Please reply if you have some answers to the following questions.

We're working on a Eclipse IDE Python Refactoring plug-in (open-source,
LTK based), see http://sifsstud2.hsr.ch.

We're facing 2 main *challenges* using the jython parser (working on
PyDev's jython parser provided for Python 2.4/2.5 grammars):
1. BeginColumn provided are wrong sometimes (we really need correct
values here for correct indentation)
2. Visitor pattern is not applied for all nodes as expected (sometimes
nodes just get traversed.. unnoticed by the visitor)
.. less important:
3. Num-Node didn't provide enough information (fixed by providing numType).
4. Comments may disappear

BeginColumn:
We would really appreciate some advise/help on this issue!
ClassDef/FunctionDef e.g. have correct beginColumn values... but e.g.
Assign-Nodes usually not.
Can someone check this behaviour and confirm ... give some advice how to
fix it or even provide a fix?

Visitor:
I wrote an AST rewriter visitor (AST -> source code, works quite well)
and noticed that *not* all AST nodes are "properly" handled by the
visitor pattern.

1. Is there any reason why some nodes shouldn't be noticed by the
visitor (accept(VisitorIF visitor) just traversing its "child" nodes,
not calling any visit...-method provided)
2. We would like to contribute our change proposals later ... is the
Jython/PyDev project working together? Where should be post change
proposals?

Currently certain nodes are handled differently, but it would be helpful
if the visitor would work like expected.
Please visit
http://sifsstud2.hsr.ch/peptic/wiki/Rewriter#Nodeswithoutvisitorcallback
for a more detailed description.

Num:
see http://sifsstud2.hsr.ch/peptic/wiki/Parser

Comments:
see http://sifsstud2.hsr.ch/peptic/wiki/Parser


Thanks,
    Ueli Kistler, Dennis Hunziker
    http://sifsstud2.hsr.ch



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
pydev-code mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pydev-code

Reply via email to