3533 */ |
3533 */ |
3534 variable: |
3534 variable: |
3535 symbolic_variable |
3535 symbolic_variable |
3536 | prev_declared_direct_variable |
3536 | prev_declared_direct_variable |
3537 | eno_identifier |
3537 | eno_identifier |
3538 {$$ = new symbolic_variable_c($1, locloc(@$));} |
3538 {$$ = new symbolic_variable_c($1, locloc(@$)); $$->token = $1->token;} |
3539 ; |
3539 ; |
3540 |
3540 |
3541 |
3541 |
3542 symbolic_variable: |
3542 symbolic_variable: |
3543 /* NOTE: To be entirely correct, variable_name must be replacemed by |
3543 /* NOTE: To be entirely correct, variable_name must be replacemed by |
3544 * prev_declared_variable_name | prev_declared_fb_name | prev_declared_global_var_name |
3544 * prev_declared_variable_name | prev_declared_fb_name | prev_declared_global_var_name |
3545 */ |
3545 */ |
3546 prev_declared_fb_name |
3546 prev_declared_fb_name |
3547 {$$ = new symbolic_variable_c($1, locloc(@$));} |
3547 {$$ = new symbolic_variable_c($1, locloc(@$)); $$->token = $1->token;} |
3548 | prev_declared_global_var_name |
3548 | prev_declared_global_var_name |
3549 {$$ = new symbolic_variable_c($1, locloc(@$));} |
3549 {$$ = new symbolic_variable_c($1, locloc(@$)); $$->token = $1->token;} |
3550 | prev_declared_variable_name |
3550 | prev_declared_variable_name |
3551 {$$ = new symbolic_variable_c($1, locloc(@$));} |
3551 {$$ = new symbolic_variable_c($1, locloc(@$)); $$->token = $1->token;} |
3552 | multi_element_variable |
3552 | multi_element_variable |
3553 /* |
3553 /* |
3554 | identifier |
3554 | identifier |
3555 {$$ = new symbolic_variable_c($1, locloc(@$));} |
3555 {$$ = new symbolic_variable_c($1, locloc(@$)); $$->token = $1->token;} |
3556 */ |
3556 */ |
3557 | symbolic_variable '^' |
3557 | symbolic_variable '^' |
3558 /* Dereferencing operator defined in IEC 61131-3 v3. However, implemented here differently then how it is defined in the standard! See following note for explanation! */ |
3558 /* Dereferencing operator defined in IEC 61131-3 v3. However, implemented here differently then how it is defined in the standard! See following note for explanation! */ |
3559 {$$ = new deref_operator_c($1, locloc(@$)); |
3559 {$$ = new deref_operator_c($1, locloc(@$)); |
3560 if (!allow_ref_dereferencing) { |
3560 if (!allow_ref_dereferencing) { |
3592 * variables, function blocks, etc... |
3592 * variables, function blocks, etc... |
3593 */ |
3593 */ |
3594 any_symbolic_variable: |
3594 any_symbolic_variable: |
3595 // variable_name -> replaced by any_identifier |
3595 // variable_name -> replaced by any_identifier |
3596 any_identifier |
3596 any_identifier |
3597 {$$ = new symbolic_variable_c($1, locloc(@$));} |
3597 {$$ = new symbolic_variable_c($1, locloc(@$)); $$->token = $1->token;} |
3598 | any_multi_element_variable |
3598 | any_multi_element_variable |
3599 ; |
3599 ; |
3600 |
3600 |
3601 |
3601 |
3602 /* for yet undeclared variable names ! */ |
3602 /* for yet undeclared variable names ! */ |
8386 * If we don't, then the correct use of any previosuly declared |
8386 * If we don't, then the correct use of any previosuly declared |
8387 * variable would result in an incorrect syntax error |
8387 * variable would result in an incorrect syntax error |
8388 */ |
8388 */ |
8389 control_variable: |
8389 control_variable: |
8390 prev_declared_variable_name |
8390 prev_declared_variable_name |
8391 {$$ = new symbolic_variable_c($1,locloc(@$));}; |
8391 {$$ = new symbolic_variable_c($1,locloc(@$)); $$->token = $1->token;}; |
8392 // control_variable: identifier {$$ = $1;}; |
8392 // control_variable: identifier {$$ = $1;}; |
8393 |
8393 |
8394 /* Integrated directly into for_statement */ |
8394 /* Integrated directly into for_statement */ |
8395 /* |
8395 /* |
8396 for_list: |
8396 for_list: |