summaryrefslogtreecommitdiffstats
path: root/Python/graminit.c
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2004-08-17 17:29:16 (GMT)
committerMichael W. Hudson <mwh@python.net>2004-08-17 17:29:16 (GMT)
commit0ccff074cd806bc7e963a1e0ff6ce25e0d11cce9 (patch)
treec8e7be65d3051aa878fe53169b9bdeb4d3b4227e /Python/graminit.c
parentb51b23405b6cf82ab4ec20f3d5ef4b895bd0786f (diff)
downloadcpython-0ccff074cd806bc7e963a1e0ff6ce25e0d11cce9.zip
cpython-0ccff074cd806bc7e963a1e0ff6ce25e0d11cce9.tar.gz
cpython-0ccff074cd806bc7e963a1e0ff6ce25e0d11cce9.tar.bz2
This is Mark Russell's patch:
[ 1009560 ] Fix @decorator evaluation order From the description: Changes in this patch: - Change Grammar/Grammar to require newlines between adjacent decorators. - Fix order of evaluation of decorators in the C (compile.c) and python (Lib/compiler/pycodegen.py) compilers - Add better order of evaluation check to test_decorators.py (test_eval_order) - Update the decorator documentation in the reference manual (improve description of evaluation order and update syntax description) and the comment: Used Brett's evaluation order (see http://mail.python.org/pipermail/python-dev/2004-August/047835.html) (I'm checking this in for Anthony who was having problems getting SF to talk to him)
Diffstat (limited to 'Python/graminit.c')
-rw-r--r--Python/graminit.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/Python/graminit.c b/Python/graminit.c
index 1718096..f4f207e 100644
--- a/Python/graminit.c
+++ b/Python/graminit.c
@@ -51,41 +51,40 @@ static arc arcs_3_1[1] = {
};
static arc arcs_3_2[2] = {
{13, 3},
- {0, 2},
+ {2, 4},
};
static arc arcs_3_3[2] = {
- {14, 4},
- {15, 5},
+ {14, 5},
+ {15, 6},
};
static arc arcs_3_4[1] = {
- {15, 5},
+ {0, 4},
};
static arc arcs_3_5[1] = {
- {0, 5},
+ {15, 6},
};
-static state states_3[6] = {
+static arc arcs_3_6[1] = {
+ {2, 4},
+};
+static state states_3[7] = {
{1, arcs_3_0},
{1, arcs_3_1},
{2, arcs_3_2},
{2, arcs_3_3},
{1, arcs_3_4},
{1, arcs_3_5},
+ {1, arcs_3_6},
};
static arc arcs_4_0[1] = {
{10, 1},
};
static arc arcs_4_1[2] = {
- {2, 2},
- {10, 1},
-};
-static arc arcs_4_2[2] = {
{10, 1},
- {0, 2},
+ {0, 1},
};
-static state states_4[3] = {
+static state states_4[2] = {
{1, arcs_4_0},
{2, arcs_4_1},
- {2, arcs_4_2},
};
static arc arcs_5_0[2] = {
{16, 1},
@@ -1618,9 +1617,9 @@ static dfa dfas[74] = {
"\204\050\014\000\000\000\200\012\176\231\040\007\040\000\000\206\220\064\041\000"},
{258, "eval_input", 0, 3, states_2,
"\000\040\010\000\000\000\000\000\000\000\000\000\040\000\000\206\220\064\001\000"},
- {259, "decorator", 0, 6, states_3,
+ {259, "decorator", 0, 7, states_3,
"\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {260, "decorators", 0, 3, states_4,
+ {260, "decorators", 0, 2, states_4,
"\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
{261, "funcdef", 0, 7, states_5,
"\000\010\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},