Using PLY

Maurice LING mauriceling at acm.org
Sun Sep 19 19:12:32 EDT 2004


> 
> PLY can do much more then line counting. Build an AST then just count 
> your IF tokens. If you can use ply to recognise your if tokens, then you 
> can easility count them.

How do I build an AST with PLY? I'm trying to find some examples of that 
but unsuccessful.

> 
> It's kinda vague what you are wanting to do ? Is it source code you are 
> parsing or text with keywords ?
> 

I'm trying to parse what looks like a 4GL source code.



More information about the Python-list mailing list