[Docstring-develop] RE: [Python-Dev] AST mining (was Re: Direction of PyChecker)
Status: Pre-Alpha
Brought to you by:
goodger
From: Jeremy H. <je...@zo...> - 2001-08-14 15:29:14
|
>>>>> "TP" == Tim Peters <ti...@ho...> writes: TP> Let me suggest you don't really want an AST -- you want an TP> object model for Python source that answers the questions above TP> directly. Agreed. TP> directly. An AST may be an effective (under the covers) TP> implementation technique to get such info, but if you don't want TP> to wait for people to argue about "the right" AST and "the TP> right" tree-based query language to make it better than TP> completely useless <wink>, you can answer all the stuff above by TP> building on tokenize.py now. I wouldn't wait for people to argue about the right AST either. Use the one Greg and Bill came up with for p2c. It's in Tools/compiler in the Python distribution. It's much simpler than the parse tree produced by the parser module. And, as far as I know, no one is advocating a different AST. It doesn't have a query language, but neither does tokenize.py <wink>. Jeremy |