diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2022-03-27 07:58:02 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2022-03-27 07:58:02 +0300 |
commit | 656b5bbec59a3094ae13f3bdac7ae2ef1e2fb5e9 (patch) | |
tree | ae405ed62c0e40cf5afb2aa08221019e143bd3b8 /awkgram.c | |
parent | 6739849e21c5bfd849b0c4029c2950902e7656af (diff) | |
download | egawk-656b5bbec59a3094ae13f3bdac7ae2ef1e2fb5e9.tar.gz egawk-656b5bbec59a3094ae13f3bdac7ae2ef1e2fb5e9.tar.bz2 egawk-656b5bbec59a3094ae13f3bdac7ae2ef1e2fb5e9.zip |
Fix nested indirect calls, add test case.
Diffstat (limited to 'awkgram.c')
-rw-r--r-- | awkgram.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -156,7 +156,7 @@ static void merge_comments(INSTRUCTION *c1, INSTRUCTION *c2); static INSTRUCTION *make_braced_statements(INSTRUCTION *lbrace, INSTRUCTION *stmts, INSTRUCTION *rbrace); static void add_sign_to_num(NODE *n, char sign); -static bool at_seen = false; +static int at_seen = 0; static bool want_source = false; static bool want_namespace = false; static bool want_regexp = false; /* lexical scanning kludge */ @@ -2056,7 +2056,7 @@ yyreduce: #line 301 "awkgram.y" { want_source = false; - at_seen = false; + at_seen--; if (yyvsp[-1] != NULL && yyvsp[0] != NULL) { SRCFILE *s = (SRCFILE *) yyvsp[-1]; s->comment = yyvsp[0]; @@ -2070,7 +2070,7 @@ yyreduce: #line 311 "awkgram.y" { want_source = false; - at_seen = false; + at_seen--; if (yyvsp[-1] != NULL && yyvsp[0] != NULL) { SRCFILE *s = (SRCFILE *) yyvsp[-1]; s->comment = yyvsp[0]; @@ -2097,7 +2097,7 @@ yyreduce: want_source = false; want_namespace = false; - at_seen = false; + at_seen--; // this frees $3 storage in all cases set_namespace(yyvsp[-1], yyvsp[0]); @@ -2328,7 +2328,7 @@ yyreduce: #line 505 "awkgram.y" { yyval = yyvsp[0]; - at_seen = false; + at_seen--; } #line 2334 "awkgram.c" break; @@ -4297,7 +4297,7 @@ regular_print: */ yyval = list_prepend(yyvsp[0], t); - at_seen = false; + at_seen--; } #line 4303 "awkgram.c" break; @@ -6298,7 +6298,7 @@ retry: goto collect_regexp; } pushback(); - at_seen = true; + at_seen++; return lasttok = '@'; case '\\': |