[pypy-svn] r63757 - pypy/branch/classdeco/pypy/interpreter/pyparser/data

benjamin at codespeak.net benjamin at codespeak.net
Tue Apr 7 00:47:43 CEST 2009


Author: benjamin
Date: Tue Apr  7 00:47:42 2009
New Revision: 63757

Modified:
   pypy/branch/classdeco/pypy/interpreter/pyparser/data/Grammar2.5
Log:
make the 2.5 grammar like 2.6, so test_compiler works

Modified: pypy/branch/classdeco/pypy/interpreter/pyparser/data/Grammar2.5
==============================================================================
--- pypy/branch/classdeco/pypy/interpreter/pyparser/data/Grammar2.5	(original)
+++ pypy/branch/classdeco/pypy/interpreter/pyparser/data/Grammar2.5	Tue Apr  7 00:47:42 2009
@@ -33,7 +33,8 @@
 
 decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE
 decorators: decorator+
-funcdef: [decorators] 'def' NAME parameters ':' suite
+decorated: decorators funcdef
+funcdef: 'def' NAME parameters ':' suite
 parameters: '(' [varargslist] ')'
 varargslist: ((fpdef ['=' test] ',')*
               ('*' NAME [',' '**' NAME] | '**' NAME) |
@@ -73,7 +74,7 @@
 exec_stmt: 'exec' expr ['in' test [',' test]]
 assert_stmt: 'assert' test [',' test]
 
-compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef | classdef
+compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef | classdef | decorated
 if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite]
 while_stmt: 'while' test ':' suite ['else' ':' suite]
 for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite]



More information about the Pypy-commit mailing list