summaryrefslogtreecommitdiffstats
path: root/src/cmd/lex/parser.y
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-04-20 20:24:00 +0000
committerrsc <devnull@localhost>2006-04-20 20:24:00 +0000
commit0afb7989d3ffb6d95133d62939edb688246f5cc0 (patch)
treefb95b4bc9b31aade19e67d14abf286dde87f2712 /src/cmd/lex/parser.y
parent4515de8f502e7784d7901ef42ca3e4cecae07a09 (diff)
downloadplan9port-0afb7989d3ffb6d95133d62939edb688246f5cc0.tar.gz
plan9port-0afb7989d3ffb6d95133d62939edb688246f5cc0.zip
64-bit safe (from plan9)
Diffstat (limited to 'src/cmd/lex/parser.y')
-rw-r--r--src/cmd/lex/parser.y9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cmd/lex/parser.y b/src/cmd/lex/parser.y
index 8e7285d0..2d57e3f3 100644
--- a/src/cmd/lex/parser.y
+++ b/src/cmd/lex/parser.y
@@ -120,13 +120,13 @@ r: CHAR
}
else
p = psave;
- $$.i = mn1(RCCL,(int)p);
+ $$.i = mnp(RCCL,p);
cclinter(1);
}
| CCL
- ={ $$.i = mn1(RCCL,$1.i); }
+ ={ $$.i = mnp(RCCL,$1.cp); }
| NCCL
- ={ $$.i = mn1(RNCCL,$1.i); }
+ ={ $$.i = mnp(RNCCL,$1.cp); }
| r '*'
={ $$.i = mn1(STAR,$1.i); }
| r '+'
@@ -253,7 +253,8 @@ yylex(void)
right = myalloc(treesize,sizeof(*right));
nullstr = myalloc(treesize,sizeof(*nullstr));
parent = myalloc(treesize,sizeof(*parent));
- if(name == 0 || left == 0 || right == 0 || parent == 0 || nullstr == 0)
+ ptr = myalloc(treesize,sizeof(*ptr));
+ if(name == 0 || left == 0 || right == 0 || parent == 0 || nullstr == 0 || ptr == 0)
error("Too little core for parse tree");
return(freturn(DELIM));
case 'p': case 'P': /* has overridden number of positions */