예제 #1
0
void Block(char *exit_label)
{
	while ( (Look != 'e') && (Look !='l') && (Look !='u') ) {
		Fin();
		printf("# BLOCK start\n");
		switch (Look) {
		case 'i':
			DoIf(exit_label);
			break;
		case 'w':
			DoWhile();
			break;
		case 'p':
			DoLoop();
			break;
		case 'r':
			DoRepeat();
			break;
		case 'f':
			DoFor();
			break;
		case 'd':
			DoDo();
			break;
		case 'b':
			DoBreak(exit_label);
			break;
		default:
			Assignment();
			break;
		}
		Fin();
		printf("# BLOCK end\n");
	}
}
예제 #2
0
void Block(char *L)
{
    while (! strchr("elu", Look)) {
        dprint("Block: get Look = %c\n", Look);
        switch (Look) {
            case 'i':
                DoIf(L);
                break;
            case 'w':
                DoWhile();
                break;
            case 'p':
                DoLoop();
                break;
            case 'r':
                DoRepeat();
                break;
            case 'f':
                DoFor();
                break;
            case 'd':
                DoDo();
                break;
            case 'b':
                DoBreak(L);
            default:
                Assignment();
                break;
        }
        /* this is for convinent, otherwise newline character will
        cause an error */
        /*Newline();*/
        Fin();
    }
}
예제 #3
0
void Block() {
  while(Look != 'e' && Look !='l' && Look != 'u') {
    Fin();
    switch(Look) {
      case 'i': DoIf(); break;
      case 'w': DoWhile(); break;
      case 'p': DoLoop(); break;
      case 'r': DoRepeat(); break;
      case 'f': DoFor(); break;
      default : Assignment(); break;
    }
  }
}