Index: Grammar/Grammar =================================================================== --- Grammar/Grammar (revision 67472) +++ Grammar/Grammar (working copy) @@ -31,6 +31,14 @@ file_input: (NEWLINE | stmt)* ENDMARKER eval_input: testlist NEWLINE* ENDMARKER +# +# not used in grammar, but may appear in "node" passed from Parser to Compiler +# +# NOTE: This should always be the first non-terminal declaration. Otherwise, +# changes to the syntax may cause a SystemError in PyAST_FromNode. +# +encoding_decl: NAME + decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE decorators: decorator+ decorated: decorators (classdef | funcdef) @@ -145,7 +153,5 @@ testlist1: test (',' test)* -# not used in grammar, but may appear in "node" passed from Parser to Compiler -encoding_decl: NAME +yield_expr: 'yield' [testlist] -yield_expr: 'yield' [testlist] Index: Makefile.pre.in =================================================================== --- Makefile.pre.in (revision 67472) +++ Makefile.pre.in (working copy) @@ -1195,6 +1195,12 @@ # Dependencies +$(srcdir)/Modules/cPickle.c: $(GRAMMAR_H) + +$(srcdir)/Python/compile.c $(srcdir)/Python/bltinmodule.c $(srcdir)/Python/symtable.c $(srcdir)/Python/pythonrun.c $(srcdir)/Python/import.c $(srcdir)/Python/peephole.c $(srcdir)/Modules/symtablemodule.c: $(AST_H) + +$(srcdir)/Python/ast.c $(srcdir)/Python/future.c $(srcdir)/Modules/parsermodule.c: $(AST_H) $(GRAMMAR_H) + Python/thread.o: @THREADHEADERS@ # Declare targets that aren't real files