コード例 #1
0
ファイル: parse.c プロジェクト: dburger/archive
/* (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;
}
コード例 #2
0
ファイル: while.c プロジェクト: An-S/testsuite
int
main (void)
{

	opentest(OUTFILE);

  while1 ();


  success = failures;
  done ();
  fprintf(outfile,"failures: %d\n",failures);
	closetest(THISFILE);

    return (0);
}
コード例 #3
0
ファイル: check.c プロジェクト: NegMozzie/42
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;
}
コード例 #4
0
ファイル: check.c プロジェクト: NegMozzie/42
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;
}