summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/ast.py
Commit message (Collapse)AuthorAgeFilesLines
* Generate correct reprs for Mul, Add, etc.Jeremy Hylton2001-08-181-20/+8
|
* Add Yield() nodeJeremy Hylton2001-08-181-0/+12
|
* Fix typo in astgen scriptJeremy Hylton2001-08-141-1/+1
|
* Regenerated from new ast.txt and new astgen.pyJeremy Hylton2001-08-141-12/+23
|
* Generated from rev 1.1 of ast.txtJeremy Hylton2000-10-251-677/+606
|
* Now supports entire Python 2.0 language and still supports PythonJeremy Hylton2000-10-131-6/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.5.2. The compiler generates code for the version of the interpreter it is run under. ast.py: Print and Printnl add dest attr for extended print new node AugAssign for augmented assignments new nodes ListComp, ListCompFor, and ListCompIf for list comprehensions pyassem.py: add work around for string-Unicode comparison raising UnicodeError on comparison of two objects in code object's const table pycodegen.py: define VERSION, the Python major version number get magic number using imp.get_magic() instead of hard coding implement list comprehensions, extended print, and augmented assignment; augmented assignment uses Delegator classes (see doc string) fix import and tuple unpacking for 1.5.2 transformer.py: various changes to support new 2.0 grammar and old 1.5 grammar add debug_tree helper than converts and symbol and token numbers to their names
* patches from Mark HammondJeremy Hylton2000-05-021-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attached is a set of diffs for the .py compiler that adds support for the new extended call syntax. compiler/ast.py: CallFunc node gets 2 new children to support extended call syntax - "star_args" (for "*args") and "dstar_args" (for "**args") compiler/pyassem.py It appear that self.lnotab is supposed to be responsible for tracking line numbers, but self.firstlineno was still hanging around. Removed self.firstlineno completely. NOTE - I didnt actually test that the generated code has the correct line numbers!! Stack depth tracking appeared a little broken - the checks never made it beyond the "self.patterns" check - thus, the custom methods were never called! Fixed this. (XXX Jeremy notes: I think this code is still broken because it doesn't track stack effects across block bounaries.) Added support for the new extended call syntax opcodes for depth calculations. compiler/pycodegen.py Added support for the new extended call syntax opcodes. compiler/transformer.py Added support for the new extended call syntax.
* change node Classdef to ClassJeremy Hylton2000-03-061-4/+4
| | | | | | | add doc string to transformer module add two helper functions: parse(buf) -> AST parseFile(path) -> AST
* add varargs and kwargs flags to Lambda nodesJeremy Hylton2000-02-171-0/+5
|
* tidy up tryexcept and tryfinally nodesJeremy Hylton2000-02-151-14/+20
|
* LeftShift & RightShift: fix reprs, change attr names to left and rightJeremy Hylton2000-02-141-10/+10
| | | | (so they are common with other binary ops)
* rename several of the generic attribute names for nodes. new node attrs are:Jeremy Hylton2000-02-141-12/+12
| | | | | | Exec: expr, locals, globals Dict: items Assert: test, fail
* make all unary operators have a single child node called exprJeremy Hylton2000-02-081-4/+4
|
* move constants out of transformer so that they can be shared with astJeremy Hylton2000-02-081-0/+7
| | | | add varargs and kwargs attributes to Function nodes
* three files from the p2c cvs tree. the message here indicates theJeremy Hylton2000-02-041-0/+689
revision number the p2c cvs tree. COPYRIGHT: 1.1 ast.py: 1.3 transformer.py: 1.11