# Ogre::MaterialScriptCompiler Class Reference

`#include <OgreMaterialScriptCompiler.h>`

Inheritance diagram for Ogre::MaterialScriptCompiler:
[legend]

List of all members.

## Public Member Functions

| MaterialScriptCompiler (void)
| ~MaterialScriptCompiler (void)
virtual const String & | getClientBNFGrammer (void) const
| gets BNF Grammer for Compositor script.
virtual const String & | getClientGrammerName (void) const
| get the name of the BNF grammer.
void | parseScript (DataStreamPtr &stream, const String &groupName, const bool allowOverride=false)
| Compile a material script from a data stream using a specific resource group name.
| MaterialScriptCompiler (void)
| ~MaterialScriptCompiler (void)
virtual const String & | getClientBNFGrammer (void) const
| gets BNF Grammer for Compositor script.
virtual const String & | getClientGrammerName (void) const
| get the name of the BNF grammer.
void | parseScript (DataStreamPtr &stream, const String &groupName, const bool allowOverride=false)
| Compile a material script from a data stream using a specific resource group name.
bool | compile (const String &source, const String &sourceName)
| compile the source - performs 2 passes.

## Protected Types

enum

TokenID {
ID_UNKOWN = 0, ID_VERTEX_PROGRAM, ID_FRAGMENT_PROGRAM, ID_CLONE,
ID_VERTEXCOLOUR, ID_COLOUR_BLEND, ID_DEST_COLOUR, ID_SRC_COLOUR,
ID_ONE_MINUS_DEST_COLOUR, ID_ONE_MINUS_SRC_COLOUR, ID_DEST_ALPHA, ID_SRC_ALPHA,
ID_ONE_MINUS_DEST_ALPHA, ID_ONE_MINUS_SRC_ALPHA, ID_ALWAYS_FAIL, ID_ALWAYS_PASS,
ID_LESS_EQUAL, ID_LESS, ID_EQUAL, ID_NOT_EQUAL,
ID_GREATER_EQUAL, ID_GREATER, ID_CLOCKWISE, ID_ANTICLOCKWISE,
ID_CULL_BACK, ID_CULL_FRONT, ID_FLAT, ID_GOURAUD,
ID_PHONG, ID_SOLID, ID_WIREFRAME, ID_POINTS,
ID_EXP, ID_EXP2, ID_ONCE, ID_ONCE_PER_LIGHT,
ID_PER_LIGHT, ID_PER_N_LIGHTS, ID_DIRECTIONAL, ID_SPOT,
ID_1D, ID_2D, ID_3D, ID_CUBIC,
ID_UNLIMITED, ID_ALPHA, ID_SEPARATE_UV, ID_COMBINED_UVW,
ID_WRAP, ID_CLAMP, ID_MIRROR, ID_BORDER,
ID_BILINEAR, ID_TRILINEAR, ID_ANISOTROPIC, ID_REPLACE,
ID_SOURCE1, ID_SOURCE2, ID_MODULATE_X2, ID_MODULATE_X4,
ID_ADD_SIGNED, ID_ADD_SMOOTH, ID_SUBTRACT, ID_BLEND_DIFFUSE_COLOUR,
ID_BLEND_DIFFUSE_ALPHA, ID_BLEND_TEXTURE_ALPHA, ID_BLEND_CURRENT_ALPHA, ID_BLEND_MANUAL,
ID_DOTPRODUCT, ID_SRC_CURRENT, ID_SRC_TEXTURE, ID_SRC_DIFFUSE,
ID_SRC_SPECULAR, ID_SRC_MANUAL, ID_SPHERICAL, ID_PLANAR,
ID_CUBIC_REFLECTION, ID_CUBIC_NORMAL, ID_SCROLL_X, ID_SCROLL_Y,
ID_SCALE_X, ID_SCALE_Y, ID_SINE, ID_TRIANGLE,
ID_SQUARE, ID_SAWTOOTH, ID_INVERSE_SAWTOOTH, ID_ROTATE,
ID_NAMED, ID_SHADOW, ID_ON, ID_OFF,
ID_TRUE, ID_FALSE, ID_NONE, ID_POINT,
ID_LINEAR, ID_ADD, ID_MODULATE, ID_ALPHA_BLEND,
ID_ONE, ID_ZERO, ID_VERTEX, ID_FRAGMENT,
ID_AUTOTOKENSTART, ID_UNKOWN = 0, ID_VERTEX_PROGRAM, ID_FRAGMENT_PROGRAM,
ID_CLONE, ID_VERTEXCOLOUR, ID_COLOUR_BLEND, ID_DEST_COLOUR,
ID_SRC_COLOUR, ID_ONE_MINUS_DEST_COLOUR, ID_ONE_MINUS_SRC_COLOUR, ID_DEST_ALPHA,
ID_SRC_ALPHA, ID_ONE_MINUS_DEST_ALPHA, ID_ONE_MINUS_SRC_ALPHA, ID_ALWAYS_FAIL,
ID_ALWAYS_PASS, ID_LESS_EQUAL, ID_LESS, ID_EQUAL,
ID_NOT_EQUAL, ID_GREATER_EQUAL, ID_GREATER, ID_CLOCKWISE,
ID_ANTICLOCKWISE, ID_CULL_BACK, ID_CULL_FRONT, ID_FLAT,
ID_GOURAUD, ID_PHONG, ID_SOLID, ID_WIREFRAME,
ID_POINTS, ID_EXP, ID_EXP2, ID_ONCE,
ID_ONCE_PER_LIGHT, ID_PER_LIGHT, ID_PER_N_LIGHTS, ID_DIRECTIONAL,
ID_SPOT, ID_1D, ID_2D, ID_3D,
ID_CUBIC, ID_UNLIMITED, ID_ALPHA, ID_SEPARATE_UV,
ID_COMBINED_UVW, ID_WRAP, ID_CLAMP, ID_MIRROR,
ID_BORDER, ID_BILINEAR, ID_TRILINEAR, ID_ANISOTROPIC,
ID_REPLACE, ID_SOURCE1, ID_SOURCE2, ID_MODULATE_X2,
ID_MODULATE_X4, ID_ADD_SIGNED, ID_ADD_SMOOTH, ID_SUBTRACT,
ID_BLEND_DIFFUSE_COLOUR, ID_BLEND_DIFFUSE_ALPHA, ID_BLEND_TEXTURE_ALPHA, ID_BLEND_CURRENT_ALPHA,
ID_BLEND_MANUAL, ID_DOTPRODUCT, ID_SRC_CURRENT, ID_SRC_TEXTURE,
ID_SRC_DIFFUSE, ID_SRC_SPECULAR, ID_SRC_MANUAL, ID_SPHERICAL,
ID_PLANAR, ID_CUBIC_REFLECTION, ID_CUBIC_NORMAL, ID_SCROLL_X,
ID_SCROLL_Y, ID_SCALE_X, ID_SCALE_Y, ID_SINE,
ID_TRIANGLE, ID_SQUARE, ID_SAWTOOTH, ID_INVERSE_SAWTOOTH,
ID_ROTATE, ID_NAMED, ID_SHADOW, ID_ON,
ID_OFF, ID_TRUE, ID_FALSE, ID_NONE,
ID_POINT, ID_LINEAR, ID_ADD, ID_MODULATE,
ID_ALPHA_BLEND, ID_ONE, ID_ZERO, ID_VERTEX,
ID_FRAGMENT, ID_AUTOTOKENSTART
}

enum | MaterialScriptSection { MSS_NONE, MSS_MATERIAL, MSS_TECHNIQUE, MSS_PASS, MSS_TEXTUREUNIT, MSS_PROGRAM_REF, MSS_PROGRAM, MSS_DEFAULT_PARAMETERS, MSS_TEXTURESOURCE, MSS_NONE, MSS_MATERIAL, MSS_TECHNIQUE, MSS_PASS, MSS_TEXTUREUNIT, MSS_PROGRAM_REF, MSS_PROGRAM, MSS_DEFAULT_PARAMETERS, MSS_TEXTURESOURCE }
| Enum to identify material sections. More...

enum

TokenID {
ID_UNKOWN = 0, ID_VERTEX_PROGRAM, ID_FRAGMENT_PROGRAM, ID_CLONE,
ID_VERTEXCOLOUR, ID_COLOUR_BLEND, ID_DEST_COLOUR, ID_SRC_COLOUR,
ID_ONE_MINUS_DEST_COLOUR, ID_ONE_MINUS_SRC_COLOUR, ID_DEST_ALPHA, ID_SRC_ALPHA,
ID_ONE_MINUS_DEST_ALPHA, ID_ONE_MINUS_SRC_ALPHA, ID_ALWAYS_FAIL, ID_ALWAYS_PASS,
ID_LESS_EQUAL, ID_LESS, ID_EQUAL, ID_NOT_EQUAL,
ID_GREATER_EQUAL, ID_GREATER, ID_CLOCKWISE, ID_ANTICLOCKWISE,
ID_CULL_BACK, ID_CULL_FRONT, ID_FLAT, ID_GOURAUD,
ID_PHONG, ID_SOLID, ID_WIREFRAME, ID_POINTS,
ID_EXP, ID_EXP2, ID_ONCE, ID_ONCE_PER_LIGHT,
ID_PER_LIGHT, ID_PER_N_LIGHTS, ID_DIRECTIONAL, ID_SPOT,
ID_1D, ID_2D, ID_3D, ID_CUBIC,
ID_UNLIMITED, ID_ALPHA, ID_SEPARATE_UV, ID_COMBINED_UVW,
ID_WRAP, ID_CLAMP, ID_MIRROR, ID_BORDER,
ID_BILINEAR, ID_TRILINEAR, ID_ANISOTROPIC, ID_REPLACE,
ID_SOURCE1, ID_SOURCE2, ID_MODULATE_X2, ID_MODULATE_X4,
ID_ADD_SIGNED, ID_ADD_SMOOTH, ID_SUBTRACT, ID_BLEND_DIFFUSE_COLOUR,
ID_BLEND_DIFFUSE_ALPHA, ID_BLEND_TEXTURE_ALPHA, ID_BLEND_CURRENT_ALPHA, ID_BLEND_MANUAL,
ID_DOTPRODUCT, ID_SRC_CURRENT, ID_SRC_TEXTURE, ID_SRC_DIFFUSE,
ID_SRC_SPECULAR, ID_SRC_MANUAL, ID_SPHERICAL, ID_PLANAR,
ID_CUBIC_REFLECTION, ID_CUBIC_NORMAL, ID_SCROLL_X, ID_SCROLL_Y,
ID_SCALE_X, ID_SCALE_Y, ID_SINE, ID_TRIANGLE,
ID_SQUARE, ID_SAWTOOTH, ID_INVERSE_SAWTOOTH, ID_ROTATE,
ID_NAMED, ID_SHADOW, ID_ON, ID_OFF,
ID_TRUE, ID_FALSE, ID_NONE, ID_POINT,
ID_LINEAR, ID_ADD, ID_MODULATE, ID_ALPHA_BLEND,
ID_ONE, ID_ZERO, ID_VERTEX, ID_FRAGMENT,
ID_AUTOTOKENSTART, ID_UNKOWN = 0, ID_VERTEX_PROGRAM, ID_FRAGMENT_PROGRAM,
ID_CLONE, ID_VERTEXCOLOUR, ID_COLOUR_BLEND, ID_DEST_COLOUR,
ID_SRC_COLOUR, ID_ONE_MINUS_DEST_COLOUR, ID_ONE_MINUS_SRC_COLOUR, ID_DEST_ALPHA,
ID_SRC_ALPHA, ID_ONE_MINUS_DEST_ALPHA, ID_ONE_MINUS_SRC_ALPHA, ID_ALWAYS_FAIL,
ID_ALWAYS_PASS, ID_LESS_EQUAL, ID_LESS, ID_EQUAL,
ID_NOT_EQUAL, ID_GREATER_EQUAL, ID_GREATER, ID_CLOCKWISE,
ID_ANTICLOCKWISE, ID_CULL_BACK, ID_CULL_FRONT, ID_FLAT,
ID_GOURAUD, ID_PHONG, ID_SOLID, ID_WIREFRAME,
ID_POINTS, ID_EXP, ID_EXP2, ID_ONCE,
ID_ONCE_PER_LIGHT, ID_PER_LIGHT, ID_PER_N_LIGHTS, ID_DIRECTIONAL,
ID_SPOT, ID_1D, ID_2D, ID_3D,
ID_CUBIC, ID_UNLIMITED, ID_ALPHA, ID_SEPARATE_UV,
ID_COMBINED_UVW, ID_WRAP, ID_CLAMP, ID_MIRROR,
ID_BORDER, ID_BILINEAR, ID_TRILINEAR, ID_ANISOTROPIC,
ID_REPLACE, ID_SOURCE1, ID_SOURCE2, ID_MODULATE_X2,
ID_MODULATE_X4, ID_ADD_SIGNED, ID_ADD_SMOOTH, ID_SUBTRACT,
ID_BLEND_DIFFUSE_COLOUR, ID_BLEND_DIFFUSE_ALPHA, ID_BLEND_TEXTURE_ALPHA, ID_BLEND_CURRENT_ALPHA,
ID_BLEND_MANUAL, ID_DOTPRODUCT, ID_SRC_CURRENT, ID_SRC_TEXTURE,
ID_SRC_DIFFUSE, ID_SRC_SPECULAR, ID_SRC_MANUAL, ID_SPHERICAL,
ID_PLANAR, ID_CUBIC_REFLECTION, ID_CUBIC_NORMAL, ID_SCROLL_X,
ID_SCROLL_Y, ID_SCALE_X, ID_SCALE_Y, ID_SINE,
ID_TRIANGLE, ID_SQUARE, ID_SAWTOOTH, ID_INVERSE_SAWTOOTH,
ID_ROTATE, ID_NAMED, ID_SHADOW, ID_ON,
ID_OFF, ID_TRUE, ID_FALSE, ID_NONE,
ID_POINT, ID_LINEAR, ID_ADD, ID_MODULATE,
ID_ALPHA_BLEND, ID_ONE, ID_ZERO, ID_VERTEX,
ID_FRAGMENT, ID_AUTOTOKENSTART
}

enum | MaterialScriptSection { MSS_NONE, MSS_MATERIAL, MSS_TECHNIQUE, MSS_PASS, MSS_TEXTUREUNIT, MSS_PROGRAM_REF, MSS_PROGRAM, MSS_DEFAULT_PARAMETERS, MSS_TEXTURESOURCE, MSS_NONE, MSS_MATERIAL, MSS_TECHNIQUE, MSS_PASS, MSS_TEXTUREUNIT, MSS_PROGRAM_REF, MSS_PROGRAM, MSS_DEFAULT_PARAMETERS, MSS_TEXTURESOURCE }
| Enum to identify material sections. More...
typedef void(MaterialScriptCompiler::* | MSC_Action )(void)
typedef std::map < size_t, MSC_Action > | TokenActionMap
typedef TokenActionMap::iterator | TokenActionIterator
typedef void(MaterialScriptCompiler::* | MSC_Action )(void)
typedef std::map < size_t, MSC_Action > | TokenActionMap
typedef TokenActionMap::iterator | TokenActionIterator
enum | OperationType { otUNKNOWN, otRULE, otAND, otOR, otOPTIONAL, otREPEAT, otDATA, otNOT_TEST, otINSERT_TOKEN, otEND }
enum | SystemRuleToken { _no_token_ = SystemTokenBase, _character_, _value_, _no_space_skip_ }

enum

BNF_ID {
BNF_UNKOWN = 0, BNF_SYNTAX, BNF_RULE, BNF_IDENTIFIER,
BNF_IDENTIFIER_RIGHT, BNF_IDENTIFIER_CHARACTERS, BNF_ID_BEGIN, BNF_ID_END,
BNF_CONSTANT_BEGIN, BNF_SET_RULE, BNF_EXPRESSION, BNF_AND_TERM,
BNF_OR_TERM, BNF_TERM, BNF_TERM_ID, BNF_CONSTANT,
BNF_OR, BNF_TERMINAL_SYMBOL, BNF_TERMINAL_START, BNF_REPEAT_EXPRESSION,
BNF_REPEAT_BEGIN, BNF_REPEAT_END, BNF_SET, BNF_SET_BEGIN,
BNF_SET_END, BNF_NOT_TEST, BNF_NOT_TEST_BEGIN, BNF_CONDITIONAL_TOKEN_INSERT,
BNF_OPTIONAL_EXPRESSION, BNF_NOT_EXPRESSION, BNF_NOT_CHK, BNF_OPTIONAL_BEGIN,
BNF_OPTIONAL_END, BNF_NO_TOKEN_START, BNF_SINGLEQUOTE, BNF_SINGLE_QUOTE_EXC,
BNF_SET_END_EXC, BNF_ANY_CHARACTER, BNF_SPECIAL_CHARACTERS1, BNF_SPECIAL_CHARACTERS2,
BNF_WHITE_SPACE_CHK, BNF_LETTER, BNF_LETTER_DIGIT, BNF_DIGIT,
BNF_WHITE_SPACE, BNF_ALPHA_SET, BNF_NUMBER_SET, BNF_SPECIAL_CHARACTER_SET1,
BNF_SPECIAL_CHARACTER_SET2, BNF_SPECIAL_CHARACTER_SET3, BNF_NOT_CHARS, BNF_AUTOTOKENSTART
}

typedef std::vector < TokenRule > | TokenRuleContainer
typedef TokenRuleContainer::iterator | TokenRuleIterator
typedef std::vector < LexemeTokenDef > | LexemeTokenDefContainer
typedef LexemeTokenDefContainer::iterator | LexemeTokenDefIterator
typedef std::map < std::string, size_t > | LexemeTokenMap
typedef LexemeTokenMap::iterator | TokenKeyIterator
typedef std::vector < TokenInst > | TokenInstContainer
typedef TokenInstContainer::iterator | TokenInstIterator
typedef std::map < size_t, String > | LabelContainer
| storage container for string labels defined in source container uses Token index as a key associated with a label

## Protected Member Functions

virtual void | executeTokenAction (const size_t tokenID)
| Execute an Action associated with a token.
virtual size_t | getAutoTokenIDStart () const
| Get the start position of auto generated token IDs.
virtual void | setupTokenDefinitions (void)
| Associate all the lexemes used in a material script with their corresponding tokens and actions.
void | addLexemeTokenAction (const String &lexeme, const size_t token, const MSC_Action action=0)
void | addLexemeAction (const String &lexeme, const MSC_Action action)
| Associate all the lexemes used in a material script with their corresponding actions and have token IDs auto-generated.
void | logParseError (const String &error)
ColourValue | _parseColourValue (void)
CompareFunction | convertCompareFunction (void)
void | parseOpenBrace (void)
void | parseCloseBrace (void)
void | parseMaterial (void)
void | parseLodDistances (void)
void | parseReceiveShadows (void)
void | parseTransparencyCastsShadows (void)
void | parseSetTextureAlias (void)
void | parseTechnique (void)
void | parseScheme (void)
void | parseLodIndex (void)
void | parsePass (void)
void | parseAmbient (void)
void | parseDiffuse (void)
void | parseSpecular (void)
void | parseEmissive (void)
void | parseSceneBlend (void)
SceneBlendFactor | convertBlendFactor (void)
void | parseDepthCheck (void)
void | parseDepthWrite (void)
void | parseDepthFunc (void)
void | parseDepthBias (void)
void | parseAlphaRejection (void)
void | parseCullHardware (void)
void | parseCullSoftware (void)
void | parseLighting (void)
void | parseShading (void)
void | parsePolygonMode (void)
void | parseFogOverride (void)
void | parseMaxLights (void)
void | parseStartLight (void)
void | parseIteration (void)
void | parseIterationLightTypes (void)
void | parseColourWrite (void)
void | parsePointSize (void)
void | parsePointSprites (void)
void | parsePointSizeMin (void)
void | parsePointSizeMax (void)
void | parsePointSizeAttenuation (void)
void | parseTextureUnit (void)
void | parseTextureAlias (void)
void | parseTexture (void)
void | parseAnimTexture (void)
void | parseCubicTexture (void)
void | parseTexCoord (void)
TextureUnitState::TextureAddressingMode | convTexAddressMode (void)
void | parseTexAddressMode (void)
void | parseTexBorderColour (void)
void | parseFiltering (void)
FilterOptions | convertFiltering ()
void | parseMaxAnisotropy (void)
void | parseMipMapBias (void)
void | parseColourOp (void)
void | parseColourOpEx (void)
LayerBlendOperationEx | convertBlendOpEx (void)
LayerBlendSource | convertBlendSource (void)
void | parseColourOpMultipassFallback (void)
void | parseAlphaOpEx (void)
void | parseEnvMap (void)
void | parseScroll (void)
void | parseScrollAnim (void)
void | parseRotate (void)
void | parseRotateAnim (void)
void | parseScale (void)
void | parseWaveXform (void)
void | parseTransform (void)
void | parseTextureCustomParameter (void)
void | parseBindingType (void)
void | parseContentType (void)
void | parseGPUProgram (void)
void | parseProgramSource (void)
void | parseProgramSyntax (void)
void | parseProgramCustomParameter (void)
void | parseDefaultParams (void)
void | parseProgramSkeletalAnimation (void)
void | parseProgramMorphAnimation (void)
void | parseProgramPoseAnimation (void)
void | parseProgramVertexTextureFetch (void)
void | parseVertexProgramRef (void)
void | parseFragmentProgramRef (void)
void | parseShadowCasterVertexProgramRef (void)
void | parseShadowReceiverVertexProgramRef (void)
void | parseShadowReceiverFragmentProgramRef (void)
void | parseParamIndexed (void)
void | parseParamIndexedAuto (void)
void | parseParamNamed (void)
void | parseParamNamedAuto (void)
void | processManualProgramParam (bool isNamed, const String commandName, size_t index=0, const String &paramName=StringUtil::BLANK)
void | processAutoProgramParam (bool isNamed, const String commandName, size_t index, const String &paramName=StringUtil::BLANK)
void | finishProgramDefinition (void)
virtual void | executeTokenAction (const size_t tokenID)
| Execute an Action associated with a token.
virtual size_t | getAutoTokenIDStart () const
| Get the start position of auto generated token IDs.
virtual void | setupTokenDefinitions (void)
| Associate all the lexemes used in a material script with their corresponding tokens and actions.
void | addLexemeTokenAction (const String &lexeme, const size_t token, const MSC_Action action=0)
void | addLexemeAction (const String &lexeme, const MSC_Action action)
| Associate all the lexemes used in a material script with their corresponding actions and have token IDs auto-generated.
void | logParseError (const String &error)
ColourValue | _parseColourValue (void)
CompareFunction | convertCompareFunction (void)
void | parseOpenBrace (void)
void | parseCloseBrace (void)
void | parseMaterial (void)
void | parseLodDistances (void)
void | parseReceiveShadows (void)
void | parseTransparencyCastsShadows (void)
void | parseSetTextureAlias (void)
void | parseTechnique (void)
void | parseScheme (void)
void | parseLodIndex (void)
void | parsePass (void)
void | parseAmbient (void)
void | parseDiffuse (void)
void | parseSpecular (void)
void | parseEmissive (void)
void | parseSceneBlend (void)
SceneBlendFactor | convertBlendFactor (void)
void | parseDepthCheck (void)
void | parseDepthWrite (void)
void | parseDepthFunc (void)
void | parseDepthBias (void)
void | parseAlphaRejection (void)
void | parseCullHardware (void)
void | parseCullSoftware (void)
void | parseLighting (void)
void | parseShading (void)
void | parsePolygonMode (void)
void | parseFogOverride (void)
void | parseMaxLights (void)
void | parseStartLight (void)
void | parseIteration (void)
void | parseIterationLightTypes (void)
void | parseColourWrite (void)
void | parsePointSize (void)
void | parsePointSprites (void)
void | parsePointSizeMin (void)
void | parsePointSizeMax (void)
void | parsePointSizeAttenuation (void)
void | parseTextureUnit (void)
void | parseTextureAlias (void)
void | parseTexture (void)
void | parseAnimTexture (void)
void | parseCubicTexture (void)
void | parseTexCoord (void)
TextureUnitState::TextureAddressingMode | convTexAddressMode (void)
void | parseTexAddressMode (void)
void | parseTexBorderColour (void)
void | parseFiltering (void)
FilterOptions | convertFiltering ()
void | parseMaxAnisotropy (void)
void | parseMipMapBias (void)
void | parseColourOp (void)
void | parseColourOpEx (void)
LayerBlendOperationEx | convertBlendOpEx (void)
LayerBlendSource | convertBlendSource (void)
void | parseColourOpMultipassFallback (void)
void | parseAlphaOpEx (void)
void | parseEnvMap (void)
void | parseScroll (void)
void | parseScrollAnim (void)
void | parseRotate (void)
void | parseRotateAnim (void)
void | parseScale (void)
void | parseWaveXform (void)
void | parseTransform (void)
void | parseTextureCustomParameter (void)
void | parseBindingType (void)
void | parseContentType (void)
void | parseGPUProgram (void)
void | parseProgramSource (void)
void | parseProgramSyntax (void)
void | parseProgramCustomParameter (void)
void | parseDefaultParams (void)
void | parseProgramSkeletalAnimation (void)
void | parseProgramMorphAnimation (void)
void | parseProgramPoseAnimation (void)
void | parseProgramVertexTextureFetch (void)
void | parseVertexProgramRef (void)
void | parseFragmentProgramRef (void)
void | parseShadowCasterVertexProgramRef (void)
void | parseShadowReceiverVertexProgramRef (void)
void | parseShadowReceiverFragmentProgramRef (void)
void | parseParamIndexed (void)
void | parseParamIndexedAuto (void)
void | parseParamNamed (void)
void | parseParamNamedAuto (void)
void | processManualProgramParam (bool isNamed, const String commandName, size_t index=0, const String &paramName=StringUtil::BLANK)
void | processAutoProgramParam (bool isNamed, const String commandName, size_t index, const String &paramName=StringUtil::BLANK)
void | finishProgramDefinition (void)
bool | doPass1 ()
| perform pass 1 of compile process scans source for lexemes that can be tokenized and then performs general semantic and context verification on each lexeme before it is tokenized.
bool | doPass2 ()
| performs Pass 2 of compile process which is execution of the tokens
const TokenInst & | getNextToken (const size_t expectedTokenID=0) const
| Gets the next token from the instruction que.
const TokenInst & | getCurrentToken (const size_t expectedTokenID=0) const
| Gets the current token from the instruction que.
bool | testNextTokenID (const size_t expectedTokenID) const
| If a next token instruction exist then test if its token ID matches.
bool | testCurrentTokenID (const size_t expectedTokenID) const
| If a current token instruction exist then test if its token ID matches.
void | skipToken (void) const
| skip to the next token in the pass2 queue.
void | replaceToken (void)
| go back to the previous token in the pass2 queue.
float | getNextTokenValue (void) const
| Gets the next token's associated floating point value in the instruction que that was parsed from the text source.
float | getCurrentTokenValue (void) const
| Gets the current token's associated floating point value in the instruction que that was parsed from the text source.
const String & | getNextTokenLabel (void) const
| Gets the next token's associated text label in the instruction que that was parsed from the text source.
const String & | getCurrentTokenLabel (void) const
| Gets the next token's associated text label in the instruction que that was parsed from the text source.
size_t | getNextTokenID (void) const
| Get the next token's ID value.
size_t | getCurrentTokenID (void) const
| Get the current token's ID value.
const String & | getNextTokenLexeme (void) const
| Get the next token's lexeme string.
const String & | getCurrentTokenLexeme (void) const
| Get the current token's lexeme string.
size_t | getPass2TokenQueCount (void) const
| Gets the number of tokens waiting in the instruction que that need to be processed by an token action in pass 2.
size_t | getRemainingTokensForAction (void) const
| Get the number of tokens not processed by action token.
void | setPass2TokenQuePosition (size_t pos, const bool activateAction=false)
| Manualy set the Pass2 Token que position.
size_t | getPass2TokenQuePosition (void) const
| Get the current position in the Pass2 Token Que.
bool | setNextActionQuePosition (size_t pos, const bool search=false)
| Set the position of the next token action in the Pass2 Token Que.
size_t | addLexemeToken (const String &lexeme, const size_t token, const bool hasAction=false, const bool caseSensitive=false)
| Add a lexeme token association.
void | setClientBNFGrammer (void)
| Sets up the parser rules for the client based on the BNF Grammer text passed in.
void | findEOL ()
| find the eol charater
bool | isFloatValue (float &fvalue, size_t &charsize) const
| check to see if the text at the present position in the source is a numerical constant
bool | isCharacterLabel (const size_t rulepathIDX)
| Check if source at current position is supposed to be a user defined character label.
bool | isLexemeMatch (const String &lexeme, const bool caseSensitive) const
| check to see if the text is in the lexeme text library
bool | isEndOfSource () const
| Check if pass 1 has parsed to the end of the source.
bool | positionToNextLexeme ()
| position to the next possible valid sysmbol
bool | processRulePath (size_t rulepathIDX)
| process input source text using rulepath to determine allowed tokens
void | setActiveContexts (const uint contexts)
| setup ActiveContexts - should be called by subclass to setup initial language contexts
void | skipComments ()
| comment specifiers are hard coded
void | skipEOL ()
| find end of line marker and move past it
void | skipWhiteSpace ()
| skip all the white space which includes spaces and tabs
bool | ValidateToken (const size_t rulepathIDX, const size_t activeRuleID)
| check if current position in source has the lexeme text equivalent to the TokenID
void | verifyTokenRuleLinks (const String &grammerName)
| scan through all the rules and initialize token definition with index to rules for non-terminal tokens.
void | checkTokenActionTrigger (void)
| Checks the last token instruction and if it has an action then it triggers the action of the previously found token having an action.
String | getBNFGrammerTextFromRulePath (size_t ruleID, const size_t level=0)
| Get the text representation of the rule path.

## Protected Attributes

MaterialScriptContext | mScriptContext
TokenState * | mClientTokenState
TokenState * | mActiveTokenState
| Active token que, definitions, rules currntly being used by parser.
size_t | mPass2TokenQuePosition
| the location within the token instruction container where pass 2 is
size_t | mPreviousActionQuePosition
| the que position of the previous token that had an action.
size_t | mNextActionQuePosition
| the que position for the next token that has an action.
const String * | mSource
| pointer to the source to be compiled
String | mSourceName
| name of the source to be compiled
size_t | mEndOfSource
size_t | mCurrentLine
size_t | mCharPos
| current line number in source being tokenized
size_t | mErrorCharPos
| position in current line in source being tokenized
std::map< size_t, float > | mConstants
| character position in source where last error occured
LabelContainer | mLabels
bool | mLabelIsActive
| flag indicates when a label is being parsed.
size_t | mActiveLabelKey
| the key of the active label being built during pass 1.
String * | mActiveLabel
| The active label that is receiving characters during pass 1.
bool | mNoSpaceSkip
| flag being true indicates that spaces are not to be skipped automatically gets set to false when mLabelIsActive goes to false
bool | mNoTerminalToken
| if flag is true then next terminal token is not added to token que if found but does effect rule path flow
size_t | mInsertTokenID
| TokenID to insert if next rule finds a terminal token if zero then no token inserted.
uint | mActiveContexts
| Active Contexts pattern used in pass 1 to determine which tokens are valid for a certain context.

## Static Protected Attributes

static TokenActionMap | mTokenActionMap
| Map of Token value as key to an Action.
static const size_t | SystemTokenBase = 1000

## Classes

struct | MaterialScriptContext
| Struct for holding the script context while parsing. More...
struct | MaterialScriptProgramDefinition
| Struct for holding a program definition which is in progress. More...

## Detailed Description

Definition at line 41 of file Attic/OgreMaterialScriptCompiler.h.

## Member Typedef Documentation

typedef void(MaterialScriptCompiler::* Ogre::MaterialScriptCompiler::MSC_Action)(void)`[protected]`

Definition at line 194 of file Attic/OgreMaterialScriptCompiler.h.

typedef std::map<size_t, MSC_Action> Ogre::MaterialScriptCompiler::TokenActionMap`[protected]`

Definition at line 195 of file Attic/OgreMaterialScriptCompiler.h.

typedef TokenActionMap::iterator Ogre::MaterialScriptCompiler::TokenActionIterator`[protected]`

Definition at line 196 of file Attic/OgreMaterialScriptCompiler.h.

typedef void(MaterialScriptCompiler::* Ogre::MaterialScriptCompiler::MSC_Action)(void)`[protected]`

Definition at line 194 of file OgreMaterialScriptCompiler.h.

typedef std::map<size_t, MSC_Action> Ogre::MaterialScriptCompiler::TokenActionMap`[protected]`

Definition at line 195 of file OgreMaterialScriptCompiler.h.

typedef TokenActionMap::iterator Ogre::MaterialScriptCompiler::TokenActionIterator`[protected]`

Definition at line 196 of file OgreMaterialScriptCompiler.h.

typedef std::vector<TokenRule> Ogre::Compiler2Pass::TokenRuleContainer`[protected, inherited]`

Definition at line 174 of file OgreCompiler2Pass.h.

typedef TokenRuleContainer::iterator Ogre::Compiler2Pass::TokenRuleIterator`[protected, inherited]`

Definition at line 175 of file OgreCompiler2Pass.h.

typedef std::vector<LexemeTokenDef> Ogre::Compiler2Pass::LexemeTokenDefContainer`[protected, inherited]`

Definition at line 228 of file OgreCompiler2Pass.h.

typedef LexemeTokenDefContainer::iterator Ogre::Compiler2Pass::LexemeTokenDefIterator`[protected, inherited]`

Definition at line 229 of file OgreCompiler2Pass.h.

typedef std::map<std::string, size_t> Ogre::Compiler2Pass::LexemeTokenMap`[protected, inherited]`

Definition at line 231 of file OgreCompiler2Pass.h.

typedef LexemeTokenMap::iterator Ogre::Compiler2Pass::TokenKeyIterator`[protected, inherited]`

Definition at line 232 of file OgreCompiler2Pass.h.

typedef std::vector<TokenInst> Ogre::Compiler2Pass::TokenInstContainer`[protected, inherited]`

Definition at line 246 of file OgreCompiler2Pass.h.

typedef TokenInstContainer::iterator Ogre::Compiler2Pass::TokenInstIterator`[protected, inherited]`

Definition at line 247 of file OgreCompiler2Pass.h.

typedef std::map<size_t, String> Ogre::Compiler2Pass::LabelContainer`[protected, inherited]`

storage container for string labels defined in source container uses Token index as a key associated with a label

Definition at line 287 of file OgreCompiler2Pass.h.

## Member Enumeration Documentation

enum Ogre::MaterialScriptCompiler::TokenID`[protected]`

Enumerator:

  ID_UNKOWN |
  ID_VERTEX_PROGRAM |
  ID_FRAGMENT_PROGRAM |
  ID_CLONE |
  ID_VERTEXCOLOUR |
  ID_COLOUR_BLEND |
  ID_DEST_COLOUR |
  ID_SRC_COLOUR |
  ID_ONE_MINUS_DEST_COLOUR |
  ID_ONE_MINUS_SRC_COLOUR |
  ID_DEST_ALPHA |
  ID_SRC_ALPHA |
  ID_ONE_MINUS_DEST_ALPHA |
  ID_ONE_MINUS_SRC_ALPHA |
  ID_ALWAYS_FAIL |
  ID_ALWAYS_PASS |
  ID_LESS_EQUAL |
  ID_LESS |
  ID_EQUAL |
  ID_NOT_EQUAL |
  ID_GREATER_EQUAL |
  ID_GREATER |
  ID_CLOCKWISE |
  ID_ANTICLOCKWISE |
  ID_CULL_BACK |
  ID_CULL_FRONT |
  ID_FLAT |
  ID_GOURAUD |
  ID_PHONG |
  ID_SOLID |
  ID_WIREFRAME |
  ID_POINTS |
  ID_EXP |
  ID_EXP2 |
  ID_ONCE |
  ID_ONCE_PER_LIGHT |
  ID_PER_LIGHT |
  ID_PER_N_LIGHTS |
  ID_DIRECTIONAL |
  ID_SPOT |
  ID_1D |
  ID_2D |
  ID_3D |
  ID_CUBIC |
  ID_UNLIMITED |
  ID_ALPHA |
  ID_SEPARATE_UV |
  ID_COMBINED_UVW |
  ID_WRAP |
  ID_CLAMP |
  ID_MIRROR |
  ID_BORDER |
  ID_BILINEAR |
  ID_TRILINEAR |
  ID_ANISOTROPIC |
  ID_REPLACE |
  ID_SOURCE1 |
  ID_SOURCE2 |
  ID_MODULATE_X2 |
  ID_MODULATE_X4 |
  ID_ADD_SIGNED |
  ID_ADD_SMOOTH |
  ID_SUBTRACT |
  ID_BLEND_DIFFUSE_COLOUR |
  ID_BLEND_DIFFUSE_ALPHA |
  ID_BLEND_TEXTURE_ALPHA |
  ID_BLEND_CURRENT_ALPHA |
  ID_BLEND_MANUAL |
  ID_DOTPRODUCT |
  ID_SRC_CURRENT |
  ID_SRC_TEXTURE |
  ID_SRC_DIFFUSE |
  ID_SRC_SPECULAR |
  ID_SRC_MANUAL |
  ID_SPHERICAL |
  ID_PLANAR |
  ID_CUBIC_REFLECTION |
  ID_CUBIC_NORMAL |
  ID_SCROLL_X |
  ID_SCROLL_Y |
  ID_SCALE_X |
  ID_SCALE_Y |
  ID_SINE |
  ID_TRIANGLE |
  ID_SQUARE |
  ID_SAWTOOTH |
  ID_INVERSE_SAWTOOTH |
  ID_ROTATE |
  ID_NAMED |
  ID_SHADOW |
  ID_ON |
  ID_OFF |
  ID_TRUE |
  ID_FALSE |
  ID_NONE |
  ID_POINT |
  ID_LINEAR |
  ID_ADD |
  ID_MODULATE |
  ID_ALPHA_BLEND |
  ID_ONE |
  ID_ZERO |
  ID_VERTEX |
  ID_FRAGMENT |
  ID_AUTOTOKENSTART |
  ID_UNKOWN |
  ID_VERTEX_PROGRAM |
  ID_FRAGMENT_PROGRAM |
  ID_CLONE |
  ID_VERTEXCOLOUR |
  ID_COLOUR_BLEND |
  ID_DEST_COLOUR |
  ID_SRC_COLOUR |
  ID_ONE_MINUS_DEST_COLOUR |
  ID_ONE_MINUS_SRC_COLOUR |
  ID_DEST_ALPHA |
  ID_SRC_ALPHA |
  ID_ONE_MINUS_DEST_ALPHA |
  ID_ONE_MINUS_SRC_ALPHA |
  ID_ALWAYS_FAIL |
  ID_ALWAYS_PASS |
  ID_LESS_EQUAL |
  ID_LESS |
  ID_EQUAL |
  ID_NOT_EQUAL |
  ID_GREATER_EQUAL |
  ID_GREATER |
  ID_CLOCKWISE |
  ID_ANTICLOCKWISE |
  ID_CULL_BACK |
  ID_CULL_FRONT |
  ID_FLAT |
  ID_GOURAUD |
  ID_PHONG |
  ID_SOLID |
  ID_WIREFRAME |
  ID_POINTS |
  ID_EXP |
  ID_EXP2 |
  ID_ONCE |
  ID_ONCE_PER_LIGHT |
  ID_PER_LIGHT |
  ID_PER_N_LIGHTS |
  ID_DIRECTIONAL |
  ID_SPOT |
  ID_1D |
  ID_2D |
  ID_3D |
  ID_CUBIC |
  ID_UNLIMITED |
  ID_ALPHA |
  ID_SEPARATE_UV |
  ID_COMBINED_UVW |
  ID_WRAP |
  ID_CLAMP |
  ID_MIRROR |
  ID_BORDER |
  ID_BILINEAR |
  ID_TRILINEAR |
  ID_ANISOTROPIC |
  ID_REPLACE |
  ID_SOURCE1 |
  ID_SOURCE2 |
  ID_MODULATE_X2 |
  ID_MODULATE_X4 |
  ID_ADD_SIGNED |
  ID_ADD_SMOOTH |
  ID_SUBTRACT |
  ID_BLEND_DIFFUSE_COLOUR |
  ID_BLEND_DIFFUSE_ALPHA |
  ID_BLEND_TEXTURE_ALPHA |
  ID_BLEND_CURRENT_ALPHA |
  ID_BLEND_MANUAL |
  ID_DOTPRODUCT |
  ID_SRC_CURRENT |
  ID_SRC_TEXTURE |
  ID_SRC_DIFFUSE |
  ID_SRC_SPECULAR |
  ID_SRC_MANUAL |
  ID_SPHERICAL |
  ID_PLANAR |
  ID_CUBIC_REFLECTION |
  ID_CUBIC_NORMAL |
  ID_SCROLL_X |
  ID_SCROLL_Y |
  ID_SCALE_X |
  ID_SCALE_Y |
  ID_SINE |
  ID_TRIANGLE |
  ID_SQUARE |
  ID_SAWTOOTH |
  ID_INVERSE_SAWTOOTH |
  ID_ROTATE |
  ID_NAMED |
  ID_SHADOW |
  ID_ON |
  ID_OFF |
  ID_TRUE |
  ID_FALSE |
  ID_NONE |
  ID_POINT |
  ID_LINEAR |
  ID_ADD |
  ID_MODULATE |
  ID_ALPHA_BLEND |
  ID_ONE |
  ID_ZERO |
  ID_VERTEX |
  ID_FRAGMENT |
  ID_AUTOTOKENSTART |

Definition at line 70 of file Attic/OgreMaterialScriptCompiler.h.

enum Ogre::MaterialScriptCompiler::MaterialScriptSection`[protected]`

Enum to identify material sections.

Enumerator:

  MSS_NONE |
  MSS_MATERIAL |
  MSS_TECHNIQUE |
  MSS_PASS |
  MSS_TEXTUREUNIT |
  MSS_PROGRAM_REF |
  MSS_PROGRAM |
  MSS_DEFAULT_PARAMETERS |
  MSS_TEXTURESOURCE |
  MSS_NONE |
  MSS_MATERIAL |
  MSS_TECHNIQUE |
  MSS_PASS |
  MSS_TEXTUREUNIT |
  MSS_PROGRAM_REF |
  MSS_PROGRAM |
  MSS_DEFAULT_PARAMETERS |
  MSS_TEXTURESOURCE |

Definition at line 139 of file Attic/OgreMaterialScriptCompiler.h.

enum Ogre::MaterialScriptCompiler::TokenID`[protected]`

Enumerator:

  ID_UNKOWN |
  ID_VERTEX_PROGRAM |
  ID_FRAGMENT_PROGRAM |
  ID_CLONE |
  ID_VERTEXCOLOUR |
  ID_COLOUR_BLEND |
  ID_DEST_COLOUR |
  ID_SRC_COLOUR |
  ID_ONE_MINUS_DEST_COLOUR |
  ID_ONE_MINUS_SRC_COLOUR |
  ID_DEST_ALPHA |
  ID_SRC_ALPHA |
  ID_ONE_MINUS_DEST_ALPHA |
  ID_ONE_MINUS_SRC_ALPHA |
  ID_ALWAYS_FAIL |
  ID_ALWAYS_PASS |
  ID_LESS_EQUAL |
  ID_LESS |
  ID_EQUAL |
  ID_NOT_EQUAL |
  ID_GREATER_EQUAL |
  ID_GREATER |
  ID_CLOCKWISE |
  ID_ANTICLOCKWISE |
  ID_CULL_BACK |
  ID_CULL_FRONT |
  ID_FLAT |
  ID_GOURAUD |
  ID_PHONG |
  ID_SOLID |
  ID_WIREFRAME |
  ID_POINTS |
  ID_EXP |
  ID_EXP2 |
  ID_ONCE |
  ID_ONCE_PER_LIGHT |
  ID_PER_LIGHT |
  ID_PER_N_LIGHTS |
  ID_DIRECTIONAL |
  ID_SPOT |
  ID_1D |
  ID_2D |
  ID_3D |
  ID_CUBIC |
  ID_UNLIMITED |
  ID_ALPHA |
  ID_SEPARATE_UV |
  ID_COMBINED_UVW |
  ID_WRAP |
  ID_CLAMP |
  ID_MIRROR |
  ID_BORDER |
  ID_BILINEAR |
  ID_TRILINEAR |
  ID_ANISOTROPIC |
  ID_REPLACE |
  ID_SOURCE1 |
  ID_SOURCE2 |
  ID_MODULATE_X2 |
  ID_MODULATE_X4 |
  ID_ADD_SIGNED |
  ID_ADD_SMOOTH |
  ID_SUBTRACT |
  ID_BLEND_DIFFUSE_COLOUR |
  ID_BLEND_DIFFUSE_ALPHA |
  ID_BLEND_TEXTURE_ALPHA |
  ID_BLEND_CURRENT_ALPHA |
  ID_BLEND_MANUAL |
  ID_DOTPRODUCT |
  ID_SRC_CURRENT |
  ID_SRC_TEXTURE |
  ID_SRC_DIFFUSE |
  ID_SRC_SPECULAR |
  ID_SRC_MANUAL |
  ID_SPHERICAL |
  ID_PLANAR |
  ID_CUBIC_REFLECTION |
  ID_CUBIC_NORMAL |
  ID_SCROLL_X |
  ID_SCROLL_Y |
  ID_SCALE_X |
  ID_SCALE_Y |
  ID_SINE |
  ID_TRIANGLE |
  ID_SQUARE |
  ID_SAWTOOTH |
  ID_INVERSE_SAWTOOTH |
  ID_ROTATE |
  ID_NAMED |
  ID_SHADOW |
  ID_ON |
  ID_OFF |
  ID_TRUE |
  ID_FALSE |
  ID_NONE |
  ID_POINT |
  ID_LINEAR |
  ID_ADD |
  ID_MODULATE |
  ID_ALPHA_BLEND |
  ID_ONE |
  ID_ZERO |
  ID_VERTEX |
  ID_FRAGMENT |
  ID_AUTOTOKENSTART |
  ID_UNKOWN |
  ID_VERTEX_PROGRAM |
  ID_FRAGMENT_PROGRAM |
  ID_CLONE |
  ID_VERTEXCOLOUR |
  ID_COLOUR_BLEND |
  ID_DEST_COLOUR |
  ID_SRC_COLOUR |
  ID_ONE_MINUS_DEST_COLOUR |
  ID_ONE_MINUS_SRC_COLOUR |
  ID_DEST_ALPHA |
  ID_SRC_ALPHA |
  ID_ONE_MINUS_DEST_ALPHA |
  ID_ONE_MINUS_SRC_ALPHA |
  ID_ALWAYS_FAIL |
  ID_ALWAYS_PASS |
  ID_LESS_EQUAL |
  ID_LESS |
  ID_EQUAL |
  ID_NOT_EQUAL |
  ID_GREATER_EQUAL |
  ID_GREATER |
  ID_CLOCKWISE |
  ID_ANTICLOCKWISE |
  ID_CULL_BACK |
  ID_CULL_FRONT |
  ID_FLAT |
  ID_GOURAUD |
  ID_PHONG |
  ID_SOLID |
  ID_WIREFRAME |
  ID_POINTS |
  ID_EXP |
  ID_EXP2 |
  ID_ONCE |
  ID_ONCE_PER_LIGHT |
  ID_PER_LIGHT |
  ID_PER_N_LIGHTS |
  ID_DIRECTIONAL |
  ID_SPOT |
  ID_1D |
  ID_2D |
  ID_3D |
  ID_CUBIC |
  ID_UNLIMITED |
  ID_ALPHA |
  ID_SEPARATE_UV |
  ID_COMBINED_UVW |
  ID_WRAP |
  ID_CLAMP |
  ID_MIRROR |
  ID_BORDER |
  ID_BILINEAR |
  ID_TRILINEAR |
  ID_ANISOTROPIC |
  ID_REPLACE |
  ID_SOURCE1 |
  ID_SOURCE2 |
  ID_MODULATE_X2 |
  ID_MODULATE_X4 |
  ID_ADD_SIGNED |
  ID_ADD_SMOOTH |
  ID_SUBTRACT |
  ID_BLEND_DIFFUSE_COLOUR |
  ID_BLEND_DIFFUSE_ALPHA |
  ID_BLEND_TEXTURE_ALPHA |
  ID_BLEND_CURRENT_ALPHA |
  ID_BLEND_MANUAL |
  ID_DOTPRODUCT |
  ID_SRC_CURRENT |
  ID_SRC_TEXTURE |
  ID_SRC_DIFFUSE |
  ID_SRC_SPECULAR |
  ID_SRC_MANUAL |
  ID_SPHERICAL |
  ID_PLANAR |
  ID_CUBIC_REFLECTION |
  ID_CUBIC_NORMAL |
  ID_SCROLL_X |
  ID_SCROLL_Y |
  ID_SCALE_X |
  ID_SCALE_Y |
  ID_SINE |
  ID_TRIANGLE |
  ID_SQUARE |
  ID_SAWTOOTH |
  ID_INVERSE_SAWTOOTH |
  ID_ROTATE |
  ID_NAMED |
  ID_SHADOW |
  ID_ON |
  ID_OFF |
  ID_TRUE |
  ID_FALSE |
  ID_NONE |
  ID_POINT |
  ID_LINEAR |
  ID_ADD |
  ID_MODULATE |
  ID_ALPHA_BLEND |
  ID_ONE |
  ID_ZERO |
  ID_VERTEX |
  ID_FRAGMENT |
  ID_AUTOTOKENSTART |

Definition at line 70 of file OgreMaterialScriptCompiler.h.

enum Ogre::MaterialScriptCompiler::MaterialScriptSection`[protected]`

Enum to identify material sections.

Enumerator:

  MSS_NONE |
  MSS_MATERIAL |
  MSS_TECHNIQUE |
  MSS_PASS |
  MSS_TEXTUREUNIT |
  MSS_PROGRAM_REF |
  MSS_PROGRAM |
  MSS_DEFAULT_PARAMETERS |
  MSS_TEXTURESOURCE |
  MSS_NONE |
  MSS_MATERIAL |
  MSS_TECHNIQUE |
  MSS_PASS |
  MSS_TEXTUREUNIT |
  MSS_PROGRAM_REF |
  MSS_PROGRAM |
  MSS_DEFAULT_PARAMETERS |
  MSS_TEXTURESOURCE |

Definition at line 139 of file OgreMaterialScriptCompiler.h.

enum Ogre::Compiler2Pass::OperationType`[protected, inherited]`

Enumerator:

  otUNKNOWN |
  otRULE |
  otAND |
  otOR |
  otOPTIONAL |
  otREPEAT |
  otDATA |
  otNOT_TEST |
  otINSERT_TOKEN |
  otEND |

Definition at line 158 of file OgreCompiler2Pass.h.

enum Ogre::Compiler2Pass::SystemRuleToken`[protected, inherited]`

Enumerator:

  _no_token_ |
  _character_ |
  _value_ |
  _no_space_skip_ |

Definition at line 178 of file OgreCompiler2Pass.h.

enum Ogre::Compiler2Pass::BNF_ID`[protected, inherited]`

Enumerator:

  BNF_UNKOWN |
  BNF_SYNTAX |
  BNF_RULE |
  BNF_IDENTIFIER |
  BNF_IDENTIFIER_RIGHT |
  BNF_IDENTIFIER_CHARACTERS |
  BNF_ID_BEGIN |
  BNF_ID_END |
  BNF_CONSTANT_BEGIN |
  BNF_SET_RULE |
  BNF_EXPRESSION |
  BNF_AND_TERM |
  BNF_OR_TERM |
  BNF_TERM |
  BNF_TERM_ID |
  BNF_CONSTANT |
  BNF_OR |
  BNF_TERMINAL_SYMBOL |
  BNF_TERMINAL_START |
  BNF_REPEAT_EXPRESSION |
  BNF_REPEAT_BEGIN |
  BNF_REPEAT_END |
  BNF_SET |
  BNF_SET_BEGIN |
  BNF_SET_END |
  BNF_NOT_TEST |
  BNF_NOT_TEST_BEGIN |
  BNF_CONDITIONAL_TOKEN_INSERT |
  BNF_OPTIONAL_EXPRESSION |
  BNF_NOT_EXPRESSION |
  BNF_NOT_CHK |
  BNF_OPTIONAL_BEGIN |
  BNF_OPTIONAL_END |
  BNF_NO_TOKEN_START |
  BNF_SINGLEQUOTE |
  BNF_SINGLE_QUOTE_EXC |
  BNF_SET_END_EXC |
  BNF_ANY_CHARACTER |
  BNF_SPECIAL_CHARACTERS1 |
  BNF_SPECIAL_CHARACTERS2 |
  BNF_WHITE_SPACE_CHK |
  BNF_LETTER |
  BNF_LETTER_DIGIT |
  BNF_DIGIT |
  BNF_WHITE_SPACE |
  BNF_ALPHA_SET |
  BNF_NUMBER_SET |
  BNF_SPECIAL_CHARACTER_SET1 |
  BNF_SPECIAL_CHARACTER_SET2 |
  BNF_SPECIAL_CHARACTER_SET3 |
  BNF_NOT_CHARS |
  BNF_AUTOTOKENSTART |

Definition at line 185 of file OgreCompiler2Pass.h.

## Constructor & Destructor Documentation

Ogre::MaterialScriptCompiler::MaterialScriptCompiler | ( | void |  | ) |

Ogre::MaterialScriptCompiler::~MaterialScriptCompiler | ( | void |  | ) |

Ogre::MaterialScriptCompiler::MaterialScriptCompiler | ( | void |  | ) |

Ogre::MaterialScriptCompiler::~MaterialScriptCompiler | ( | void |  | ) |

## Member Function Documentation

virtual const String& Ogre::MaterialScriptCompiler::getClientBNFGrammer | ( | void |  | ) | const`[virtual]`

gets BNF Grammer for Compositor script.

Implements Ogre::Compiler2Pass.

virtual const String& Ogre::MaterialScriptCompiler::getClientGrammerName | ( | void |  | ) | const`[virtual]`

get the name of the BNF grammer.

Implements Ogre::Compiler2Pass.

void Ogre::MaterialScriptCompiler::parseScript | ( | DataStreamPtr & | stream,
|  | const String & | groupName,
|  | const bool | allowOverride = `false` |
| ) |  |  |

Compile a material script from a data stream using a specific resource group name.

Parameters:

  | stream | Weak reference to a data stream which is the source of the material script
  | groupName | The name of the resource group that resources which are parsed are to become a member of. If this group is loaded or unloaded, then the resources discovered in this script will be loaded / unloaded with it.
  | allowOverride | if material or gpu program name already exists then use definition in the material script being parsed to override the existing instance. The default value is false which causes an exception to be thrown if a duplicate is found.

virtual void Ogre::MaterialScriptCompiler::executeTokenAction | ( | const size_t | tokenID | ) | `[protected, virtual]`

Execute an Action associated with a token.

Gets called when the compiler finishes tokenizing a section of the source that has been parsed.

Implements Ogre::Compiler2Pass.

virtual size_t Ogre::MaterialScriptCompiler::getAutoTokenIDStart | ( |  | ) | const`[protected, virtual]`

Get the start position of auto generated token IDs.

Implements Ogre::Compiler2Pass.

Definition at line 209 of file Attic/OgreMaterialScriptCompiler.h.

virtual void Ogre::MaterialScriptCompiler::setupTokenDefinitions | ( | void |  | ) | `[protected, virtual]`

Associate all the lexemes used in a material script with their corresponding tokens and actions.

Implements Ogre::Compiler2Pass.

void Ogre::MaterialScriptCompiler::addLexemeTokenAction | ( | const String & | lexeme,
|  | const size_t | token,
|  | const MSC_Action | action = `0` |
| ) |  |  | `[protected]`

void Ogre::MaterialScriptCompiler::addLexemeAction | ( | const String & | lexeme,
|  | const MSC_Action | action |
| ) |  |  | `[protected]`

Associate all the lexemes used in a material script with their corresponding actions and have token IDs auto-generated.

Definition at line 218 of file Attic/OgreMaterialScriptCompiler.h.

void Ogre::MaterialScriptCompiler::logParseError | ( | const String & | error | ) | `[protected]`

ColourValue Ogre::MaterialScriptCompiler::_parseColourValue | ( | void |  | ) | `[protected]`

CompareFunction Ogre::MaterialScriptCompiler::convertCompareFunction | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseOpenBrace | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseCloseBrace | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseMaterial | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseLodDistances | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseReceiveShadows | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTransparencyCastsShadows | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseSetTextureAlias | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTechnique | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseScheme | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseLodIndex | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePass | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseAmbient | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseDiffuse | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseSpecular | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseEmissive | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseSceneBlend | ( | void |  | ) | `[protected]`

SceneBlendFactor Ogre::MaterialScriptCompiler::convertBlendFactor | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseDepthCheck | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseDepthWrite | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseDepthFunc | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseDepthBias | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseAlphaRejection | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseCullHardware | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseCullSoftware | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseLighting | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseShading | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePolygonMode | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseFogOverride | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseMaxLights | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseStartLight | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseIteration | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseIterationLightTypes | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseColourWrite | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePointSize | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePointSprites | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePointSizeMin | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePointSizeMax | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePointSizeAttenuation | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTextureUnit | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTextureAlias | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTexture | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseAnimTexture | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseCubicTexture | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTexCoord | ( | void |  | ) | `[protected]`

TextureUnitState::TextureAddressingMode Ogre::MaterialScriptCompiler::convTexAddressMode | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTexAddressMode | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTexBorderColour | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseFiltering | ( | void |  | ) | `[protected]`

FilterOptions Ogre::MaterialScriptCompiler::convertFiltering | ( |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseMaxAnisotropy | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseMipMapBias | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseColourOp | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseColourOpEx | ( | void |  | ) | `[protected]`

LayerBlendOperationEx Ogre::MaterialScriptCompiler::convertBlendOpEx | ( | void |  | ) | `[protected]`

LayerBlendSource Ogre::MaterialScriptCompiler::convertBlendSource | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseColourOpMultipassFallback | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseAlphaOpEx | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseEnvMap | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseScroll | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseScrollAnim | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseRotate | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseRotateAnim | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseScale | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseWaveXform | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTransform | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTextureCustomParameter | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseBindingType | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseContentType | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseGPUProgram | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramSource | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramSyntax | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramCustomParameter | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseDefaultParams | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramSkeletalAnimation | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramMorphAnimation | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramPoseAnimation | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramVertexTextureFetch | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseVertexProgramRef | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseFragmentProgramRef | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseShadowCasterVertexProgramRef | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseShadowReceiverVertexProgramRef | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseShadowReceiverFragmentProgramRef | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseParamIndexed | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseParamIndexedAuto | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseParamNamed | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseParamNamedAuto | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::processManualProgramParam | ( | bool | isNamed,
|  | const String | commandName,
|  | size_t | index = `0`,
|  | const String & | paramName = `StringUtil::BLANK` |
| ) |  |  | `[protected]`

void Ogre::MaterialScriptCompiler::processAutoProgramParam | ( | bool | isNamed,
|  | const String | commandName,
|  | size_t | index,
|  | const String & | paramName = `StringUtil::BLANK` |
| ) |  |  | `[protected]`

void Ogre::MaterialScriptCompiler::finishProgramDefinition | ( | void |  | ) | `[protected]`

virtual const String& Ogre::MaterialScriptCompiler::getClientBNFGrammer | ( | void |  | ) | const`[virtual]`

gets BNF Grammer for Compositor script.

Implements Ogre::Compiler2Pass.

virtual const String& Ogre::MaterialScriptCompiler::getClientGrammerName | ( | void |  | ) | const`[virtual]`

get the name of the BNF grammer.

Implements Ogre::Compiler2Pass.

void Ogre::MaterialScriptCompiler::parseScript | ( | DataStreamPtr & | stream,
|  | const String & | groupName,
|  | const bool | allowOverride = `false` |
| ) |  |  |

Compile a material script from a data stream using a specific resource group name.

Parameters:

  | stream | Weak reference to a data stream which is the source of the material script
  | groupName | The name of the resource group that resources which are parsed are to become a member of. If this group is loaded or unloaded, then the resources discovered in this script will be loaded / unloaded with it.
  | allowOverride | if material or gpu program name already exists then use definition in the material script being parsed to override the existing instance. The default value is false which causes an exception to be thrown if a duplicate is found.

virtual void Ogre::MaterialScriptCompiler::executeTokenAction | ( | const size_t | tokenID | ) | `[protected, virtual]`

Execute an Action associated with a token.

Gets called when the compiler finishes tokenizing a section of the source that has been parsed.

Implements Ogre::Compiler2Pass.

virtual size_t Ogre::MaterialScriptCompiler::getAutoTokenIDStart | ( |  | ) | const`[protected, virtual]`

Get the start position of auto generated token IDs.

Implements Ogre::Compiler2Pass.

Definition at line 209 of file OgreMaterialScriptCompiler.h.

virtual void Ogre::MaterialScriptCompiler::setupTokenDefinitions | ( | void |  | ) | `[protected, virtual]`

Associate all the lexemes used in a material script with their corresponding tokens and actions.

Implements Ogre::Compiler2Pass.

void Ogre::MaterialScriptCompiler::addLexemeTokenAction | ( | const String & | lexeme,
|  | const size_t | token,
|  | const MSC_Action | action = `0` |
| ) |  |  | `[protected]`

void Ogre::MaterialScriptCompiler::addLexemeAction | ( | const String & | lexeme,
|  | const MSC_Action | action |
| ) |  |  | `[protected]`

Associate all the lexemes used in a material script with their corresponding actions and have token IDs auto-generated.

Definition at line 218 of file OgreMaterialScriptCompiler.h.

void Ogre::MaterialScriptCompiler::logParseError | ( | const String & | error | ) | `[protected]`

ColourValue Ogre::MaterialScriptCompiler::_parseColourValue | ( | void |  | ) | `[protected]`

CompareFunction Ogre::MaterialScriptCompiler::convertCompareFunction | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseOpenBrace | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseCloseBrace | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseMaterial | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseLodDistances | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseReceiveShadows | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTransparencyCastsShadows | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseSetTextureAlias | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTechnique | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseScheme | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseLodIndex | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePass | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseAmbient | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseDiffuse | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseSpecular | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseEmissive | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseSceneBlend | ( | void |  | ) | `[protected]`

SceneBlendFactor Ogre::MaterialScriptCompiler::convertBlendFactor | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseDepthCheck | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseDepthWrite | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseDepthFunc | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseDepthBias | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseAlphaRejection | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseCullHardware | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseCullSoftware | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseLighting | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseShading | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePolygonMode | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseFogOverride | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseMaxLights | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseStartLight | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseIteration | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseIterationLightTypes | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseColourWrite | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePointSize | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePointSprites | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePointSizeMin | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePointSizeMax | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parsePointSizeAttenuation | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTextureUnit | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTextureAlias | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTexture | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseAnimTexture | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseCubicTexture | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTexCoord | ( | void |  | ) | `[protected]`

TextureUnitState::TextureAddressingMode Ogre::MaterialScriptCompiler::convTexAddressMode | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTexAddressMode | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTexBorderColour | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseFiltering | ( | void |  | ) | `[protected]`

FilterOptions Ogre::MaterialScriptCompiler::convertFiltering | ( |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseMaxAnisotropy | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseMipMapBias | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseColourOp | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseColourOpEx | ( | void |  | ) | `[protected]`

LayerBlendOperationEx Ogre::MaterialScriptCompiler::convertBlendOpEx | ( | void |  | ) | `[protected]`

LayerBlendSource Ogre::MaterialScriptCompiler::convertBlendSource | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseColourOpMultipassFallback | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseAlphaOpEx | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseEnvMap | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseScroll | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseScrollAnim | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseRotate | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseRotateAnim | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseScale | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseWaveXform | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTransform | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseTextureCustomParameter | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseBindingType | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseContentType | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseGPUProgram | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramSource | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramSyntax | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramCustomParameter | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseDefaultParams | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramSkeletalAnimation | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramMorphAnimation | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramPoseAnimation | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseProgramVertexTextureFetch | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseVertexProgramRef | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseFragmentProgramRef | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseShadowCasterVertexProgramRef | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseShadowReceiverVertexProgramRef | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseShadowReceiverFragmentProgramRef | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseParamIndexed | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseParamIndexedAuto | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseParamNamed | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::parseParamNamedAuto | ( | void |  | ) | `[protected]`

void Ogre::MaterialScriptCompiler::processManualProgramParam | ( | bool | isNamed,
|  | const String | commandName,
|  | size_t | index = `0`,
|  | const String & | paramName = `StringUtil::BLANK` |
| ) |  |  | `[protected]`

void Ogre::MaterialScriptCompiler::processAutoProgramParam | ( | bool | isNamed,
|  | const String | commandName,
|  | size_t | index,
|  | const String & | paramName = `StringUtil::BLANK` |
| ) |  |  | `[protected]`

void Ogre::MaterialScriptCompiler::finishProgramDefinition | ( | void |  | ) | `[protected]`

bool Ogre::Compiler2Pass::doPass1 | ( |  | ) | `[protected, inherited]`

perform pass 1 of compile process scans source for lexemes that can be tokenized and then performs general semantic and context verification on each lexeme before it is tokenized.

A tokenized instruction list is built to be used by Pass 2. A rule path can trigger Pass 2 execution if enough tokens have been generated in Pass 1. Pass 1 will then pass control to pass 2 temporarily until the current tokens have been consumed.

bool Ogre::Compiler2Pass::doPass2 | ( |  | ) | `[protected, inherited]`

performs Pass 2 of compile process which is execution of the tokens

Remarks:
  Pass 2 takes the token instructions generated in Pass 1 and builds the application specific instructions along with verifying symantic and context rules that could not be checked in Pass 1.

  Pass 2 execution consumes tokens and moves the Pass 2 token instruction position towards the end of the token container. Token execution can insert new tokens into the token container.

const TokenInst& Ogre::Compiler2Pass::getNextToken | ( | const size_t | expectedTokenID = `0` | ) | const`[protected, inherited]`

Gets the next token from the instruction que.

Remarks:
  If an unkown token is found then an exception is raised but the instruction pointer is still moved passed the unknown token. The subclass should catch the exception, provide an error message, and attempt recovery.

Parameters:

  | expectedTokenID | if greater than 0 then an exception is raised if tokenID does not match.

Definition at line 356 of file OgreCompiler2Pass.h.

const TokenInst& Ogre::Compiler2Pass::getCurrentToken | ( | const size_t | expectedTokenID = `0` | ) | const`[protected, inherited]`

Gets the current token from the instruction que.

Remarks:
  If an unkown token is found then an exception is raised. The subclass should catch the exception, provide an error message, and attempt recovery.

Parameters:

  | expectedTokenID | if greater than 0 then an exception is raised if tokenID does not match.

bool Ogre::Compiler2Pass::testNextTokenID | ( | const size_t | expectedTokenID | ) | const`[protected, inherited]`

If a next token instruction exist then test if its token ID matches.

Remarks:
  This method is usefull for peeking ahead during pass 2 to see if a certain token exists. If the tokens don't match or there is no next token (end of que) then false is returned.

Parameters:

  | expectedTokenID | is the ID of the token to match.

bool Ogre::Compiler2Pass::testCurrentTokenID | ( | const size_t | expectedTokenID | ) | const`[protected, inherited]`

If a current token instruction exist then test if its token ID matches.

Parameters:

  | expectedTokenID | is the ID of the token to match.

Definition at line 382 of file OgreCompiler2Pass.h.

void Ogre::Compiler2Pass::skipToken | ( | void |  | ) | const`[protected, inherited]`

skip to the next token in the pass2 queue.

void Ogre::Compiler2Pass::replaceToken | ( | void |  | ) | `[protected, inherited]`

go back to the previous token in the pass2 queue.

float Ogre::Compiler2Pass::getNextTokenValue | ( | void |  | ) | const`[protected, inherited]`

Gets the next token's associated floating point value in the instruction que that was parsed from the text source.

If an unkown token is found or no associated value was found then an exception is raised but the instruction pointer is still moved passed the unknown token. The subclass should catch the exception, provide an error message, and attempt recovery.

Definition at line 397 of file OgreCompiler2Pass.h.

float Ogre::Compiler2Pass::getCurrentTokenValue | ( | void |  | ) | const`[protected, inherited]`

Gets the current token's associated floating point value in the instruction que that was parsed from the text source.

Remarks:
  If an unkown token is found or no associated value was found then an exception is raised. The subclass should catch the exception, provide an error message, and attempt recovery.

const String& Ogre::Compiler2Pass::getNextTokenLabel | ( | void |  | ) | const`[protected, inherited]`

Gets the next token's associated text label in the instruction que that was parsed from the text source.

Remarks:
  If an unkown token is found or no associated label was found then an exception is raised but the instruction pointer is still moved passed the unknown token. The subclass should catch the exception, provide an error message, and attempt recovery.

Definition at line 416 of file OgreCompiler2Pass.h.

const String& Ogre::Compiler2Pass::getCurrentTokenLabel | ( | void |  | ) | const`[protected, inherited]`

Gets the next token's associated text label in the instruction que that was parsed from the text source.

If an unkown token is found or no associated label was found then an exception is raised. The subclass should catch the exception, provide an error message, and attempt recovery.

size_t Ogre::Compiler2Pass::getNextTokenID | ( | void |  | ) | const`[protected, inherited]`

Get the next token's ID value.

Definition at line 428 of file OgreCompiler2Pass.h.

size_t Ogre::Compiler2Pass::getCurrentTokenID | ( | void |  | ) | const`[protected, inherited]`

Get the current token's ID value.

Definition at line 431 of file OgreCompiler2Pass.h.

const String& Ogre::Compiler2Pass::getNextTokenLexeme | ( | void |  | ) | const`[protected, inherited]`

Get the next token's lexeme string.

Handy when you don't want the ID but want the string representation.

Definition at line 435 of file OgreCompiler2Pass.h.

const String& Ogre::Compiler2Pass::getCurrentTokenLexeme | ( | void |  | ) | const`[protected, inherited]`

Get the current token's lexeme string.

Handy when you don't want the ID but want the string representation.

size_t Ogre::Compiler2Pass::getPass2TokenQueCount | ( | void |  | ) | const`[protected, inherited]`

Gets the number of tokens waiting in the instruction que that need to be processed by an token action in pass 2.

size_t Ogre::Compiler2Pass::getRemainingTokensForAction | ( | void |  | ) | const`[protected, inherited]`

Get the number of tokens not processed by action token.

Client Actions should use this method to retreive the number of parameters(tokens) remaining to be processed in the action.

void Ogre::Compiler2Pass::setPass2TokenQuePosition | ( | size_t | pos,
|  | const bool | activateAction = `false` |
| ) |  |  | `[protected, inherited]`

Manualy set the Pass2 Token que position.

Remarks:
  This method will also set the position of the next token in the pass2 que that has an action ensuring that getRemainingTokensForAction works currectly. This method is useful for when the token que must be reprocessed after pass1 and the position in the que must be changed so that an action will be triggered.

Parameters:

  | pos | is the new position within the Pass2 que
  | activateAction | if set true and the token at the new position has an action then the action is activated.

size_t Ogre::Compiler2Pass::getPass2TokenQuePosition | ( | void |  | ) | const`[protected, inherited]`

Get the current position in the Pass2 Token Que.

Definition at line 465 of file OgreCompiler2Pass.h.

bool Ogre::Compiler2Pass::setNextActionQuePosition | ( | size_t | pos,
|  | const bool | search = `false` |
| ) |  |  | `[protected, inherited]`

Set the position of the next token action in the Pass2 Token Que.

Remarks:
  If the position is not within the que or there is no action associated with the token at the position in the que then NextActionQuePosition is not set.

Parameters:

  | pos | is the position in the Pass2 Token Que where the next action is.
  | search | if true then the que is searched from pos until an action is found. If the end of the que is reached and no action has been found then NextActionQuePosition is set to the end of the que and false is returned.

size_t Ogre::Compiler2Pass::addLexemeToken | ( | const String & | lexeme,
|  | const size_t | token,
|  | const bool | hasAction = `false`,
|  | const bool | caseSensitive = `false` |
| ) |  |  | `[protected, inherited]`

Add a lexeme token association.

Remarks:
  The backend compiler uses the associations between lexeme and token when building the rule base from the BNF script so all associations must be done prior to compiling a source.

Parameters:

  | lexeme | is the name of the token and use when parsing the source to determin a match for a token.
  | token | is the ID associated with the lexeme. If token is 0 then the token ID is auto generated and returned.
  | hasAction | must be set true if the client wants an action triggered when this token is generated
  | caseSensitive | should be set true if lexeme match should use case sensitivity

Returns:
  the ID of the token. Useful when auto generating token IDs.

void Ogre::Compiler2Pass::setClientBNFGrammer | ( | void |  | ) | `[protected, inherited]`

Sets up the parser rules for the client based on the BNF Grammer text passed in.

Remarks:
  Raises an exception if the grammer did not compile successfully. This method gets called when a call to compile occurs and no compiled BNF grammer exists, otherwise nothing will happen since the compiler has no rules to work with. The grammer only needs to be set once during the lifetime of the compiler unless the grammer changes.

Note:
  BNF Grammer rules are cached once the BNF grammer source is compiled. The client should never have to call this method directly.

void Ogre::Compiler2Pass::findEOL | ( |  | ) | `[protected, inherited]`

find the eol charater

bool Ogre::Compiler2Pass::isFloatValue | ( | float & | fvalue,
|  | size_t & | charsize |
| ) |  |  | const`[protected, inherited]`

check to see if the text at the present position in the source is a numerical constant

Parameters:

  | fvalue | is a reference that will receive the float value that is in the source
  | charsize | reference to receive number of characters that make of the value in the source

Returns:
  true if characters form a valid float representation false if a number value could not be extracted

bool Ogre::Compiler2Pass::isCharacterLabel | ( | const size_t | rulepathIDX | ) | `[protected, inherited]`

Check if source at current position is supposed to be a user defined character label.

A new label is processed when previous operation was not _character_ otherwise the processed character (if match was found) is added to the current label. This allows _character_ operations to be chained together to form a crude regular expression to build a label.

Parameters:

  | rulepathIDX | index into rule path database of token to validate.

Returns:
  true if token was found for character label.

bool Ogre::Compiler2Pass::isLexemeMatch | ( | const String & | lexeme,
|  | const bool | caseSensitive |
| ) |  |  | const`[protected, inherited]`

check to see if the text is in the lexeme text library

Parameters:

  | lexeme | points to begining of text where a lexem token might exist
  | caseSensitive | set to true if match should be case sensitive

Returns:
  true if a matching token could be found in the token type library false if could not be tokenized

bool Ogre::Compiler2Pass::isEndOfSource | ( |  | ) | const`[protected, inherited]`

Check if pass 1 has parsed to the end of the source.

Definition at line 533 of file OgreCompiler2Pass.h.

bool Ogre::Compiler2Pass::positionToNextLexeme | ( |  | ) | `[protected, inherited]`

position to the next possible valid sysmbol

bool Ogre::Compiler2Pass::processRulePath | ( | size_t | rulepathIDX | ) | `[protected, inherited]`

process input source text using rulepath to determine allowed tokens

Remarks:
  the method is reentrant and recursive if a non-terminal token is encountered in the current rule path then the method is called using the new rule path referenced by the non-terminal token Tokens can have the following operation states which effects the flow path of the rule RULE: defines a rule path for the non-terminal token AND: the token is required for the rule to pass OR: if the previous tokens failed then try these ones OPTIONAL: the token is optional and does not cause the rule to fail if the token is not found REPEAT: the token is required but there can be more than one in a sequence DATA: Used by a previous token ie for character sets NOTTEST: performs negative lookahead ie make sure the next token is not of a certain type END: end of the rule path - the method returns the succuss of the rule

Parameters:

  | rulepathIDX | index into an array of Token Rules that define a rule path to be processed

Returns:
  true if rule passed - all required tokens found false if one or more tokens required to complete the rule were not found

void Ogre::Compiler2Pass::setActiveContexts | ( | const uint | contexts | ) | `[protected, inherited]`

setup ActiveContexts - should be called by subclass to setup initial language contexts

Definition at line 561 of file OgreCompiler2Pass.h.

void Ogre::Compiler2Pass::skipComments | ( |  | ) | `[protected, inherited]`

comment specifiers are hard coded

void Ogre::Compiler2Pass::skipEOL | ( |  | ) | `[protected, inherited]`

find end of line marker and move past it

void Ogre::Compiler2Pass::skipWhiteSpace | ( |  | ) | `[protected, inherited]`

skip all the white space which includes spaces and tabs

bool Ogre::Compiler2Pass::ValidateToken | ( | const size_t | rulepathIDX,
|  | const size_t | activeRuleID |
| ) |  |  | `[protected, inherited]`

check if current position in source has the lexeme text equivalent to the TokenID

Parameters:

  | rulepathIDX | index into rule path database of token to validate
  | activeRuleID | index of non-terminal rule that generated the token

Returns:
  true if token was found false if token lexeme text does not match the source text if token is non-terminal then processRulePath is called

void Ogre::Compiler2Pass::verifyTokenRuleLinks | ( | const String & | grammerName | ) | `[protected, inherited]`

scan through all the rules and initialize token definition with index to rules for non-terminal tokens.

Gets called when internal grammer is being verified or after client grammer has been parsed.

Parameters:

  | grammerName | is the name of the grammer the token rules are for

void Ogre::Compiler2Pass::checkTokenActionTrigger | ( | void |  | ) | `[protected, inherited]`

Checks the last token instruction and if it has an action then it triggers the action of the previously found token having an action.

String Ogre::Compiler2Pass::getBNFGrammerTextFromRulePath | ( | size_t | ruleID,
|  | const size_t | level = `0` |
| ) |  |  | `[protected, inherited]`

Get the text representation of the rule path.

This is a good way to way to visually verify that the BNF grammer did compile correctly.

Parameters:

  | ruleID | is the index into the rule path.
  | level | is the number of levels a non-terminal will expand to. Defaults to 0 if not set which will cause non-terminals to not expand.

bool Ogre::Compiler2Pass::compile | ( | const String & | source,
|  | const String & | sourceName |
| ) |  |  | `[inherited]`

compile the source - performs 2 passes.

First pass is to tokinize, check semantics and context. The second pass is performed by using tokens to look up function implementors and executing them which convert tokens to application specific instructions.

Remarks:
  Pass 2 only gets executed if Pass 1 has built enough tokens to complete a rule path and found no errors

Parameters:

  | source | a pointer to the source text to be compiled

Returns:
  true if Pass 1 and Pass 2 are successfull false if any errors occur in Pass 1 or Pass 2

Referenced by Ogre::CompositorScriptCompiler::parseScript().

## Member Data Documentation

MaterialScriptContext Ogre::MaterialScriptCompiler::mScriptContext`[protected]`

Definition at line 192 of file Attic/OgreMaterialScriptCompiler.h.

static TokenActionMap Ogre::MaterialScriptCompiler::mTokenActionMap`[static, protected]`

Map of Token value as key to an Action.

An Action converts tokens into the final format. All instances use the same Token Action Map.

Definition at line 201 of file Attic/OgreMaterialScriptCompiler.h.

const size_t Ogre::Compiler2Pass::SystemTokenBase = 1000`[static, protected, inherited]`

Definition at line 177 of file OgreCompiler2Pass.h.

TokenState* Ogre::Compiler2Pass::mClientTokenState`[protected, inherited]`

Definition at line 258 of file OgreCompiler2Pass.h.

TokenState* Ogre::Compiler2Pass::mActiveTokenState`[protected, inherited]`

Active token que, definitions, rules currntly being used by parser.

Definition at line 261 of file OgreCompiler2Pass.h.

size_t Ogre::Compiler2Pass::mPass2TokenQuePosition`[mutable, protected, inherited]`

the location within the token instruction container where pass 2 is

Definition at line 263 of file OgreCompiler2Pass.h.

size_t Ogre::Compiler2Pass::mPreviousActionQuePosition`[protected, inherited]`

the que position of the previous token that had an action.

A token's action is fired on the next token having an action.

Definition at line 267 of file OgreCompiler2Pass.h.

size_t Ogre::Compiler2Pass::mNextActionQuePosition`[protected, inherited]`

the que position for the next token that has an action.

Definition at line 270 of file OgreCompiler2Pass.h.

const String* Ogre::Compiler2Pass::mSource`[protected, inherited]`

pointer to the source to be compiled

Definition at line 273 of file OgreCompiler2Pass.h.

String Ogre::Compiler2Pass::mSourceName`[protected, inherited]`

name of the source to be compiled

Definition at line 275 of file OgreCompiler2Pass.h.

size_t Ogre::Compiler2Pass::mEndOfSource`[protected, inherited]`

Definition at line 276 of file OgreCompiler2Pass.h.

size_t Ogre::Compiler2Pass::mCurrentLine`[protected, inherited]`

Definition at line 278 of file OgreCompiler2Pass.h.

size_t Ogre::Compiler2Pass::mCharPos`[protected, inherited]`

current line number in source being tokenized

Definition at line 279 of file OgreCompiler2Pass.h.

size_t Ogre::Compiler2Pass::mErrorCharPos`[protected, inherited]`

position in current line in source being tokenized

Definition at line 280 of file OgreCompiler2Pass.h.

std::map<size_t, float> Ogre::Compiler2Pass::mConstants`[protected, inherited]`

character position in source where last error occured

storage container for constants defined in source container uses Token index as a key associated with a float constant

Definition at line 284 of file OgreCompiler2Pass.h.

LabelContainer Ogre::Compiler2Pass::mLabels`[protected, inherited]`

Definition at line 288 of file OgreCompiler2Pass.h.

bool Ogre::Compiler2Pass::mLabelIsActive`[protected, inherited]`

flag indicates when a label is being parsed.

It gets set false when a terminal token not of _character_ is encountered

Definition at line 291 of file OgreCompiler2Pass.h.

size_t Ogre::Compiler2Pass::mActiveLabelKey`[protected, inherited]`

the key of the active label being built during pass 1.

a new key is calculated when mLabelIsActive switches from false to true

Definition at line 294 of file OgreCompiler2Pass.h.

String* Ogre::Compiler2Pass::mActiveLabel`[protected, inherited]`

The active label that is receiving characters during pass 1.

Definition at line 296 of file OgreCompiler2Pass.h.

bool Ogre::Compiler2Pass::mNoSpaceSkip`[protected, inherited]`

flag being true indicates that spaces are not to be skipped automatically gets set to false when mLabelIsActive goes to false

Definition at line 299 of file OgreCompiler2Pass.h.

bool Ogre::Compiler2Pass::mNoTerminalToken`[protected, inherited]`

if flag is true then next terminal token is not added to token que if found but does effect rule path flow

Definition at line 302 of file OgreCompiler2Pass.h.

size_t Ogre::Compiler2Pass::mInsertTokenID`[protected, inherited]`

TokenID to insert if next rule finds a terminal token if zero then no token inserted.

Definition at line 305 of file OgreCompiler2Pass.h.

uint Ogre::Compiler2Pass::mActiveContexts`[protected, inherited]`

Active Contexts pattern used in pass 1 to determine which tokens are valid for a certain context.

Definition at line 308 of file OgreCompiler2Pass.h.

The documentation for this class was generated from the following files:

- Attic/OgreMaterialScriptCompiler.h
- OgreMaterialScriptCompiler.h

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sat May 10 16:25:12 2008