75 * The symbol_c * associated to the value will point to the data type declaration. |
75 * The symbol_c * associated to the value will point to the data type declaration. |
76 */ |
76 */ |
77 extern symbol_c null_symbol4; |
77 extern symbol_c null_symbol4; |
78 extern symtable_c<symbol_c *, &null_symbol4> type_symtable; |
78 extern symtable_c<symbol_c *, &null_symbol4> type_symtable; |
79 |
79 |
80 /* A symbol table with all values declared for enumerated types declared in global scope |
|
81 * (i.e. declared inside a TYPE ... END_TYPE declaration. |
|
82 */ |
|
83 /* Notes: |
|
84 * (A) - Some enumerations are implicitly declared inside a VAR ... END_VAR declaration |
|
85 * (e.g. VAR enum_var : (enumvalue1, enumvalue2); END_VAR) |
|
86 * These enumvalueX will only be valid (in scope) inside the POU in which the enum_var is declared. |
|
87 * Because of this, they are not stored in this symbol table |
|
88 * |
|
89 * (B) - if the value is defined multiple times the value is the null pointer. |
|
90 * |
|
91 * (C) - The stored symbol_c * associated to the value points to the enumerated_type_name |
|
92 * (i.e. the name of the enumerated data type) in which the the value/identifier is used/declared. |
|
93 * |
|
94 * (D) - We could re-use the null_symbol4 object, but it is safer to use a distinct object |
|
95 * (i.e. it might make it easier to find strange bugs). |
|
96 */ |
|
97 extern symbol_c null_symbol5; |
|
98 extern symtable_c<symbol_c *, &null_symbol5> enumerated_value_symtable; |
|
99 |
|
100 |
80 |
101 /***********************************************************************/ |
81 /***********************************************************************/ |
102 /***********************************************************************/ |
82 /***********************************************************************/ |
103 /***********************************************************************/ |
83 /***********************************************************************/ |
104 /***********************************************************************/ |
84 /***********************************************************************/ |