summaryrefslogtreecommitdiff
path: root/perly.tab
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2006-05-27 00:31:33 +0000
committerDave Mitchell <davem@fdisolutions.com>2006-05-27 00:31:33 +0000
commit0539ab63267d5a989c8b513c410c39b33c15aa25 (patch)
tree4b261a2116ec9b899d95950017ddde2b4964f1d7 /perly.tab
parenta8ff2fa6faa01a256e2aff8c5e61378859eb3d62 (diff)
downloadperl-0539ab63267d5a989c8b513c410c39b33c15aa25.tar.gz
stop OPs leaking in eval "syntax error"
When bison pops states during error recovery, any states holding an OP would leak the OP. Create an extra YY table that tells us which states are of type opval, and when popping one of those, free the op. p4raw-id: //depot/perl@28315
Diffstat (limited to 'perly.tab')
-rw-r--r--perly.tab27
1 files changed, 27 insertions, 0 deletions
diff --git a/perly.tab b/perly.tab
index 18c162424f..d1807d76f8 100644
--- a/perly.tab
+++ b/perly.tab
@@ -884,3 +884,30 @@ static const unsigned char yystos[] =
96, 105, 105, 99, 96, 78, 96, 108, 105, 81,
112, 105, 113, 77, 77, 96, 96, 102
};
+/* which symbols are of type opval */
+static const int yy_is_opval[] =
+{
+ 0, 0, 0, 0, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0, 1,
+ 0, 0, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 0, 1, 1, 1,
+ 1, 1, 1, 0, 0, 0, 1,
+ 1, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 0,
+ 0, 0, 1, 1, 1, 0, 1, 1,
+ 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 0
+
+};