summaryrefslogtreecommitdiffstats
path: root/Tools/compiler/astgen.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix calculation of hardest_arg.Jeremy Hylton2001-09-171-3/+3
| | | | | | | | | The argument properties are ordered from easiest to hardest. The harder the arg, the more complicated that code that must be generated to return it from getChildren() and/or getChildNodes(). The old calculation routine was bogus, because it always set hardest_arg to the hardness of the last argument. Now use max() to always set it to the hardness of the hardest argument.
* Revise implementations of getChildren() and getChildNodes().Jeremy Hylton2001-08-291-18/+112
| | | | | | | | | | | | | | | | Add support for floor division (// and //=) The implementation of getChildren() and getChildNodes() is intended to be faster, because it avoids calling flatten() on every return value. But it's not clear that it is a lot faster, because constructing a tuple with just the right values ends up being slow. (Too many attribute lookups probably.) The ast.txt file is much more complicated, with funny characters at the ends of names (*, &, !) to indicate the types of each child node. The astgen script is also much more complex, making me wonder if it's still useful.
* Generate correct reprs for Mul, Add, etc.Jeremy Hylton2001-08-181-0/+2
|
* Fix typo in astgen scriptJeremy Hylton2001-08-141-1/+1
|
* Add getChildNodes() method to NodeJeremy Hylton2001-08-141-0/+2
|
* Support for generation of ast.py from simple description of nodeJeremy Hylton2000-10-251-0/+182
structure (ast.txt). Usage is python astgen.py > ast.py.