Download PDF Version

Transcript
pushl_stateitem:
pushl_statement { $$ = /* implied body: */
TREE2("pl_state_action", mkstring("body"), PL_LINEPOINT($1));
}
| sd_id ss_colon pushl_statement { $$ =
TREE2("pl_state_action", $1, PL_LINEPOINT($3));
}
| s_exit ss_colon pushl_statement { $$ =
TREE2("pl_state_action", mkstring("exit"), PL_LINEPOINT($3));
}
| pushl_statespec ss_rarrow1 pushl_statespec ss_semicolon { $$ =
TREE3("pl_transition", $1, $3, TREE0("NONE"));
}
| pushl_statespec ss_rarrow1 pushl_statespec ss_colon pushl_statement { $$ =
TREE3("pl_transition", $1, $3, TREE1("SOME", PL_LINEPOINT($5)));
}
;
string_option:
/* nothing */ { $$ = TREE0("NONE"); }
| sd_string ss_colon { $$ = TREE1("SOME", $1); }
;
pushl_statespec:
exp { $$ =
TREE1("pl_state_exp", $1);
}
| s_exit{ $$ =
TREE0("pl_state_exit");
}
| s_exit ss_lpar sd_id ss_rpar{ $$ =
TREE1("pl_state_tagged_exit", $3);
}
;
/*
*
*/
sd_id_comma_list:
/* nothing */
{ $$ =
LISTEND(0);
}
| sd_id { $$ = LISTCONS($1, LISTEND(0)); }
| sd_id ss_comma sd_id_comma_list { $$ = LISTCONS($1, $3); }
;
exp12_comma_list:
exp12 { $$ = LISTCONS($1, LISTEND(0)); }
| exp12 ss_comma exp12_comma_list { $$ = LISTCONS($1, $3); }
;
exp_comma_list:
exp { $$ =
LISTCONS($1, LISTEND(0));
}
| exp ss_comma exp_comma_list
{ $$ =
LISTCONS($1, $3);
}
;
pl_formal:
exp ss_colon exp { $$ =
TREE2("pl_formal", $1, $3);
}
| exp { $$ =
TREE1("pl_formal_nt", $1);
}
;
formal_comma_list:
pl_formal { $$ =
LISTCONS($1, LISTEND(0));
}
| pl_formal ss_comma formal_comma_list
40