"L. Spiro Engine"
|
Stores all of the data parsed during the parsing of an expression for use with the preprocessor. More...
#include <LSGPreProcContainer.h>
Public Member Functions | |
LSBOOL LSE_CALL | CreateIdentifier (const LSCHAR *_pcText, YYSTYPE::LSG_NODE_DATA &_ndNode) |
LSBOOL LSE_CALL | CreateDecimal (const LSCHAR *_pcText, YYSTYPE::LSG_NODE_DATA &_ndNode) |
LSBOOL LSE_CALL | CreateHexadecimal (const LSCHAR *_pcText, YYSTYPE::LSG_NODE_DATA &_ndNode) |
LSBOOL LSE_CALL | CreateFloatingPoint (const LSCHAR *_pcText, YYSTYPE::LSG_NODE_DATA &_ndNode) |
LSBOOL LSE_CALL | CreateUnaryOp (LSUINT32 _ui32Op, const YYSTYPE::LSG_NODE_DATA &_ndBase, YYSTYPE::LSG_NODE_DATA &_ndNode) |
LSBOOL LSE_CALL | CreateMath (const YYSTYPE::LSG_NODE_DATA &_ndLeft, const YYSTYPE::LSG_NODE_DATA &_ndRight, LSUINT32 _ui32Op, YYSTYPE::LSG_NODE_DATA &_ndNode) |
LSBOOL LSE_CALL | CreateTertiary (const YYSTYPE::LSG_NODE_DATA &_ndCond, const YYSTYPE::LSG_NODE_DATA &_ndLeft, const YYSTYPE::LSG_NODE_DATA &_ndRight, YYSTYPE::LSG_NODE_DATA &_ndNode) |
LSBOOL LSE_CALL | CreateDefined (const YYSTYPE::LSG_NODE_DATA &_ndIdent, YYSTYPE::LSG_NODE_DATA &_ndNode) |
LSBOOL LSE_CALL | CreateTranslationUnit (const YYSTYPE::LSG_NODE_DATA &_ndLeft, const YYSTYPE::LSG_NODE_DATA &_ndRight, YYSTYPE::LSG_NODE_DATA &_ndNode) |
const LSG_PREPROC_SYNTAX_NODES::LSG_NODE_DATA &LSE_CALL | GetNode (LSUINT32 _ui32Index) const |
LSUINT32 LSE_CALL | TotalNodes () const |
const CString &LSE_CALL | GetString (LSUINT32 _ui32Index) const |
Protected Member Functions | |
LSBOOL LSE_CALL | AddNode (LSG_PREPROC_SYNTAX_NODES::LSG_NODE_DATA &_ndNode) |
LSUINT32 LSE_CALL | AddIdentifier (const LSCHAR *_pcText) |
Protected Attributes | |
CVector< CString, LSUINT32, 32UL > | m_vStringPool |
CVectorPoD < LSG_PREPROC_SYNTAX_NODES::LSG_NODE_DATA, LSUINT32, 512UL > | m_vNodes |
Stores all of the data parsed during the parsing of an expression for use with the preprocessor.
Class CPreProcContainer Description: Stores all of the data parsed during the parsing of an expression for use with the preprocessor.
LSUINT32 LSE_CALL lsg::CPreProcContainer::AddIdentifier | ( | const LSCHAR * | _pcText | ) | [protected] |
Add an identifier by name. Returns the index of the created identifier in the identifier stack. The type of the created identifier is undefined.
_pcText | The string name of the identifier. |
LSBOOL LSE_CALL lsg::CPreProcContainer::AddNode | ( | LSG_PREPROC_SYNTAX_NODES::LSG_NODE_DATA & | _ndNode | ) | [protected] |
Add a node to the stack. Set the node index too.
_ndNode | The node to add to the stack. |
LSBOOL LSE_CALL lsg::CPreProcContainer::CreateDecimal | ( | const LSCHAR * | _pcText, |
YYSTYPE::LSG_NODE_DATA & | _ndNode | ||
) |
Accepts a string representation of a decimal constant and stores the result in the given node.
_pcText | String constant containing the numeric. |
_ndNode | Node to create based off the string constant. |
LSBOOL LSE_CALL lsg::CPreProcContainer::CreateDefined | ( | const YYSTYPE::LSG_NODE_DATA & | _ndIdent, |
YYSTYPE::LSG_NODE_DATA & | _ndNode | ||
) |
Creates a defined() expression.
_ndIdent | The identifier. |
_ndNode | Node to create. |
LSBOOL LSE_CALL lsg::CPreProcContainer::CreateFloatingPoint | ( | const LSCHAR * | _pcText, |
YYSTYPE::LSG_NODE_DATA & | _ndNode | ||
) |
Accepts a representation of a floating-point constant and stores the result in the given node.
_pcText | String constant containing the numeric. |
_ndNode | Node to create based off the string constant. |
LSBOOL LSE_CALL lsg::CPreProcContainer::CreateHexadecimal | ( | const LSCHAR * | _pcText, |
YYSTYPE::LSG_NODE_DATA & | _ndNode | ||
) |
Accepts a string representation of a hexadecimal constant and stores the result in the given node.
_pcText | String constant containing the numeric. |
_ndNode | Node to create based off the string constant. |
LSBOOL LSE_CALL lsg::CPreProcContainer::CreateIdentifier | ( | const LSCHAR * | _pcText, |
YYSTYPE::LSG_NODE_DATA & | _ndNode | ||
) |
Creates a node pointing to an identifier (by index into the identifier stack).
_pcText | The string name of the identifier. |
_ndNode | Node to create based off the string constant. |
LSBOOL LSE_CALL lsg::CPreProcContainer::CreateMath | ( | const YYSTYPE::LSG_NODE_DATA & | _ndLeft, |
const YYSTYPE::LSG_NODE_DATA & | _ndRight, | ||
LSUINT32 | _ui32Op, | ||
YYSTYPE::LSG_NODE_DATA & | _ndNode | ||
) |
Creates a node referencing two other nodes with an operator between them. From X * Y to X && Y.
_ndLeft | The left operand. |
_ndRight | The right operand. |
_ui32Op | The operand. |
_ndNode | Node to create. |
LSBOOL LSE_CALL lsg::CPreProcContainer::CreateTertiary | ( | const YYSTYPE::LSG_NODE_DATA & | _ndCond, |
const YYSTYPE::LSG_NODE_DATA & | _ndLeft, | ||
const YYSTYPE::LSG_NODE_DATA & | _ndRight, | ||
YYSTYPE::LSG_NODE_DATA & | _ndNode | ||
) |
Creates a tertiary ?: expression.
_ndCond | The conditional operand. |
_ndLeft | The left operand. |
_ndRight | The right operand. |
_ndNode | Node to create. |
LSBOOL LSE_CALL lsg::CPreProcContainer::CreateTranslationUnit | ( | const YYSTYPE::LSG_NODE_DATA & | _ndLeft, |
const YYSTYPE::LSG_NODE_DATA & | _ndRight, | ||
YYSTYPE::LSG_NODE_DATA & | _ndNode | ||
) |
Creates a list of external declarations.
param | _ndLeft Left operand. |
_ndRight | Right operand. |
_ndNode | Node to create. |
LSBOOL LSE_CALL lsg::CPreProcContainer::CreateUnaryOp | ( | LSUINT32 | _ui32Op, |
const YYSTYPE::LSG_NODE_DATA & | _ndBase, | ||
YYSTYPE::LSG_NODE_DATA & | _ndNode | ||
) |
Creates a unary !, ~, -, or + node.
_ui32Op | The operator. |
_ndBase | The base expression modified by the operator. |
_ndNode | Node to create. |
const LSG_PREPROC_SYNTAX_NODES::LSG_NODE_DATA& LSE_CALL lsg::CPreProcContainer::GetNode | ( | LSUINT32 | _ui32Index | ) | const |
Get a node for read-only.
_ui32Index | Index of the node to get. |
const CString& LSE_CALL lsg::CPreProcContainer::GetString | ( | LSUINT32 | _ui32Index | ) | const |
Get a string from the string pool.
_ui32Index | Index of the string to get. |
LSUINT32 LSE_CALL lsg::CPreProcContainer::TotalNodes | ( | ) | const |
Get the total number of nodes.
CVectorPoD<LSG_PREPROC_SYNTAX_NODES::LSG_NODE_DATA, LSUINT32, 512UL> lsg::CPreProcContainer::m_vNodes [protected] |
The stack of nodes.
CVector<CString, LSUINT32, 32UL> lsg::CPreProcContainer::m_vStringPool [protected] |
A pool of strings. Strings are binary and not necessarily terminated with a NULL.