--- parser3/src/main/compile_tools.C 2002/02/08 07:27:46 1.44 +++ parser3/src/main/compile_tools.C 2002/04/15 06:45:58 1.47 @@ -2,9 +2,9 @@ Parser: compiler support helper functions. Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://paf.design.ru) + Author: Alexandr Petrosian (http://paf.design.ru) - $Id: compile_tools.C,v 1.44 2002/02/08 07:27:46 paf Exp $ + $Id: compile_tools.C,v 1.47 2002/04/15 06:45:58 paf Exp $ */ #include "compile_tools.h" @@ -59,6 +59,25 @@ void PNC(Array/**/ *result, A *result+=code_array; } +void PJP(Array/**/ *result, Array/**/ *code_array) { + // append OP_CODE + Operation op; op.code=OP_OBJECT_POOL; + *result+=op.cast; + + // append 'vstring' + *result+=code_array; +} + +void PSP(Array/**/ *result, Array/**/ *code_array) { + // append OP_CODE + Operation op; op.code=OP_STRING_POOL; + *result+=op.cast; + + // append 'vstring' + *result+=code_array; +} + + Array *VL(Value *value) { // empty ops array @@ -93,11 +112,11 @@ void push_LS(parse_control& pc, lexical_ pc.ls_stack[pc.ls_sp++]=pc.ls; pc.ls=new_state; } else - throw Exception(0, 0, 0, "push_LS: ls_stack overflow"); + throw Exception(0, 0, "push_LS: ls_stack overflow"); } void pop_LS(parse_control& pc) { if(--pc.ls_sp>=0) pc.ls=pc.ls_stack[pc.ls_sp]; else - throw Exception(0, 0, 0, "pop_LS: ls_stack underflow"); + throw Exception(0, 0, "pop_LS: ls_stack underflow"); }