- 03 Ock, 2003 1 kayıt (commit)
-
-
Michael W. Hudson yazdı
-
- 31 Ara, 2002 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
A variety of changes from Michael Hudson to get the compiler working with 2.3. The primary change is the handling of SET_LINENO: # The set_lineno() function and the explicit emit() calls for # SET_LINENO below are only used to generate the line number table. # As of Python 2.3, the interpreter does not have a SET_LINENO # instruction. pyassem treats SET_LINENO opcodes as a special case. A few other small changes: - Remove unused code from pycodegen and pyassem. - Fix error handling in parsermodule. When PyParser_SimplerParseString() fails, it sets an exception with detailed info. The parsermodule was clobbering that exception and replacing it was a generic "could not parse string" exception. Keep the original exception.
-
- 06 Haz, 2002 1 kayıt (commit)
-
-
Neal Norwitz yazdı
-
- 19 Nis, 2002 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
SF bug #522264 reported by Evelyn Mitchell. The code included a comment about "STAR STAR" which was translated into the code as the bogus attribute token.STARSTAR. This name never caused an attribute error because it was never retrieved. The code was based on an old version of the grammar that specified kwargs as two tokens ('*' '*'). I checked as far back as 2.1 and didn't find this production. The fix is simple, because token.DOUBLESTAR is the only token allowed. Also update the grammar fragment in com_arglist(). XXX I'll bet lots of other grammar fragments in comments are out of date, probably in this module and in compile.c.
-
- 28 Şub, 2002 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 21 Ara, 2001 1 kayıt (commit)
-
-
Barry Warsaw yazdı
-
- 18 Eki, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
-
- 17 Eki, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
-
- 17 Eyl, 2001 2 kayıt (commit)
-
-
Jeremy Hylton yazdı
compile() becomes replacement for builtin compile() compileFile() generates a .pyc from a .py both are exported in __init__ compiler.parse() gets optional second argument to specify compilation mode, e.g. single, eval, exec Add AbstractCompileMode as parent class and Module, Expression, and Interactive as concrete subclasses. Each corresponds to a compilation mode. THe AbstractCompileMode instances in turn delegate to CodeGeneration subclasses specialized for their particular functions -- ModuleCodeGenerator, ExpressionCodeGeneration, InteractiveCodeGenerator.
-
Jeremy Hylton yazdı
Remove the only test in the syntax module. It ends up that the transformer must handle this error case. In the transformer, check for a list compression in com_assign_list() by looking for a list_for node where a comma is expected. In pycodegen.compile() re-raise the SyntaxError rather than catching it and exiting
-
- 29 Agu, 2001 3 kayıt (commit)
-
-
Jeremy Hylton yazdı
-
Jeremy Hylton yazdı
Avoid if/elif/elif/else tests where the final else is supposed to handle exactly one case instead of all other cases. When the list of operators is extended, the catchall else treats all new operators as the last operator in the set of tests. Instead, raise an exception if an unexpected operator occurs.
-
Jeremy Hylton yazdı
-
- 27 Agu, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
The use of com_node() introduces a lot of extra stack frames, enough to cause a stack overflow compiling test.test_parser with the standard interpreter recursionlimit. The com_node() is a convenience function that hides the dispatch details, but comes at a very high cost. It is more efficient to dispatch directly in the callers. In these cases, use lookup_node() and call the dispatched node directly. Also handle yield_stmt in a way that will work with Python 2.1 (suggested by Shane Hathaway)
-
- 18 Agu, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
Fix Module() handler to avoid including the doc string in the AST
-
- 11 Nis, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
-
- 09 Nis, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
Fix com_NEWLINE() so that is accepts arguments, which occurs for lines like: stmt; # note trailing semicolon Add XXX about checking for assignment to list comps
-
- 06 Kas, 2000 2 kayıt (commit)
-
-
Jeremy Hylton yazdı
further optimization of com_node makes the most difference.
-
Jeremy Hylton yazdı
the function's body. If assert is used without an error message, make the AST node None rather than Name('None').
-
- 25 Eki, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
Reformatting -- long lines, "[ ]" -> "[]", a few indentation nits. Replace calls to Node function (which constructed ast nodes) with calls to actual constructors imported from ast module. Optimize com_node (most frequently used method) for the common case -- the appropriate method is found in _dispatch. Fix com_augassign to use class object's rather than node names (rendered invalid by recent changes to ast) Remove expensive tests for sequence-ness in com_stmt and com_append_stmt. These tests should never fail; if they do, something is really broken and exception will be raised elsewhere. Fix com_stmt and com_append_stmt to use isinstance rather than testing's type slot of ast node (this slot disappeared with recent changes to ast).
-
- 13 Eki, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
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
-
- 12 Eki, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
transformer.py: return '*', None from com_import_as_name pycodegen.py: special case for name == '*' pyassem.py: fix stack counting for IMPORT_ opcodes
-
- 20 Eyl, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
-
- 01 Eyl, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
Fix import support to work with import as variant of Python 2.0. The grammar for import changed, requiring changes in transformer and code generator, even to handle compilation of imports with as.
-
- 04 Agu, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
fix com_call_function to cope with trailing comma in "f(a, b,)"
-
- 03 Agu, 2000 1 kayıt (commit)
-
-
Greg Stein yazdı
(too lazy to paste in the whole BSD license tho; included by ref)
-
- 02 May, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
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.
-
- 16 Mar, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
-
- 06 Mar, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
add doc string to transformer module add two helper functions: parse(buf) -> AST parseFile(path) -> AST
-
- 16 Şub, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
get the lineno from the name of the keyword arg example of case that didn't work-- def foo(x, y, a = None, b = None):
-
- 15 Şub, 2000 2 kayıt (commit)
-
-
Jeremy Hylton yazdı
-
Jeremy Hylton yazdı
-
- 14 Şub, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
should be calls to BUILD_ ops for these types with no arguments
-
- 08 Şub, 2000 2 kayıt (commit)
-
-
Jeremy Hylton yazdı
-
Jeremy Hylton yazdı
add varargs and kwargs attributes to Function nodes
-
- 04 Şub, 2000 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
revision number the p2c cvs tree. COPYRIGHT: 1.1 ast.py: 1.3 transformer.py: 1.11
-