diff -r f53ea4c8621c -r e984cfdf3b10 stage1_2/stage1_2.cc --- a/stage1_2/stage1_2.cc Sat Nov 29 12:10:34 2014 +0000 +++ b/stage1_2/stage1_2.cc Sat Nov 29 13:43:20 2014 +0000 @@ -73,6 +73,15 @@ bool get_opt_ref_standard_extensions() {return runtime_options.ref_standard_extensions;} +/**********************************************************************************************/ +/* whether bison is doing the pre-parsing, where POU bodies and var declarations are ignored! */ +/**********************************************************************************************/ +static bool preparse_state__ = false; + +void set_preparse_state(void) {preparse_state__ = true; } +void rst_preparse_state(void) {preparse_state__ = false;} +bool get_preparse_state(void) {return preparse_state__;} // returns true if bison is in preparse state + /****************************************************/ /* Controlling the entry to the body_state in flex. */