stage1_2/stage1_2.cc
changeset 354 0f24db96b519
parent 279 c0453b7f99df
child 745 26cb3fa00d29
equal deleted inserted replaced
353:17bffb57a8c5 354:0f24db96b519
    42 /* file with declaration of absyntax classes... */
    42 /* file with declaration of absyntax classes... */
    43 #include "../absyntax/absyntax.hh"
    43 #include "../absyntax/absyntax.hh"
    44 
    44 
    45 
    45 
    46 #include "stage1_2.hh"
    46 #include "stage1_2.hh"
    47 #include "iec.y.hh"
    47 #include "iec_bison.h"
    48 #include "stage1_2_priv.hh"
    48 #include "stage1_2_priv.hh"
    49 
    49 
    50 
    50 
    51 
    51 
    52 
    52 
   125 /* The global symbol tables...   */
   125 /* The global symbol tables...   */
   126 /*********************************/
   126 /*********************************/
   127 /* NOTE: only accessed indirectly by the lexical parser (flex)
   127 /* NOTE: only accessed indirectly by the lexical parser (flex)
   128  *       through the function get_identifier_token()
   128  *       through the function get_identifier_token()
   129  */
   129  */
   130 /* NOTE: BOGUS_TOKEN_ID is defined in the bison generated file iec.y.hh.
   130 /* NOTE: BOGUS_TOKEN_ID is defined in the bison generated file iec_bison.h.
   131  *       We need this constant defined before we can declare the symbol tables.
   131  *       We need this constant defined before we can declare the symbol tables.
   132  *       However, we cannot #include "iec.y.hh" in this file (stage1_2_priv.hh) directly
   132  *       However, we cannot #include "iec_bison.h" in this file (stage1_2_priv.hh) directly
   133  *       because of the way bison ver. 3.2 is copying all declarations in the prologue
   133  *       because of the way bison ver. 3.2 is copying all declarations in the prologue
   134  *       of iec.y to the iec.y.hh file (including an #include stage1_2_priv.hh).
   134  *       of iec.y to the iec_bison.h file (including an #include stage1_2_priv.hh).
   135  *       So, if we were to include "iec.y.hh" here, we would get a circular include.
   135  *       So, if we were to include "iec_bison.h" here, we would get a circular include.
   136  *       All this means that whoever includes this file (stage1_2_priv.hh) will need
   136  *       All this means that whoever includes this file (stage1_2_priv.hh) will need
   137  *       to take care to first inlcude iec.y.hh !!
   137  *       to take care to first inlcude iec_bison.h !!
   138  */ 
   138  */ 
   139 /* A symbol table to store all the library elements */
   139 /* A symbol table to store all the library elements */
   140 /* e.g.: <function_name , function_decl>
   140 /* e.g.: <function_name , function_decl>
   141  *       <fb_name , fb_decl>
   141  *       <fb_name , fb_decl>
   142  *       <type_name , type_decl>
   142  *       <type_name , type_decl>