diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-27 14:41:58 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-27 14:41:58 -0300 |
commit | 282ab366f4ffe00fc8006f90d2ac6798e9c78d92 (patch) | |
tree | b36b67e07e156c93abdfce8d0bc7b61dd6e19e46 /lparser.c | |
parent | 444d6a106bdad894808288fc2594ff0b0eac6cba (diff) | |
download | lua-282ab366f4ffe00fc8006f90d2ac6798e9c78d92.tar.gz lua-282ab366f4ffe00fc8006f90d2ac6798e9c78d92.tar.bz2 lua-282ab366f4ffe00fc8006f90d2ac6798e9c78d92.zip |
bug: parser overwrites semantic information when looking ahead
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 1.111 2000/08/31 14:08:27 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.112 2000/09/20 17:57:08 roberto Exp roberto $ |
3 | ** LL(1) Parser and code generator for Lua | 3 | ** LL(1) Parser and code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -60,13 +60,13 @@ static void next (LexState *ls) { | |||
60 | ls->lookahead.token = TK_EOS; /* and discharge it */ | 60 | ls->lookahead.token = TK_EOS; /* and discharge it */ |
61 | } | 61 | } |
62 | else | 62 | else |
63 | ls->t.token = luaX_lex(ls); /* read next token */ | 63 | ls->t.token = luaX_lex(ls, &ls->t.seminfo); /* read next token */ |
64 | } | 64 | } |
65 | 65 | ||
66 | 66 | ||
67 | static void lookahead (LexState *ls) { | 67 | static void lookahead (LexState *ls) { |
68 | LUA_ASSERT(ls->lookahead.token == TK_EOS, "two look-aheads"); | 68 | LUA_ASSERT(ls->lookahead.token == TK_EOS, "two look-aheads"); |
69 | ls->lookahead.token = luaX_lex(ls); | 69 | ls->lookahead.token = luaX_lex(ls, &ls->lookahead.seminfo); |
70 | } | 70 | } |
71 | 71 | ||
72 | 72 | ||