--- parser3/src/main/compile_tools.h 2001/02/21 15:00:02 1.7 +++ parser3/src/main/compile_tools.h 2001/02/22 15:17:40 1.11 @@ -1,5 +1,5 @@ /* - $Id: compile_tools.h,v 1.7 2001/02/21 15:00:02 paf Exp $ + $Id: compile_tools.h,v 1.11 2001/02/22 15:17:40 paf Exp $ */ #ifndef COMPILE_TOOLS @@ -9,6 +9,8 @@ #include "pa_types.h" #include "pa_pool.h" #include "pa_array.h" +#include "pa_string.h" +#include "pa_vstring.h" enum lexical_state { LS_USER, @@ -75,17 +77,19 @@ inline void AE(Array/**/ *result, ch inline void P(Array/**/ *result, Array *code_array) { result->append_array(*code_array); } +inline void P(Array/**/ *result, Array *code_array, int offset) { + result->append_array(*code_array, offset); +} /* Literal // returns array with // first: OP_STRING instruction // second op: string itself */ -Array *L(String *string); +Array *L(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); - void push_LS(struct parse_control *pc, lexical_state new_state); void pop_LS(struct parse_control *pc);