--- parser3/src/main/compile_tools.h 2001/04/19 18:30:40 1.37 +++ parser3/src/main/compile_tools.h 2001/07/02 12:56:33 1.42 @@ -5,13 +5,14 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: compile_tools.h,v 1.37 2001/04/19 18:30:40 paf Exp $ + $Id: compile_tools.h,v 1.42 2001/07/02 12:56:33 parser Exp $ */ #ifndef COMPILE_TOOLS #define COMPILE_TOOLS -#include "code.h" +#include "pa_config_includes.h" +#include "pa_opcode.h" #include "pa_types.h" #include "pa_vstring.h" #include "pa_request.h" @@ -24,10 +25,12 @@ enum lexical_state { LS_DEF_LOCALS, LS_DEF_COMMENT, LS_DEF_SPECIAL_BODY, - LS_EXPRESSION_STRING, + LS_EXPRESSION_STRING_QUOTED, + LS_EXPRESSION_STRING_APOSTROFED, LS_EXPRESSION_VAR_NAME, LS_VAR_NAME_SIMPLE, LS_VAR_NAME_CURLY, + LS_VAR_NAME_NO_COLON, LS_VAR_ROUND, LS_VAR_SQUARE, LS_VAR_CURLY, @@ -37,8 +40,10 @@ enum lexical_state { LS_METHOD_ROUND, LS_METHOD_AFTER }; +/// compiler status struct parse_control { - // input + //@{ + /// @name input Pool *pool; Request *request; VStateless_class *cclass; @@ -47,15 +52,18 @@ struct parse_control { const char *file; int line, col; #endif - // state - int pending_state; //=0 - String *string; //=new(pool) String(pool) + //@} + //@{ + /// @name state; initially + int pending_state; ///< i=0 + String *string; ///< =new(pool) String(pool) #define MAX_LEXICAL_STATES 100 - enum lexical_state ls; //=LS_USER; - int sp; //=0 + enum lexical_state ls; ///< =LS_USER; + int sp; ///< =0 enum lexical_state stack[MAX_LEXICAL_STATES]; - int brackets_nestages[MAX_LEXICAL_STATES]; + int brackets_nestages[MAX_LEXICAL_STATES]; ///< brackets nestage on each state + //@} /// output: filled input 'methods' and 'error' if any char error[MAX_STRING];