zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TParseContext Struct Reference

#include <ParseHelper.h>

Public Member Functions

 TParseContext (TSymbolTable &symt, TExtensionBehavior &ext, TIntermediate &interm, ShShaderType type, ShShaderSpec spec, int options, bool checksPrecErrors, const char *sourcePath, TInfoSink &is)
 
TIntermTypedaddConstArrayNode (int index, TIntermTyped *node, const TSourceLoc &line)
 
TIntermTypedaddConstMatrixNode (int, TIntermTyped *, const TSourceLoc &)
 
TIntermTypedaddConstructor (TIntermNode *, const TType *, TOperator, TFunction *, const TSourceLoc &)
 
TIntermTypedaddConstStruct (TString &, TIntermTyped *, const TSourceLoc &)
 
TIntermTypedaddConstVectorNode (TVectorFields &, TIntermTyped *, const TSourceLoc &)
 
TIntermTypedaddIndexExpression (TIntermTyped *baseExpression, const TSourceLoc &location, TIntermTyped *indexExpression)
 
bool areAllChildConst (TIntermAggregate *aggrNode)
 
bool arrayErrorCheck (const TSourceLoc &line, TString &identifier, TPublicType type, TVariable *&variable)
 
bool arrayQualifierErrorCheck (const TSourceLoc &line, TPublicType type)
 
bool arraySizeErrorCheck (const TSourceLoc &line, TIntermTyped *expr, int &size)
 
bool arrayTypeErrorCheck (const TSourceLoc &line, TPublicType type)
 
void assignError (const TSourceLoc &line, const char *op, TString left, TString right)
 
void binaryOpError (const TSourceLoc &line, const char *op, TString left, TString right)
 
bool boolErrorCheck (const TSourceLoc &, const TIntermTyped *)
 
bool boolErrorCheck (const TSourceLoc &, const TPublicType &)
 
bool constErrorCheck (TIntermTyped *node)
 
TIntermTypedconstructBuiltIn (const TType *, TOperator, TIntermNode *, const TSourceLoc &, bool subset)
 
bool constructorErrorCheck (const TSourceLoc &line, TIntermNode *, TFunction &, TOperator, TType *)
 
TIntermTypedconstructStruct (TIntermNode *, TType *, int, const TSourceLoc &, bool subset)
 
bool containsSampler (TType &type)
 
bool enterStructDeclaration (const TSourceLoc &line, const TString &identifier)
 
void error (const TSourceLoc &loc, const char *reason, const char *token, const char *extraInfo="")
 
bool executeInitializer (const TSourceLoc &line, TString &identifier, TPublicType &pType, TIntermTyped *initializer, TIntermNode *&intermNode, TVariable *variable=0)
 
void exitStructDeclaration ()
 
const TExtensionBehaviorextensionBehavior () const
 
bool extensionErrorCheck (const TSourceLoc &line, const TString &)
 
const TFunctionfindFunction (const TSourceLoc &line, TFunction *pfnCall, bool *builtIn=0)
 
TIntermTypedfoldConstConstructor (TIntermAggregate *aggrNode, const TType &type)
 
bool globalErrorCheck (const TSourceLoc &line, bool global, const char *token)
 
TInfoSinkinfoSink ()
 
bool integerErrorCheck (TIntermTyped *node, const char *token)
 
bool isExtensionEnabled (const char *extension) const
 
bool lValueErrorCheck (const TSourceLoc &line, const char *op, TIntermTyped *)
 
bool nonInitConstErrorCheck (const TSourceLoc &line, TString &identifier, TPublicType &type, bool array)
 
bool nonInitErrorCheck (const TSourceLoc &line, TString &identifier, TPublicType &type, TVariable *&variable)
 
int numErrors () const
 
bool paramErrorCheck (const TSourceLoc &line, TQualifier qualifier, TQualifier paramQualifier, TType *type)
 
bool parameterSamplerErrorCheck (const TSourceLoc &line, TQualifier qualifier, const TType &type)
 
bool parseMatrixFields (const TString &, int matSize, TMatrixFields &, const TSourceLoc &line)
 
bool parseVectorFields (const TString &, int vecSize, TVectorFields &, const TSourceLoc &line)
 
const TPragmapragma () const
 
bool precisionErrorCheck (const TSourceLoc &line, TPrecision precision, TBasicType type)
 
void recover ()
 
bool reservedErrorCheck (const TSourceLoc &line, const TString &identifier)
 
bool samplerErrorCheck (const TSourceLoc &line, const TPublicType &pType, const char *reason)
 
bool structNestingErrorCheck (const TSourceLoc &line, const TField &field)
 
bool structQualifierErrorCheck (const TSourceLoc &line, const TPublicType &pType)
 
bool supportsExtension (const char *extension)
 
void trace (const char *str)
 
void unaryOpError (const TSourceLoc &line, const char *op, TString operand)
 
bool voidErrorCheck (const TSourceLoc &, const TString &, const TPublicType &)
 
void warning (const TSourceLoc &loc, const char *reason, const char *token, const char *extraInfo="")
 

Public Attributes

bool checksPrecisionErrors
 
int compileOptions
 
const TTypecurrentFunctionType
 
TDiagnostics diagnostics
 
TDirectiveHandler directiveHandler
 
bool fragmentPrecisionHigh
 
bool functionReturnsValue
 
TString HashErrMsg
 
TIntermediateintermediate
 
int loopNestingLevel
 
pp::Preprocessor preprocessor
 
voidscanner
 
ShShaderSpec shaderSpec
 
ShShaderType shaderType
 
const char * sourcePath
 
int structNestingLevel
 
TSymbolTablesymbolTable
 
TIntermNodetreeRoot
 

Detailed Description

Definition at line 27 of file ParseHelper.h.

Constructor & Destructor Documentation

TParseContext::TParseContext ( TSymbolTable symt,
TExtensionBehavior ext,
TIntermediate interm,
ShShaderType  type,
ShShaderSpec  spec,
int  options,
bool  checksPrecErrors,
const char *  sourcePath,
TInfoSink is 
)
inline

Definition at line 28 of file ParseHelper.h.

Member Function Documentation

bool TParseContext::areAllChildConst ( TIntermAggregate aggrNode)
bool TParseContext::arrayQualifierErrorCheck ( const TSourceLoc line,
TPublicType  type 
)

Definition at line 700 of file ParseHelper.cpp.

References error(), EvqAttribute, EvqConst, and TPublicType::qualifier.

bool TParseContext::arraySizeErrorCheck ( const TSourceLoc line,
TIntermTyped expr,
int size 
)
bool TParseContext::arrayTypeErrorCheck ( const TSourceLoc line,
TPublicType  type 
)

Definition at line 715 of file ParseHelper.cpp.

References TPublicType::array, and error().

void TParseContext::assignError ( const TSourceLoc line,
const char *  op,
TString  left,
TString  right 
)

Definition at line 208 of file ParseHelper.cpp.

References error().

Referenced by executeInitializer().

void TParseContext::binaryOpError ( const TSourceLoc line,
const char *  op,
TString  left,
TString  right 
)

Definition at line 231 of file ParseHelper.cpp.

References error().

bool TParseContext::boolErrorCheck ( const TSourceLoc line,
const TIntermTyped type 
)
bool TParseContext::boolErrorCheck ( const TSourceLoc line,
const TPublicType pType 
)
bool TParseContext::constErrorCheck ( TIntermTyped node)
TIntermTyped * TParseContext::constructStruct ( TIntermNode node,
TType type,
int  paramCount,
const TSourceLoc line,
bool  subset 
)
bool TParseContext::containsSampler ( TType type)
bool TParseContext::enterStructDeclaration ( const TSourceLoc line,
const TString identifier 
)

Definition at line 1393 of file ParseHelper.cpp.

References error(), and structNestingLevel.

void TParseContext::exitStructDeclaration ( )

Definition at line 1408 of file ParseHelper.cpp.

References structNestingLevel.

const TExtensionBehavior& TParseContext::extensionBehavior ( ) const
inline
bool TParseContext::extensionErrorCheck ( const TSourceLoc line,
const TString extension 
)

Definition at line 867 of file ParseHelper.cpp.

References EBhDisable, EBhUndefined, EBhWarn, error(), extensionBehavior(), and warning().

const TFunction * TParseContext::findFunction ( const TSourceLoc line,
TFunction pfnCall,
bool *  builtIn = 0 
)
bool TParseContext::globalErrorCheck ( const TSourceLoc line,
bool  global,
const char *  token 
)

Definition at line 413 of file ParseHelper.cpp.

References error().

bool TParseContext::integerErrorCheck ( TIntermTyped node,
const char *  token 
)
bool TParseContext::isExtensionEnabled ( const char *  extension) const

Definition at line 895 of file ParseHelper.cpp.

References EBhEnable, EBhRequire, and extensionBehavior().

Referenced by addIndexExpression().

bool TParseContext::nonInitConstErrorCheck ( const TSourceLoc line,
TString identifier,
TPublicType type,
bool  array 
)
bool TParseContext::nonInitErrorCheck ( const TSourceLoc line,
TString identifier,
TPublicType type,
TVariable *&  variable 
)
int TParseContext::numErrors ( ) const
inline

Definition at line 64 of file ParseHelper.h.

References diagnostics, and TDiagnostics::numErrors().

Referenced by PaParseStrings().

bool TParseContext::paramErrorCheck ( const TSourceLoc line,
TQualifier  qualifier,
TQualifier  paramQualifier,
TType type 
)
bool TParseContext::parameterSamplerErrorCheck ( const TSourceLoc line,
TQualifier  qualifier,
const TType type 
)
bool TParseContext::parseMatrixFields ( const TString compString,
int  matSize,
TMatrixFields fields,
const TSourceLoc line 
)
bool TParseContext::parseVectorFields ( const TString compString,
int  vecSize,
TVectorFields fields,
const TSourceLoc line 
)

Definition at line 25 of file ParseHelper.cpp.

References error(), i, int, TVectorFields::num, and TVectorFields::offsets.

const TPragma& TParseContext::pragma ( ) const
inline

Definition at line 101 of file ParseHelper.h.

References directiveHandler, and TDirectiveHandler::pragma().

bool TParseContext::precisionErrorCheck ( const TSourceLoc line,
TPrecision  precision,
TBasicType  type 
)

Definition at line 240 of file ParseHelper.cpp.

References checksPrecisionErrors, EbpUndefined, EbtFloat, EbtInt, and error().

bool TParseContext::reservedErrorCheck ( const TSourceLoc line,
const TString identifier 
)
bool TParseContext::samplerErrorCheck ( const TSourceLoc line,
const TPublicType pType,
const char *  reason 
)
bool TParseContext::structNestingErrorCheck ( const TSourceLoc line,
const TField field 
)
bool TParseContext::structQualifierErrorCheck ( const TSourceLoc line,
const TPublicType pType 
)
bool TParseContext::supportsExtension ( const char *  extension)

Definition at line 888 of file ParseHelper.cpp.

References extensionBehavior().

void TParseContext::trace ( const char *  str)

Definition at line 200 of file ParseHelper.cpp.

References diagnostics, and TDiagnostics::writeDebug().

void TParseContext::unaryOpError ( const TSourceLoc line,
const char *  op,
TString  operand 
)

Definition at line 219 of file ParseHelper.cpp.

References error().

bool TParseContext::voidErrorCheck ( const TSourceLoc line,
const TString identifier,
const TPublicType pubType 
)

Definition at line 572 of file ParseHelper.cpp.

References EbtVoid, error(), and TPublicType::type.

Referenced by arrayErrorCheck(), executeInitializer(), and nonInitErrorCheck().

void TParseContext::warning ( const TSourceLoc loc,
const char *  reason,
const char *  token,
const char *  extraInfo = "" 
)

Member Data Documentation

bool TParseContext::checksPrecisionErrors

Definition at line 56 of file ParseHelper.h.

Referenced by precisionErrorCheck().

int TParseContext::compileOptions

Definition at line 49 of file ParseHelper.h.

Referenced by sh::OutputHLSL::outputLineDirective().

const TType* TParseContext::currentFunctionType

Definition at line 54 of file ParseHelper.h.

TDiagnostics TParseContext::diagnostics

Definition at line 59 of file ParseHelper.h.

Referenced by error(), infoSink(), numErrors(), trace(), and warning().

TDirectiveHandler TParseContext::directiveHandler

Definition at line 60 of file ParseHelper.h.

Referenced by extensionBehavior(), and pragma().

bool TParseContext::fragmentPrecisionHigh

Definition at line 57 of file ParseHelper.h.

Referenced by TCompiler::compile(), and glslang_scan().

bool TParseContext::functionReturnsValue

Definition at line 55 of file ParseHelper.h.

TString TParseContext::HashErrMsg

Definition at line 58 of file ParseHelper.h.

int TParseContext::loopNestingLevel

Definition at line 52 of file ParseHelper.h.

pp::Preprocessor TParseContext::preprocessor

Definition at line 61 of file ParseHelper.h.

Referenced by glslang_scan().

void* TParseContext::scanner

Definition at line 62 of file ParseHelper.h.

Referenced by glslang_finalize(), glslang_initialize(), and glslang_scan().

ShShaderSpec TParseContext::shaderSpec

Definition at line 48 of file ParseHelper.h.

Referenced by reservedErrorCheck(), and structNestingErrorCheck().

ShShaderType TParseContext::shaderType
const char* TParseContext::sourcePath

Definition at line 50 of file ParseHelper.h.

Referenced by sh::OutputHLSL::outputLineDirective().

int TParseContext::structNestingLevel

Definition at line 53 of file ParseHelper.h.

Referenced by enterStructDeclaration(), and exitStructDeclaration().

TIntermNode* TParseContext::treeRoot

Definition at line 51 of file ParseHelper.h.

Referenced by TCompiler::compile(), and sh::OutputHLSL::output().


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