--- parser3/src/include/pa_opcode.h 2002/10/15 14:28:56 1.23 +++ parser3/src/include/pa_opcode.h 2008/08/15 15:25:03 1.29 @@ -1,21 +1,17 @@ /** @file Parser: compiled code related decls. - Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -#ifndef CODE_H -#define CODE_H +#ifndef OPCODE_H +#define OPCODE_H -static const char* IDENT_OPCODE_H="$Date: 2002/10/15 14:28:56 $"; +namespace OP { -#include "pa_string.h" -#include "pa_array.h" - -class Value; -class Array; +static const char * const IDENT_OPCODE_H="$Date: 2008/08/15 15:25:03 $"; /// Compiled operation code enum OPCODE { @@ -54,25 +50,6 @@ enum OPCODE { OP_IS //@} }; - -/** - Parser source code got compiled into intermediate form of Operation-s, - which is executed afterwards. - - It is compiled into Array of Operation-s. - Each Operation can be either OPCODE or data pointer, - following the literal-instruction. - - OP_VALUE followed by Value* - - OP_CURLY_CODE__STORE_PARAM followed by Array* - - OP_EXPR_CODE__STORE_PARAM followed by Array* - - OP_NESTED_CODE followed by Array* -*/ -union Operation { - void *cast; ///< casting helper - - OPCODE code; ///< operation code - Value *value; ///< not an operation, but rather value stored after argumented op - Array *array; ///< not an operation, but rather code array stored after argumented op }; #endif