Exemple #1
0
void parse_FuncDeclIdList() {
  printf("Enter FuncDeclIdList\n");
  if (nextToken == T_ID) {
    nextToken = getToken();
    parse_FuncDeclIdList_dash();
  }
}
Exemple #2
0
void parse_FuncDeclIdList_dash() {
  printf("Enter FuncDeclIdList_dash\n");
  if (nextToken == T_COMMA) {
    nextToken = getToken();
    if (nextToken != T_ID) pl0parse_error("not id)");
    nextToken = getToken();
    parse_FuncDeclIdList_dash();
  }
}
void parse_FuncDeclIdList() {
  /* <FuncDeclIdList> -> T_ID <FuncDeclIdList_dash> | ε */
  printf("Enter FuncDeclIdList\n");
  if (nextToken == T_ID) {
    nextToken = getToken();
    parse_FuncDeclIdList_dash();
  }
  printf("Exit  FuncDeclIdList\n");
}
void parse_FuncDeclIdList_dash() {
  /* <FuncDeclIdList_dash> -> T_COMMA T_ID <FuncDeclIdList_dash> | ε */
  printf("Enter FuncDeclIdList_dash\n");
  if (nextToken == T_COMMA) {
    nextToken = getToken();
    if (nextToken != T_ID) pl0_error(yytext, line_no, "仮引数名でない");
    nextToken = getToken();
    parse_FuncDeclIdList_dash();
  }
  printf("Exit  FuncDeclIdList_dash\n");
}