--- parser3/src/main/compile_tools.h 2001/02/24 15:26:03 1.14 +++ parser3/src/main/compile_tools.h 2001/03/06 12:00:44 1.18 @@ -1,5 +1,5 @@ /* - $Id: compile_tools.h,v 1.14 2001/02/24 15:26:03 paf Exp $ + $Id: compile_tools.h,v 1.18 2001/03/06 12:00:44 paf Exp $ */ #ifndef COMPILE_TOOLS @@ -10,20 +10,22 @@ #include "pa_vstring.h" #include "pa_request.h" -#define CLASS_NAME "CLASS" - enum lexical_state { LS_USER, LS_DEF_NAME, LS_DEF_PARAMS, LS_DEF_LOCALS, LS_DEF_COMMENT, + LS_DEF_SPECIAL_BODY, + LS_EXPRESSION_BODY, + LS_EXPRESSION_STRING, LS_VAR_NAME_SIMPLE, LS_VAR_NAME_CURLY, - LS_VAR_ROUND, + LS_VAR_NAME_IN_EXPRESSION, + LS_VAR_SQUARE, LS_VAR_CURLY, LS_METHOD_NAME, - LS_METHOD_ROUND, + LS_METHOD_SQUARE, LS_METHOD_CURLY, LS_METHOD_AFTER }; @@ -81,13 +83,18 @@ void PVS(Array/**/ *result, VString void PCA(Array/**/ *result, Array/**/ *code_array); -// Literal // returns array with +// String Literal // returns array with // first: OP_STRING instruction // second op: string itself - -Array *L(VString *vstring); +Array *SL(VString *vstring); // Literal Array to(2) String // return string value from literal array OP+string array -String *LA2S(Array *literal_string_array, int offset=0); +String *SLA2S(Array *literal_string_array, int offset=0); + +// Class Literal // returns array with +// first: OP_CLASS instruction +// second op: vclass itself +Array *CL(VClass *vclass); + void push_LS(struct parse_control *pc, lexical_state new_state); void pop_LS(struct parse_control *pc);