/* (9) WHILE2 ::= WHILE1 EXP ) */ int while2() { if(test&2) printf("Enter while2--this=%d next=%d\n", this, next); if (!while1()) return F; if (!exp()) return F; if (this!=RPAREN) return F; step(); /* past RPAREN */ reduce(9); if(test&2) printf("Leave while2\n"); return T; }
int main (void) { opentest(OUTFILE); while1 (); success = failures; done (); fprintf(outfile,"failures: %d\n",failures); closetest(THISFILE); return (0); }
int checkiobl(t_gameroom *game, char c) { int i; int j; i = 0; j = (game->cord)[1] - 1; while (i < (game->cord)[0] && j >= 0) { if (while1(game, c, i, j)) return(1); if (j) j--; else i++; } return 0; }
int checkobl(t_gameroom *game, char c) { int i; int j; i = 0; j = 0; while (i < (game->cord)[0] && j < (game->cord)[1]) { if (while1(game, c, i, j)) return(1); if (i == (game->cord)[0] - 1) j++; else i++; } return 0; }