--- parser3/src/main/compile_tools.h 2001/02/25 08:12:22 1.16 +++ parser3/src/main/compile_tools.h 2001/03/06 14:32:18 1.20 @@ -1,5 +1,5 @@ /* - $Id: compile_tools.h,v 1.16 2001/02/25 08:12:22 paf Exp $ + $Id: compile_tools.h,v 1.20 2001/03/06 14:32:18 paf Exp $ */ #ifndef COMPILE_TOOLS @@ -10,21 +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_SPEC_CODE, + 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 }; @@ -58,7 +59,7 @@ inline Array/**/ *N(Pool& pool) { } // Assembler instruction // append ordinary instruction to ops -inline void OP(Array/**/ *result, enum OPCODE code) { +inline void O(Array/**/ *result, enum OPCODE code) { Operation op; op.code=code; *result+=op.cast; } @@ -83,12 +84,14 @@ void PCA(Array/**/ *result, Array/*< // String Literal // returns array with -// first: OP_STRING instruction +// first: OP_VALUE instruction // second op: string itself Array *SL(VString *vstring); // Literal Array to(2) String // return string value from literal array OP+string array String *SLA2S(Array *literal_string_array, int offset=0); +void change_string_literal_to_double_literal(Array *literal_string_array); + // Class Literal // returns array with // first: OP_CLASS instruction // second op: vclass itself