zenilib
0.5.3.0
|
#include <ParseHelper.h>
Definition at line 27 of file ParseHelper.h.
|
inline |
Definition at line 28 of file ParseHelper.h.
TIntermTyped * TParseContext::addConstArrayNode | ( | int | index, |
TIntermTyped * | node, | ||
const TSourceLoc & | line | ||
) |
Definition at line 1328 of file ParseHelper.cpp.
References TIntermediate::addConstantUnion(), TType::clearArrayness(), error(), TType::getArraySize(), TIntermNode::getAsConstantUnion(), TType::getObjectSize(), TIntermTyped::getType(), TIntermConstantUnion::getUnionArrayPointer(), intermediate, and recover().
Referenced by addIndexExpression().
TIntermTyped * TParseContext::addConstMatrixNode | ( | int | index, |
TIntermTyped * | node, | ||
const TSourceLoc & | line | ||
) |
Definition at line 1293 of file ParseHelper.cpp.
References TIntermediate::addConstantUnion(), error(), TIntermNode::getAsConstantUnion(), TType::getNominalSize(), TIntermTyped::getType(), TIntermConstantUnion::getUnionArrayPointer(), intermediate, and recover().
Referenced by addIndexExpression().
TIntermTyped * TParseContext::addConstructor | ( | TIntermNode * | node, |
const TType * | type, | ||
TOperator | op, | ||
TFunction * | fnCall, | ||
const TSourceLoc & | line | ||
) |
Definition at line 1052 of file ParseHelper.cpp.
References TType::clearArrayness(), constructBuiltIn(), constructStruct(), EOpConstructStruct, EOpNull, TStructure::fields(), foldConstConstructor(), TIntermNode::getAsAggregate(), TIntermNode::getLine(), TIntermOperator::getOp(), TIntermAggregate::getSequence(), TType::getStruct(), intermediate, TType::isArray(), and TIntermediate::setAggregateOperator().
TIntermTyped * TParseContext::addConstStruct | ( | TString & | identifier, |
TIntermTyped * | node, | ||
const TSourceLoc & | line | ||
) |
Definition at line 1364 of file ParseHelper.cpp.
References TIntermediate::addConstantUnion(), error(), TStructure::fields(), TIntermNode::getAsConstantUnion(), TType::getStruct(), TIntermTyped::getType(), TIntermConstantUnion::getUnionArrayPointer(), intermediate, and recover().
TIntermTyped * TParseContext::addConstVectorNode | ( | TVectorFields & | fields, |
TIntermTyped * | node, | ||
const TSourceLoc & | line | ||
) |
Definition at line 1249 of file ParseHelper.cpp.
References TIntermediate::addConstantUnion(), error(), TIntermNode::getAsConstantUnion(), TType::getNominalSize(), TIntermTyped::getType(), TIntermConstantUnion::getUnionArrayPointer(), i, intermediate, TVectorFields::num, TVectorFields::offsets, and recover().
Referenced by addIndexExpression().
TIntermTyped * TParseContext::addIndexExpression | ( | TIntermTyped * | baseExpression, |
const TSourceLoc & | location, | ||
TIntermTyped * | indexExpression | ||
) |
Definition at line 1446 of file ParseHelper.cpp.
References TIntermediate::addConstantUnion(), addConstArrayNode(), addConstMatrixNode(), addConstVectorNode(), TIntermediate::addIndex(), EbpHigh, EbtFloat, EOpIndexDirect, EOpIndexIndirect, error(), EvqConst, EvqFragData, EvqTemporary, TType::getArraySize(), TIntermNode::getAsConstantUnion(), TIntermNode::getAsSymbolNode(), TIntermTyped::getBasicType(), TIntermConstantUnion::getIConst(), TType::getNominalSize(), TIntermTyped::getNominalSize(), TIntermTyped::getPrecision(), TType::getQualifier(), TIntermTyped::getQualifier(), TType::getStruct(), TIntermSymbol::getSymbol(), TIntermTyped::getType(), TIntermTyped::getTypePointer(), TIntermConstantUnion::getUnionArrayPointer(), intermediate, TIntermTyped::isArray(), isExtensionEnabled(), TIntermTyped::isMatrix(), TIntermTyped::isVector(), NULL, TVectorFields::num, TVectorFields::offsets, recover(), ConstantUnion::setFConst(), ConstantUnion::setIConst(), TType::setQualifier(), and TIntermTyped::setType().
bool TParseContext::areAllChildConst | ( | TIntermAggregate * | aggrNode | ) |
Definition at line 1028 of file ParseHelper.cpp.
References ASSERT, TIntermAggregate::getSequence(), TIntermOperator::isConstructor(), and NULL.
Referenced by foldConstConstructor().
bool TParseContext::arrayErrorCheck | ( | const TSourceLoc & | line, |
TString & | identifier, | ||
TPublicType | type, | ||
TVariable *& | variable | ||
) |
Definition at line 736 of file ParseHelper.cpp.
References TPublicType::arraySize, error(), TSymbolTable::find(), TType::getArraySize(), TVariable::getType(), TSymbolTable::insert(), TType::isArray(), TSymbol::isVariable(), reservedErrorCheck(), TType::sameElementType(), TType::setArraySize(), symbolTable, and voidErrorCheck().
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 | ||
) |
Definition at line 676 of file ParseHelper.cpp.
References EbtInt, error(), TIntermNode::getAsConstantUnion(), TIntermTyped::getBasicType(), and TIntermConstantUnion::getIConst().
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 | ||
) |
Definition at line 586 of file ParseHelper.cpp.
References EbtBool, error(), TIntermTyped::getBasicType(), TIntermTyped::isArray(), TIntermTyped::isMatrix(), and TIntermTyped::isVector().
bool TParseContext::boolErrorCheck | ( | const TSourceLoc & | line, |
const TPublicType & | pType | ||
) |
Definition at line 600 of file ParseHelper.cpp.
References TPublicType::array, EbtBool, error(), TPublicType::matrix, TPublicType::size, and TPublicType::type.
bool TParseContext::constErrorCheck | ( | TIntermTyped * | node | ) |
Definition at line 381 of file ParseHelper.cpp.
References error(), EvqConst, TIntermNode::getLine(), and TIntermTyped::getQualifier().
TIntermTyped * TParseContext::constructBuiltIn | ( | const TType * | type, |
TOperator | op, | ||
TIntermNode * | node, | ||
const TSourceLoc & | line, | ||
bool | subset | ||
) |
Definition at line 1160 of file ParseHelper.cpp.
References TIntermediate::addUnaryMath(), EOpConstructBool, EOpConstructBVec2, EOpConstructBVec3, EOpConstructBVec4, EOpConstructFloat, EOpConstructInt, EOpConstructIVec2, EOpConstructIVec3, EOpConstructIVec4, EOpConstructMat2, EOpConstructMat3, EOpConstructMat4, EOpConstructVec2, EOpConstructVec3, EOpConstructVec4, error(), TIntermNode::getLine(), TIntermTyped::getType(), intermediate, recover(), TIntermediate::setAggregateOperator(), and symbolTable.
Referenced by addConstructor().
bool TParseContext::constructorErrorCheck | ( | const TSourceLoc & | line, |
TIntermNode * | node, | ||
TFunction & | function, | ||
TOperator | op, | ||
TType * | type | ||
) |
Definition at line 470 of file ParseHelper.cpp.
References EbtVoid, EOpConstructMat2, EOpConstructMat3, EOpConstructMat4, EOpConstructStruct, error(), EvqConst, TStructure::fields(), TType::getArraySize(), TIntermNode::getAsTyped(), TIntermTyped::getBasicType(), TType::getObjectSize(), TType::getQualifier(), TType::getStruct(), i, int, TType::isArray(), TType::isMatrix(), IsSampler(), TType::setQualifier(), and TParameter::type.
TIntermTyped * TParseContext::constructStruct | ( | TIntermNode * | node, |
TType * | type, | ||
int | paramCount, | ||
const TSourceLoc & | line, | ||
bool | subset | ||
) |
Definition at line 1222 of file ParseHelper.cpp.
References EOpConstructStruct, error(), TIntermNode::getAsTyped(), TType::getBasicString(), TIntermTyped::getType(), intermediate, recover(), and TIntermediate::setAggregateOperator().
Referenced by addConstructor().
bool TParseContext::containsSampler | ( | TType & | type | ) |
Definition at line 655 of file ParseHelper.cpp.
References EbtStruct, TStructure::fields(), TType::getBasicType(), TType::getStruct(), i, and IsSampler().
Referenced by samplerErrorCheck().
bool TParseContext::enterStructDeclaration | ( | const TSourceLoc & | line, |
const TString & | identifier | ||
) |
Definition at line 1393 of file ParseHelper.cpp.
References error(), and structNestingLevel.
void TParseContext::error | ( | const TSourceLoc & | loc, |
const char * | reason, | ||
const char * | token, | ||
const char * | extraInfo = "" |
||
) |
Definition at line 178 of file ParseHelper.cpp.
References diagnostics, pp::Diagnostics::ERROR, pp::SourceLocation::file, TSourceLoc::first_file, TSourceLoc::first_line, pp::SourceLocation::line, and TDiagnostics::writeInfo().
Referenced by addConstArrayNode(), addConstMatrixNode(), addConstStruct(), addConstVectorNode(), addIndexExpression(), arrayErrorCheck(), arrayQualifierErrorCheck(), arraySizeErrorCheck(), arrayTypeErrorCheck(), assignError(), binaryOpError(), boolErrorCheck(), constErrorCheck(), constructBuiltIn(), constructorErrorCheck(), constructStruct(), enterStructDeclaration(), executeInitializer(), extensionErrorCheck(), findFunction(), globalErrorCheck(), integerErrorCheck(), lValueErrorCheck(), nonInitConstErrorCheck(), nonInitErrorCheck(), paramErrorCheck(), parameterSamplerErrorCheck(), parseMatrixFields(), parseVectorFields(), precisionErrorCheck(), reservedErrorCheck(), samplerErrorCheck(), structNestingErrorCheck(), structQualifierErrorCheck(), unaryOpError(), voidErrorCheck(), and yyerror().
bool TParseContext::executeInitializer | ( | const TSourceLoc & | line, |
TString & | identifier, | ||
TPublicType & | pType, | ||
TIntermTyped * | initializer, | ||
TIntermNode *& | intermNode, | ||
TVariable * | variable = 0 |
||
) |
Definition at line 946 of file ParseHelper.cpp.
References TIntermediate::addAssign(), TIntermediate::addSymbol(), assignError(), EOpInitialize, error(), EvqConst, EvqGlobal, EvqTemporary, TSymbolTable::find(), TIntermNode::getAsConstantUnion(), TIntermNode::getAsSymbolNode(), TType::getCompleteString(), TIntermTyped::getCompleteString(), TVariable::getConstPointer(), TSymbol::getName(), TType::getQualifier(), TType::getQualifierString(), TIntermSymbol::getSymbol(), TVariable::getType(), TIntermTyped::getType(), TIntermConstantUnion::getUnionArrayPointer(), TSymbol::getUniqueId(), TSymbolTable::insert(), intermediate, reservedErrorCheck(), TType::setQualifier(), TVariable::shareConstPointer(), symbolTable, and voidErrorCheck().
void TParseContext::exitStructDeclaration | ( | ) |
Definition at line 1408 of file ParseHelper.cpp.
References structNestingLevel.
|
inline |
Definition at line 102 of file ParseHelper.h.
References directiveHandler, and TDirectiveHandler::extensionBehavior().
Referenced by extensionErrorCheck(), glslang_scan(), sh::OutputHLSL::header(), isExtensionEnabled(), and supportsExtension().
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 |
||
) |
Definition at line 919 of file ParseHelper.cpp.
References error(), TSymbolTable::find(), TFunction::getMangledName(), TSymbol::getName(), TSymbol::isFunction(), and symbolTable.
TIntermTyped * TParseContext::foldConstConstructor | ( | TIntermAggregate * | aggrNode, |
const TType & | type | ||
) |
Definition at line 1131 of file ParseHelper.cpp.
References TIntermediate::addConstantUnion(), areAllChildConst(), TIntermNode::getLine(), TType::getObjectSize(), TIntermOperator::getOp(), TIntermAggregate::getSequence(), intermediate, TIntermediate::parseConstTree(), TIntermTyped::setType(), and symbolTable.
Referenced by addConstructor().
bool TParseContext::globalErrorCheck | ( | const TSourceLoc & | line, |
bool | global, | ||
const char * | token | ||
) |
Definition at line 413 of file ParseHelper.cpp.
References error().
|
inline |
Definition at line 65 of file ParseHelper.h.
References diagnostics, and TDiagnostics::infoSink().
Referenced by TIntermediate::addAssign(), TIntermediate::addBinaryMath(), TIntermediate::addConversion(), TIntermediate::addUnaryMath(), sh::OutputHLSL::output(), and TIntermediate::promoteConstantUnion().
bool TParseContext::integerErrorCheck | ( | TIntermTyped * | node, |
const char * | token | ||
) |
Definition at line 397 of file ParseHelper.cpp.
References EbtInt, error(), TIntermTyped::getBasicType(), TIntermNode::getLine(), and TIntermTyped::getNominalSize().
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::lValueErrorCheck | ( | const TSourceLoc & | line, |
const char * | op, | ||
TIntermTyped * | node | ||
) |
Definition at line 268 of file ParseHelper.cpp.
References EbtSampler2D, EbtSamplerCube, EbtVoid, EOpIndexDirect, EOpIndexDirectStruct, EOpIndexIndirect, EOpVectorSwizzle, error(), EvqAttribute, EvqConst, EvqConstReadOnly, EvqFragCoord, EvqFrontFacing, EvqPointCoord, EvqUniform, EvqVaryingIn, TIntermNode::getAsAggregate(), TIntermNode::getAsBinaryNode(), TIntermNode::getAsConstantUnion(), TIntermNode::getAsSymbolNode(), TIntermTyped::getAsTyped(), TIntermTyped::getBasicType(), TIntermConstantUnion::getIConst(), TIntermBinary::getLeft(), TIntermOperator::getOp(), TIntermTyped::getQualifier(), TIntermBinary::getRight(), TIntermAggregate::getSequence(), and TIntermSymbol::getSymbol().
bool TParseContext::nonInitConstErrorCheck | ( | const TSourceLoc & | line, |
TString & | identifier, | ||
TPublicType & | type, | ||
bool | array | ||
) |
Definition at line 796 of file ParseHelper.cpp.
References error(), EvqConst, EvqTemporary, TPublicType::isStructureContainingArrays(), and TPublicType::qualifier.
bool TParseContext::nonInitErrorCheck | ( | const TSourceLoc & | line, |
TString & | identifier, | ||
TPublicType & | type, | ||
TVariable *& | variable | ||
) |
Definition at line 828 of file ParseHelper.cpp.
References error(), TSymbol::getName(), TSymbolTable::insert(), recover(), reservedErrorCheck(), symbolTable, and voidErrorCheck().
|
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 | ||
) |
Definition at line 848 of file ParseHelper.cpp.
References error(), EvqConst, EvqConstReadOnly, EvqIn, EvqTemporary, getQualifierString(), and TType::setQualifier().
bool TParseContext::parameterSamplerErrorCheck | ( | const TSourceLoc & | line, |
TQualifier | qualifier, | ||
const TType & | type | ||
) |
Definition at line 644 of file ParseHelper.cpp.
References EbtStruct, error(), EvqInOut, EvqOut, TType::getBasicString(), TType::getBasicType(), and IsSampler().
bool TParseContext::parseMatrixFields | ( | const TString & | compString, |
int | matSize, | ||
TMatrixFields & | fields, | ||
const TSourceLoc & | line | ||
) |
Definition at line 118 of file ParseHelper.cpp.
References TMatrixFields::col, error(), TMatrixFields::row, TMatrixFields::wholeCol, and TMatrixFields::wholeRow.
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.
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().
void TParseContext::recover | ( | ) |
Definition at line 171 of file ParseHelper.cpp.
Referenced by addConstArrayNode(), addConstMatrixNode(), addConstStruct(), addConstVectorNode(), addIndexExpression(), constructBuiltIn(), constructStruct(), nonInitErrorCheck(), and yyerror().
bool TParseContext::reservedErrorCheck | ( | const TSourceLoc & | line, |
const TString & | identifier | ||
) |
Definition at line 432 of file ParseHelper.cpp.
References TSymbolTable::atBuiltInLevel(), error(), isWebGLBasedSpec(), SH_CSS_SHADERS_SPEC, shaderSpec, and symbolTable.
Referenced by arrayErrorCheck(), executeInitializer(), and nonInitErrorCheck().
bool TParseContext::samplerErrorCheck | ( | const TSourceLoc & | line, |
const TPublicType & | pType, | ||
const char * | reason | ||
) |
Definition at line 610 of file ParseHelper.cpp.
References containsSampler(), EbtStruct, error(), getBasicString(), IsSampler(), TPublicType::type, and TPublicType::userDef.
Referenced by structQualifierErrorCheck().
bool TParseContext::structNestingErrorCheck | ( | const TSourceLoc & | line, |
const TField & | field | ||
) |
Definition at line 1419 of file ParseHelper.cpp.
References EbtStruct, error(), TType::getBasicType(), TType::getDeepestStructNesting(), isWebGLBasedSpec(), TField::name(), shaderSpec, and TField::type().
bool TParseContext::structQualifierErrorCheck | ( | const TSourceLoc & | line, |
const TPublicType & | pType | ||
) |
Definition at line 629 of file ParseHelper.cpp.
References EbtStruct, error(), EvqAttribute, EvqUniform, EvqVaryingIn, EvqVaryingOut, getQualifierString(), TPublicType::qualifier, samplerErrorCheck(), and TPublicType::type.
bool TParseContext::supportsExtension | ( | const char * | extension | ) |
Definition at line 888 of file ParseHelper.cpp.
References extensionBehavior().
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 = "" |
||
) |
Definition at line 190 of file ParseHelper.cpp.
References diagnostics, pp::SourceLocation::file, TSourceLoc::first_file, TSourceLoc::first_line, pp::SourceLocation::line, pp::Diagnostics::WARNING, and TDiagnostics::writeInfo().
Referenced by extensionErrorCheck().
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().
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.
TIntermediate& TParseContext::intermediate |
Definition at line 45 of file ParseHelper.h.
Referenced by addConstArrayNode(), addConstMatrixNode(), addConstructor(), addConstStruct(), addConstVectorNode(), addIndexExpression(), constructBuiltIn(), constructStruct(), executeInitializer(), and foldConstConstructor().
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 |
Definition at line 47 of file ParseHelper.h.
Referenced by sh::OutputHLSL::header(), sh::OutputHLSL::output(), and sh::OutputHLSL::OutputHLSL().
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().
TSymbolTable& TParseContext::symbolTable |
Definition at line 46 of file ParseHelper.h.
Referenced by arrayErrorCheck(), constructBuiltIn(), executeInitializer(), findFunction(), foldConstConstructor(), nonInitErrorCheck(), and reservedErrorCheck().
TIntermNode* TParseContext::treeRoot |
Definition at line 51 of file ParseHelper.h.
Referenced by TCompiler::compile(), and sh::OutputHLSL::output().