Searched refs:inloop (Results 1 – 2 of 2) sorted by relevance
| /plan9/sys/src/cmd/awk/ |
| H A D | awkgram.y | 38 int inloop = 0; /* = 1 if in while, for, do */ variable 126 FOR '(' opt_simple_stmt ';' opt_nl pattern ';' opt_nl opt_simple_stmt rparen {inloop++;} stmt 127 { --inloop; $$ = stat4(FOR, $3, notnull($6), $9, $12); } 128 | FOR '(' opt_simple_stmt ';' ';' opt_nl opt_simple_stmt rparen {inloop++;} stmt 129 { --inloop; $$ = stat4(FOR, $3, NIL, $7, $10); } 130 | FOR '(' varname IN varname rparen {inloop++;} stmt 131 { --inloop; $$ = stat3(IN, $3, makearr($5), $8); } 319 BREAK st { if (!inloop) SYNTAX("break illegal outside of loops"); 322 | CONTINUE st { if (!inloop) SYNTAX("continue illegal outside of loops"); 324 | do {inloop++;} stmt {--inloop;} WHILE '(' pattern ')' st [all …]
|
| H A D | awkgram.c | 15 int inloop = 0; /* = 1 if in while, for, do */ variable 1172 {inloop++;} break; in yyparse() 1175 { --inloop; yyval.p = stat4(FOR, yypt[-9].yyv.p, notnull(yypt[-6].yyv.p), yypt[-3].yyv.p, yypt[-0].… in yyparse() 1178 {inloop++;} break; in yyparse() 1181 { --inloop; yyval.p = stat4(FOR, yypt[-7].yyv.p, NIL, yypt[-3].yyv.p, yypt[-0].yyv.p); } break; in yyparse() 1184 {inloop++;} break; in yyparse() 1187 { --inloop; yyval.p = stat3(IN, yypt[-5].yyv.p, makearr(yypt[-3].yyv.p), yypt[-0].yyv.p); } break; in yyparse() 1395 { if (!inloop) SYNTAX("break illegal outside of loops"); in yyparse() 1402 { if (!inloop) SYNTAX("continue illegal outside of loops"); in yyparse() 1406 {inloop++;} break; in yyparse() [all …]
|