diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-05-23 22:08:09 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-05-23 22:08:09 +0300 |
commit | aaa99f290eb5767eb3de3cab066427ba61d2c6b0 (patch) | |
tree | 10a2e26a4f40c96900a5d36a96e593ebdd84097c /awkgram.y | |
parent | 7586c955f6e1b4c50614ca59c880369860298134 (diff) | |
download | egawk-aaa99f290eb5767eb3de3cab066427ba61d2c6b0.tar.gz egawk-aaa99f290eb5767eb3de3cab066427ba61d2c6b0.tar.bz2 egawk-aaa99f290eb5767eb3de3cab066427ba61d2c6b0.zip |
Allow newline after comma in range expressions.
Diffstat (limited to 'awkgram.y')
-rw-r--r-- | awkgram.y | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -289,30 +289,30 @@ pattern { $$ = NULL; rule = Rule; } | exp { $$ = $1; rule = Rule; } - | exp ',' exp + | exp ',' opt_nls exp { INSTRUCTION *tp; add_lint($1, LINT_assign_in_cond); - add_lint($3, LINT_assign_in_cond); + add_lint($4, LINT_assign_in_cond); tp = instruction(Op_no_op); list_prepend($1, bcalloc(Op_line_range, !!do_profiling + 1, 0)); $1->nexti->triggered = FALSE; - $1->nexti->target_jmp = $3->nexti; + $1->nexti->target_jmp = $4->nexti; list_append($1, instruction(Op_cond_pair)); $1->lasti->line_range = $1->nexti; $1->lasti->target_jmp = tp; - list_append($3, instruction(Op_cond_pair)); - $3->lasti->line_range = $1->nexti; - $3->lasti->target_jmp = tp; + list_append($4, instruction(Op_cond_pair)); + $4->lasti->line_range = $1->nexti; + $4->lasti->target_jmp = tp; if (do_profiling) { ($1->nexti + 1)->condpair_left = $1->lasti; - ($1->nexti + 1)->condpair_right = $3->lasti; + ($1->nexti + 1)->condpair_right = $4->lasti; } - $$ = list_append(list_merge($1, $3), tp); + $$ = list_append(list_merge($1, $4), tp); rule = Rule; } | LEX_BEGIN |