293 octal_digit |
293 octal_digit |
294 hex_digit |
294 hex_digit |
295 */ |
295 */ |
296 %token <ID> identifier_token |
296 %token <ID> identifier_token |
297 %type <leaf> identifier |
297 %type <leaf> identifier |
298 %token INVALID_IDENTIFIER |
|
299 |
298 |
300 /*********************/ |
299 /*********************/ |
301 /* B 1.2 - Constants */ |
300 /* B 1.2 - Constants */ |
302 /*********************/ |
301 /*********************/ |
303 %type <leaf> constant |
302 %type <leaf> constant |
5065 |
5065 |
5066 |
5066 |
5067 |
5067 |
5068 action: |
5068 action: |
5069 // ACTION identifier ':' ... |
5069 // ACTION identifier ':' ... |
5070 ACTION action_name ':' {cmd_goto_body_state();} function_block_body END_ACTION |
5070 ACTION action_name {cmd_goto_body_state();} action_body END_ACTION |
5071 {$$ = new action_c($2, $5, locloc(@$));} |
5071 {$$ = new action_c($2, $4, locloc(@$));} |
5072 /* ERROR_CHECK_BEGIN */ |
5072 /* ERROR_CHECK_BEGIN */ |
5073 | ACTION ':' {cmd_goto_body_state();} function_block_body END_ACTION |
5073 | ACTION {cmd_goto_body_state();} action_body END_ACTION |
5074 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "no action name defined in action declaration."); yynerrs++;} |
5074 {$$ = NULL; print_err_msg(locl(@1), locf(@3), "no action name defined in action declaration."); yynerrs++;} |
5075 | ACTION error ':' {cmd_goto_body_state();} function_block_body END_ACTION |
5075 | ACTION error {cmd_goto_body_state();} action_body END_ACTION |
5076 {$$ = NULL; print_err_msg(locf(@2), locl(@2), "invalid action name defined in action declaration."); yyerrok;} |
5076 {$$ = NULL; print_err_msg(locf(@2), locl(@2), "invalid action name defined in action declaration."); yyerrok;} |
5077 | ACTION action_name {cmd_goto_body_state();} function_block_body END_ACTION |
5077 | ACTION action_name {cmd_goto_body_state();} function_block_body END_ACTION |
5078 {$$ = NULL; print_err_msg(locl(@2), locf(@4), "':' missing after action name in action declaration."); yynerrs++;} |
5078 {$$ = NULL; print_err_msg(locl(@2), locf(@4), "':' missing after action name in action declaration."); yynerrs++;} |
5079 | ACTION action_name ':' END_ACTION |
5079 /*| ACTION action_name {cmd_goto_body_state();} action_body END_OF_INPUT |
5080 {$$ = NULL; print_err_msg(locl(@3), locf(@4), "no body defined in action declaration."); yynerrs++;} |
5080 {$$ = NULL; print_err_msg(locf(@1), locl(@2), "unclosed action declaration."); yyerrok;}*/ |
5081 /*| ACTION action_name ':' {cmd_goto_body_state();} function_block_body END_OF_INPUT |
|
5082 {$$ = NULL; print_err_msg(locf(@1), locl(@3), "unclosed action declaration."); yyerrok;}*/ |
|
5083 | ACTION error END_ACTION |
5081 | ACTION error END_ACTION |
5084 {$$ = NULL; print_err_msg(locf(@2), locl(@2), "unknown error in action declaration."); yyerrok;} |
5082 {$$ = NULL; print_err_msg(locf(@2), locl(@2), "unknown error in action declaration."); yyerrok;} |
|
5083 /* ERROR_CHECK_END */ |
|
5084 ; |
|
5085 |
|
5086 action_body: |
|
5087 ':' function_block_body |
|
5088 {$$ = $2;} |
|
5089 /* ERROR_CHECK_BEGIN */ |
|
5090 | ':' error |
|
5091 {$$ = NULL; |
|
5092 if (is_current_syntax_token()) {print_err_msg(locl(@1), locf(@2), "no body defined in action declaration.");} |
|
5093 else {print_err_msg(locf(@2), locl(@2), "invalid body defined in action declaration."); yyclearin;} |
|
5094 yyerrok; |
|
5095 } |
5085 /* ERROR_CHECK_END */ |
5096 /* ERROR_CHECK_END */ |
5086 ; |
5097 ; |
5087 |
5098 |
5088 |
5099 |
5089 /********************************/ |
5100 /********************************/ |