3158 |
3163 |
3159 |
3164 |
3160 input_declaration: |
3165 input_declaration: |
3161 var_init_decl |
3166 var_init_decl |
3162 | edge_declaration |
3167 | edge_declaration |
|
3168 | en_param_declaration |
3163 ; |
3169 ; |
3164 |
3170 |
3165 |
3171 |
3166 edge_declaration: |
3172 edge_declaration: |
3167 var1_list ':' BOOL R_EDGE |
3173 var1_list ':' BOOL R_EDGE |
3168 {$$ = new edge_declaration_c(new raising_edge_option_c(locloc(@3)), $1, locloc(@$));} |
3174 {$$ = new edge_declaration_c(new raising_edge_option_c(locloc(@3)), $1, locloc(@$));} |
3169 | var1_list ':' BOOL F_EDGE |
3175 | var1_list ':' BOOL F_EDGE |
3170 {$$ = new edge_declaration_c(new falling_edge_option_c(locloc(@3)), $1, locloc(@$));} |
3176 {$$ = new edge_declaration_c(new falling_edge_option_c(locloc(@3)), $1, locloc(@$));} |
3171 /* ERROR_CHECK_BEGIN */ |
3177 /* ERROR_CHECK_BEGIN */ |
3172 | var1_list BOOL R_EDGE |
3178 | var1_list BOOL R_EDGE |
3173 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "':' missing between variable list and specification."); yynerrs++;} |
3179 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "':' missing between variable list and specification in edge declaration."); yynerrs++;} |
3174 | var1_list BOOL F_EDGE |
3180 | var1_list BOOL F_EDGE |
3175 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "':' missing between variable list and specification."); yynerrs++;} |
3181 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "':' missing between variable list and specification in edge declaration."); yynerrs++;} |
3176 | var1_list ':' BOOL R_EDGE F_EDGE |
3182 | var1_list ':' BOOL R_EDGE F_EDGE |
3177 {$$ = NULL; print_err_msg(locf(@5), locl(@5), "'R_EDGE' and 'F_EDGE' can't be present at the same time in edge declaration."); yynerrs++;} |
3183 {$$ = NULL; print_err_msg(locf(@5), locl(@5), "'R_EDGE' and 'F_EDGE' can't be present at the same time in edge declaration."); yynerrs++;} |
3178 | var1_list ':' R_EDGE |
3184 | var1_list ':' R_EDGE |
3179 {$$ = NULL; print_err_msg(locl(@2), locf(@3), "'BOOL' missing in edge declaration."); yynerrs++;} |
3185 {$$ = NULL; print_err_msg(locl(@2), locf(@3), "'BOOL' missing in edge declaration."); yynerrs++;} |
3180 | var1_list ':' F_EDGE |
3186 | var1_list ':' F_EDGE |
3181 {$$ = NULL; print_err_msg(locl(@2), locf(@3), "'BOOL' missing in edge declaration."); yynerrs++;} |
3187 {$$ = NULL; print_err_msg(locl(@2), locf(@3), "'BOOL' missing in edge declaration."); yynerrs++;} |
3182 /* ERROR_CHECK_END */ |
3188 /* ERROR_CHECK_END */ |
3183 ; |
3189 ; |
3184 |
3190 |
|
3191 en_param_declaration: |
|
3192 en_param ':' BOOL ASSIGN boolean_literal |
|
3193 {$$ = new en_param_declaration_c(locloc(@$));} |
|
3194 | en_param ':' BOOL ASSIGN integer |
|
3195 {$$ = new en_param_declaration_c(locloc(@$));} |
|
3196 /* ERROR_CHECK_BEGIN */ |
|
3197 | en_param BOOL ASSIGN boolean_literal |
|
3198 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "':' missing between variable list and specification in EN declaration."); yynerrs++;} |
|
3199 | en_param BOOL ASSIGN integer |
|
3200 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "':' missing between variable list and specification in EN declaration."); yynerrs++;} |
|
3201 | en_param ':' ASSIGN boolean_literal |
|
3202 {$$ = NULL; print_err_msg(locl(@2), locf(@3), "'BOOL' missing in EN declaration."); yynerrs++;} |
|
3203 | en_param ':' ASSIGN integer |
|
3204 {$$ = NULL; print_err_msg(locl(@2), locf(@3), "'BOOL' missing in EN declaration."); yynerrs++;} |
|
3205 | en_param ':' BOOL ASSIGN error |
|
3206 {$$ = NULL; |
|
3207 if (is_current_syntax_token()) {print_err_msg(locl(@2), locf(@3), "no specification defined in EN declaration.");} |
|
3208 else {print_err_msg(locf(@3), locl(@3), "invalid specification in EN declaration."); yyclearin;} |
|
3209 yyerrok; |
|
3210 } |
|
3211 /* ERROR_CHECK_END */ |
|
3212 ; |
3185 |
3213 |
3186 var_init_decl: |
3214 var_init_decl: |
3187 var1_init_decl |
3215 var1_init_decl |
3188 | array_var_init_decl |
3216 | array_var_init_decl |
3189 | structured_var_init_decl |
3217 | structured_var_init_decl |
3339 // fb_name: identifier; |
3367 // fb_name: identifier; |
3340 |
3368 |
3341 |
3369 |
3342 |
3370 |
3343 output_declarations: |
3371 output_declarations: |
3344 VAR_OUTPUT var_init_decl_list END_VAR |
3372 VAR_OUTPUT var_output_init_decl_list END_VAR |
3345 {$$ = new output_declarations_c(NULL, $2, locloc(@$));} |
3373 {$$ = new output_declarations_c(NULL, $2, locloc(@$));} |
3346 | VAR_OUTPUT RETAIN var_init_decl_list END_VAR |
3374 | VAR_OUTPUT RETAIN var_output_init_decl_list END_VAR |
3347 {$$ = new output_declarations_c(new retain_option_c(locloc(@2)), $3, locloc(@$));} |
3375 {$$ = new output_declarations_c(new retain_option_c(locloc(@2)), $3, locloc(@$));} |
3348 | VAR_OUTPUT NON_RETAIN var_init_decl_list END_VAR |
3376 | VAR_OUTPUT NON_RETAIN var_output_init_decl_list END_VAR |
3349 {$$ = new output_declarations_c(new non_retain_option_c(locloc(@2)), $3, locloc(@$));} |
3377 {$$ = new output_declarations_c(new non_retain_option_c(locloc(@2)), $3, locloc(@$));} |
3350 /* ERROR_CHECK_BEGIN */ |
3378 /* ERROR_CHECK_BEGIN */ |
3351 | VAR_OUTPUT END_VAR |
3379 | VAR_OUTPUT END_VAR |
3352 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "no variable declared in output variable(s) declaration."); yynerrs++;} |
3380 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "no variable declared in output variable(s) declaration."); yynerrs++;} |
3353 | VAR_OUTPUT RETAIN END_VAR |
3381 | VAR_OUTPUT RETAIN END_VAR |
3354 {$$ = NULL; print_err_msg(locl(@2), locf(@3), "no variable declared in retentive output variable(s) declaration."); yynerrs++;} |
3382 {$$ = NULL; print_err_msg(locl(@2), locf(@3), "no variable declared in retentive output variable(s) declaration."); yynerrs++;} |
3355 | VAR_OUTPUT NON_RETAIN END_VAR |
3383 | VAR_OUTPUT NON_RETAIN END_VAR |
3356 {$$ = NULL; print_err_msg(locl(@2), locf(@3), "no variable declared in non-retentive output variable(s) declaration."); yynerrs++;} |
3384 {$$ = NULL; print_err_msg(locl(@2), locf(@3), "no variable declared in non-retentive output variable(s) declaration."); yynerrs++;} |
3357 | VAR_OUTPUT error var_init_decl_list END_VAR |
3385 | VAR_OUTPUT error var_output_init_decl_list END_VAR |
3358 {$$ = NULL; print_err_msg(locf(@2), locl(@2), "unexpected token after 'VAR_OUPUT' in output variable(s) declaration."); yyerrok;} |
3386 {$$ = NULL; print_err_msg(locf(@2), locl(@2), "unexpected token after 'VAR_OUPUT' in output variable(s) declaration."); yyerrok;} |
3359 | VAR_OUTPUT RETAIN error var_init_decl_list END_VAR |
3387 | VAR_OUTPUT RETAIN error var_output_init_decl_list END_VAR |
3360 {$$ = NULL; print_err_msg(locf(@3), locl(@3), "unexpected token after 'RETAIN' in retentive output variable(s) declaration."); yyerrok;} |
3388 {$$ = NULL; print_err_msg(locf(@3), locl(@3), "unexpected token after 'RETAIN' in retentive output variable(s) declaration."); yyerrok;} |
3361 | VAR_OUTPUT NON_RETAIN error var_init_decl_list END_VAR |
3389 | VAR_OUTPUT NON_RETAIN error var_output_init_decl_list END_VAR |
3362 {$$ = NULL; print_err_msg(locf(@3), locl(@3), "unexpected token after 'NON_RETAIN' in non-retentive output variable(s) declaration."); yyerrok;} |
3390 {$$ = NULL; print_err_msg(locf(@3), locl(@3), "unexpected token after 'NON_RETAIN' in non-retentive output variable(s) declaration."); yyerrok;} |
3363 | VAR_OUTPUT var_init_decl_list error END_OF_INPUT |
3391 | VAR_OUTPUT var_output_init_decl_list error END_OF_INPUT |
3364 {$$ = NULL; print_err_msg(locf(@1), locl(@1), "unclosed output variable(s) declaration."); yyerrok;} |
3392 {$$ = NULL; print_err_msg(locf(@1), locl(@1), "unclosed output variable(s) declaration."); yyerrok;} |
3365 | VAR_OUTPUT RETAIN var_init_decl_list error END_OF_INPUT |
3393 | VAR_OUTPUT RETAIN var_output_init_decl_list error END_OF_INPUT |
3366 {$$ = NULL; print_err_msg(locf(@1), locl(@2), "unclosed retentive output variable(s) declaration."); yyerrok;} |
3394 {$$ = NULL; print_err_msg(locf(@1), locl(@2), "unclosed retentive output variable(s) declaration."); yyerrok;} |
3367 | VAR_OUTPUT NON_RETAIN var_init_decl_list error END_OF_INPUT |
3395 | VAR_OUTPUT NON_RETAIN var_output_init_decl_list error END_OF_INPUT |
3368 {$$ = NULL; print_err_msg(locf(@1), locl(@2), "unclosed non-retentive output variable(s) declaration."); yyerrok;} |
3396 {$$ = NULL; print_err_msg(locf(@1), locl(@2), "unclosed non-retentive output variable(s) declaration."); yyerrok;} |
3369 | VAR_OUTPUT error END_VAR |
3397 | VAR_OUTPUT error END_VAR |
3370 {$$ = NULL; print_err_msg(locf(@2), locl(@2), "unknown error in output variable(s) declaration."); yyerrok;} |
3398 {$$ = NULL; print_err_msg(locf(@2), locl(@2), "unknown error in output variable(s) declaration."); yyerrok;} |
3371 | VAR_OUTPUT RETAIN error END_VAR |
3399 | VAR_OUTPUT RETAIN error END_VAR |
3372 {$$ = NULL; print_err_msg(locf(@3), locl(@3), "unknown error in retentive output variable(s) declaration."); yyerrok;} |
3400 {$$ = NULL; print_err_msg(locf(@3), locl(@3), "unknown error in retentive output variable(s) declaration."); yyerrok;} |
3373 | VAR_OUTPUT NON_RETAIN error END_VAR |
3401 | VAR_OUTPUT NON_RETAIN error END_VAR |
3374 {$$ = NULL; print_err_msg(locf(@3), locl(@3), "unknown error in non-retentive output variable(s) declaration."); yyerrok;} |
3402 {$$ = NULL; print_err_msg(locf(@3), locl(@3), "unknown error in non-retentive output variable(s) declaration."); yyerrok;} |
3375 /* ERROR_CHECK_END */ |
3403 /* ERROR_CHECK_END */ |
3376 ; |
3404 ; |
3377 |
3405 |
|
3406 var_output_init_decl: |
|
3407 var_init_decl |
|
3408 | eno_param_declaration |
|
3409 ; |
|
3410 |
|
3411 var_output_init_decl_list: |
|
3412 var_output_init_decl ';' |
|
3413 {$$ = new var_init_decl_list_c(locloc(@$)); $$->add_element($1);} |
|
3414 | var_output_init_decl_list var_output_init_decl ';' |
|
3415 {$$ = $1; $$->add_element($2);} |
|
3416 /* ERROR_CHECK_BEGIN */ |
|
3417 | var_output_init_decl_list var_output_init_decl error |
|
3418 {$$ = $1; print_err_msg(locl(@2), locf(@3), "';' missing at end of variable(s) declaration."); yyerrok;} |
|
3419 | var_output_init_decl_list error ';' |
|
3420 {$$ = $1; print_err_msg(locf(@2), locl(@2), "invalid variable(s) declaration."); yyerrok;} |
|
3421 /* ERROR_CHECK_END */ |
|
3422 ; |
|
3423 |
|
3424 eno_param_declaration: |
|
3425 eno_param ':' BOOL |
|
3426 {$$ = new eno_param_declaration_c(locloc(@$));} |
|
3427 /* ERROR_CHECK_BEGIN */ |
|
3428 | en_param BOOL |
|
3429 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "':' missing between variable list and specification in EN0 declaration."); yynerrs++;} |
|
3430 | en_param ':' error |
|
3431 {$$ = NULL; |
|
3432 if (is_current_syntax_token()) {print_err_msg(locl(@2), locf(@3), "no specification defined in ENO declaration.");} |
|
3433 else {print_err_msg(locf(@3), locl(@3), "invalid specification in ENO declaration."); yyclearin;} |
|
3434 yyerrok; |
|
3435 } |
|
3436 /* ERROR_CHECK_END */ |
|
3437 ; |
3378 |
3438 |
3379 |
3439 |
3380 input_output_declarations: |
3440 input_output_declarations: |
3381 VAR_IN_OUT var_declaration_list END_VAR |
3441 VAR_IN_OUT var_declaration_list END_VAR |
3382 {$$ = new input_output_declarations_c($2, locloc(@$));} |
3442 {$$ = new input_output_declarations_c($2, locloc(@$));} |