Annotation of parser3/src/include/pa_operation.h, revision 1.1.2.3

1.1.2.1   paf         1: /** @file
                      2:        Parser: compiled code related decls.
                      3: 
                      4:        Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com)
                      5: 
                      6:        Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
                      7: */
                      8: 
1.1.2.2   paf         9: #ifndef OPERATION_H
                     10: #define OPERATION_H
1.1.2.1   paf        11: 
1.1.2.3 ! paf        12: static const char* IDENT_OPERATION_H="$Date: 2003/01/30 09:34:30 $";
1.1.2.1   paf        13: 
                     14: #include "pa_array.h"
                     15: 
                     16: // forwards
                     17: 
                     18: enum OPCODE;
1.1.2.3 ! paf        19: class Value;  DECLARE_OBJECT_PTR(Value);
        !            20: class Operation;
        !            21: typedef Array<Operation> ArrayOperation;  DECLARE_OBJECT_PTR(ArrayOperation);
1.1.2.1   paf        22: 
                     23: /** 
                     24:        Parser source code got compiled into intermediate form of Operation-s, 
1.1.2.3 ! paf        25:        which are executed afterwards.
1.1.2.1   paf        26: 
                     27:        It is compiled into Array of Operation-s.
                     28:        Each Operation can be either OPCODE or data pointer, 
                     29:        following the literal-instruction.
                     30:                - OP_VALUE followed by Value*
1.1.2.3 ! paf        31:                - OP_CURLY_CODE__STORE_PARAM followed by ArrayOperation*
        !            32:                - OP_EXPR_CODE__STORE_PARAM followed by ArrayOperation*
        !            33:                - OP_NESTED_CODE followed by ArrayOperation*
1.1.2.1   paf        34: */
1.1.2.3 ! paf        35: class Operation {
        !            36: public:
1.1.2.1   paf        37:        OPCODE code; ///< operation code
1.1.2.3 ! paf        38:        ValuePtr value; ///< not an operation, but rather value stored after argumented op
        !            39:        ArrayOperationPtr array; ///< not an operation, but rather code array stored after argumented op
1.1.2.2   paf        40: 
1.1.2.3 ! paf        41:        /// needed to fill unused Array entries
        !            42:        Operation() {}
1.1.2.2   paf        43:        Operation(OPCODE acode): code(acode) {}
1.1.2.3 ! paf        44:        Operation(ValuePtr avalue): value(avalue) {}
        !            45:        Operation(ArrayOperationPtr aarray): array(aarray) {}   
1.1.2.1   paf        46: };
                     47: 
                     48: #endif

E-mail: