summaryrefslogtreecommitdiff
path: root/x2p/a2py.c
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2009-10-23 00:27:57 +0200
committerRafael Garcia-Suarez <rgs@consttype.org>2009-10-23 00:27:57 +0200
commit19720b39a307f3ff449747dea71012038b7a8714 (patch)
treec85460cfd0be4242f223fd78269ed1f217aa4cd3 /x2p/a2py.c
parent871673162d98aa63f3298e094e8afb43bc4230df (diff)
downloadperl-19720b39a307f3ff449747dea71012038b7a8714.tar.gz
[perl #69838] a2p generates code using $[
Diffstat (limited to 'x2p/a2py.c')
-rw-r--r--x2p/a2py.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/x2p/a2py.c b/x2p/a2py.c
index 84fdc48737..286f7cc106 100644
--- a/x2p/a2py.c
+++ b/x2p/a2py.c
@@ -428,7 +428,7 @@ yylex(void)
}
for (d = s; isALPHA(*s) || isDIGIT(*s) || *s == '_'; )
s++;
- split_to_array = set_array_base = TRUE;
+ split_to_array = TRUE;
if (d != s)
{
yylval = string(d,s-d);
@@ -464,8 +464,6 @@ yylex(void)
case 'a': case 'A':
SNARFWORD;
- if (strEQ(d,"ARGC"))
- set_array_base = TRUE;
if (strEQ(d,"ARGV")) {
yylval=numary(string("ARGV",0));
XOP(VAR);
@@ -598,7 +596,6 @@ yylex(void)
if (strEQ(d,"in"))
XTERM(IN);
if (strEQ(d,"index")) {
- set_array_base = TRUE;
XTERM(INDEX);
}
if (strEQ(d,"int")) {
@@ -644,7 +641,6 @@ yylex(void)
case 'm': case 'M':
SNARFWORD;
if (strEQ(d,"match")) {
- set_array_base = TRUE;
XTERM(MATCH);
}
if (strEQ(d,"m"))
@@ -653,7 +649,7 @@ yylex(void)
case 'n': case 'N':
SNARFWORD;
if (strEQ(d,"NF"))
- do_chop = do_split = split_to_array = set_array_base = TRUE;
+ do_chop = do_split = split_to_array = TRUE;
if (strEQ(d,"next")) {
saw_line_op = TRUE;
XTERM(NEXT);
@@ -719,11 +715,9 @@ yylex(void)
case 's': case 'S':
SNARFWORD;
if (strEQ(d,"split")) {
- set_array_base = TRUE;
XOP(SPLIT);
}
if (strEQ(d,"substr")) {
- set_array_base = TRUE;
XTERM(SUBSTR);
}
if (strEQ(d,"sub"))
@@ -1204,7 +1198,6 @@ numary(int arg)
str_cat(key,"[]");
hstore(symtab,key->str_ptr,str_make("1"));
str_free(key);
- set_array_base = TRUE;
return arg;
}