コード例 #1
0
ファイル: parser.c プロジェクト: jmhossler/proglang
// statement: ifStatement
//          | whileLoop
//          | expression SEMI
Lexeme *statement(Parser *p) {
  if(ifStatementPending(p)) {
    return ifStatement(p);
  } else if(whileLoopPending(p)) {
    return whileLoop(p);
  } else {
    Lexeme *a = expression(p);
    match(p,SEMI);
    return a;
  }
}
コード例 #2
0
ファイル: 09_03.c プロジェクト: cy2296/coding
int main(void) {
	whileLoop(1);
	//getInputData();
	return EXIT_SUCCESS;
}