RetroArch
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
glslang::TParseContextBase Class Referenceabstract

#include <ParseHelper.h>

Inheritance diagram for glslang::TParseContextBase:
[legend]
Collaboration diagram for glslang::TParseContextBase:
[legend]

Public Member Functions

 TParseContextBase (TSymbolTable &symbolTable, TIntermediate &interm, bool parsingBuiltins, int version, EProfile profile, const SpvVersion &spvVersion, EShLanguage language, TInfoSink &infoSink, bool forwardCompatible, EShMessages messages, const TString *entryPoint=nullptr)
 
virtual ~TParseContextBase ()
 
virtual void C_DECL error (const TSourceLoc &, const char *szReason, const char *szToken, const char *szExtraInfoFormat,...)
 
virtual void C_DECL warn (const TSourceLoc &, const char *szReason, const char *szToken, const char *szExtraInfoFormat,...)
 
virtual void C_DECL ppError (const TSourceLoc &, const char *szReason, const char *szToken, const char *szExtraInfoFormat,...)
 
virtual void C_DECL ppWarn (const TSourceLoc &, const char *szReason, const char *szToken, const char *szExtraInfoFormat,...)
 
virtual void setLimits (const TBuiltInResource &)=0
 
void checkIndex (const TSourceLoc &, const TType &, int &index)
 
EShLanguage getLanguage () const
 
void setScanContext (TScanContext *c)
 
TScanContextgetScanContext () const
 
void setPpContext (TPpContext *c)
 
TPpContextgetPpContext () const
 
virtual void setLineCallback (const std::function< void(int, int, bool, int, const char *)> &func)
 
virtual void setExtensionCallback (const std::function< void(int, const char *, const char *)> &func)
 
virtual void setVersionCallback (const std::function< void(int, int, const char *)> &func)
 
virtual void setPragmaCallback (const std::function< void(int, const TVector< TString > &)> &func)
 
virtual void setErrorCallback (const std::function< void(int, const char *)> &func)
 
virtual void reservedPpErrorCheck (const TSourceLoc &, const char *name, const char *op)=0
 
virtual bool lineContinuationCheck (const TSourceLoc &, bool endOfComment)=0
 
virtual bool lineDirectiveShouldSetNextLine () const =0
 
virtual void handlePragma (const TSourceLoc &, const TVector< TString > &)=0
 
virtual bool parseShaderStrings (TPpContext &, TInputScanner &input, bool versionWillBeError=false)=0
 
virtual void notifyVersion (int line, int version, const char *type_string)
 
virtual void notifyErrorDirective (int line, const char *error_message)
 
virtual void notifyLineDirective (int curLineNo, int newLineNo, bool hasSource, int sourceNum, const char *sourceName)
 
virtual void notifyExtensionDirective (int line, const char *extension, const char *behavior)
 
virtual void growGlobalUniformBlock (const TSourceLoc &, TType &, const TString &memberName, TTypeList *typeList=nullptr)
 
void renameShaderFunction (TString *&name) const
 
virtual bool lValueErrorCheck (const TSourceLoc &, const char *op, TIntermTyped *)
 
virtual void rValueErrorCheck (const TSourceLoc &, const char *op, TIntermTyped *)
 
- Public Member Functions inherited from glslang::TParseVersions
 TParseVersions (TIntermediate &interm, int version, EProfile profile, const SpvVersion &spvVersion, EShLanguage language, TInfoSink &infoSink, bool forwardCompatible, EShMessages messages)
 
virtual ~TParseVersions ()
 
virtual void initializeExtensionBehavior ()
 
virtual void requireProfile (const TSourceLoc &, int queryProfiles, const char *featureDesc)
 
virtual void profileRequires (const TSourceLoc &, int queryProfiles, int minVersion, int numExtensions, const char *const extensions[], const char *featureDesc)
 
virtual void profileRequires (const TSourceLoc &, int queryProfiles, int minVersion, const char *const extension, const char *featureDesc)
 
virtual void requireStage (const TSourceLoc &, EShLanguageMask, const char *featureDesc)
 
virtual void requireStage (const TSourceLoc &, EShLanguage, const char *featureDesc)
 
virtual void checkDeprecated (const TSourceLoc &, int queryProfiles, int depVersion, const char *featureDesc)
 
virtual void requireNotRemoved (const TSourceLoc &, int queryProfiles, int removedVersion, const char *featureDesc)
 
virtual void unimplemented (const TSourceLoc &, const char *featureDesc)
 
virtual void requireExtensions (const TSourceLoc &, int numExtensions, const char *const extensions[], const char *featureDesc)
 
virtual void ppRequireExtensions (const TSourceLoc &, int numExtensions, const char *const extensions[], const char *featureDesc)
 
virtual TExtensionBehavior getExtensionBehavior (const char *)
 
virtual bool extensionTurnedOn (const char *const extension)
 
virtual bool extensionsTurnedOn (int numExtensions, const char *const extensions[])
 
virtual void updateExtensionBehavior (int line, const char *const extension, const char *behavior)
 
virtual void fullIntegerCheck (const TSourceLoc &, const char *op)
 
virtual void doubleCheck (const TSourceLoc &, const char *op)
 
virtual void float16Check (const TSourceLoc &, const char *op, bool builtIn=false)
 
virtual void int64Check (const TSourceLoc &, const char *op, bool builtIn=false)
 
virtual void explicitInt8Check (const TSourceLoc &, const char *op, bool builtIn=false)
 
virtual void explicitInt16Check (const TSourceLoc &, const char *op, bool builtIn=false)
 
virtual void explicitInt32Check (const TSourceLoc &, const char *op, bool builtIn=false)
 
virtual void explicitFloat32Check (const TSourceLoc &, const char *op, bool builtIn=false)
 
virtual void explicitFloat64Check (const TSourceLoc &, const char *op, bool builtIn=false)
 
virtual void spvRemoved (const TSourceLoc &, const char *op)
 
virtual void vulkanRemoved (const TSourceLoc &, const char *op)
 
virtual void requireVulkan (const TSourceLoc &, const char *op)
 
virtual void requireSpv (const TSourceLoc &, const char *op)
 
virtual bool checkExtensionsRequested (const TSourceLoc &, int numExtensions, const char *const extensions[], const char *featureDesc)
 
virtual void updateExtensionBehavior (const char *const extension, TExtensionBehavior)
 
void addError ()
 
int getNumErrors () const
 
void setScanner (TInputScanner *scanner)
 
TInputScannergetScanner () const
 
const TSourceLocgetCurrentLoc () const
 
void setCurrentLine (int line)
 
void setCurrentColumn (int col)
 
void setCurrentSourceName (const char *name)
 
void setCurrentString (int string)
 
void getPreamble (std::string &)
 
bool relaxedErrors () const
 
bool suppressWarnings () const
 
bool isReadingHLSL () const
 
bool hlslEnable16BitTypes () const
 

Public Attributes

const char *const scopeMangler
 
TSymbolTablesymbolTable
 
int statementNestingLevel
 
int loopNestingLevel
 
int structNestingLevel
 
int controlFlowNestingLevel
 
const TTypecurrentFunctionType
 
bool functionReturnsValue
 
bool postEntryPointReturn
 
TList< TIntermSequence * > switchSequenceStack
 
TList< int > switchLevel
 
struct TPragma contextPragma
 
- Public Attributes inherited from glslang::TParseVersions
TInfoSinkinfoSink
 
int version
 
EProfile profile
 
EShLanguage language
 
SpvVersion spvVersion
 
bool forwardCompatible
 
TIntermediateintermediate
 

Protected Member Functions

 TParseContextBase (TParseContextBase &)
 
TParseContextBaseoperator= (TParseContextBase &)
 
const TFunctionselectFunction (const TVector< const TFunction *>, const TFunction &, std::function< bool(const TType &, const TType &, TOperator, int arg)>, std::function< bool(const TType &, const TType &, const TType &)>, bool &tie)
 
virtual void parseSwizzleSelector (const TSourceLoc &, const TString &, int size, TSwizzleSelectors< TVectorSelector > &)
 
virtual const char * getGlobalUniformBlockName () const
 
virtual void setUniformBlockDefaults (TType &) const
 
virtual void finalizeGlobalUniformBlockLayout (TVariable &)
 
virtual void outputMessage (const TSourceLoc &, const char *szReason, const char *szToken, const char *szExtraInfoFormat, TPrefixType prefix, va_list args)
 
virtual void trackLinkage (TSymbol &symbol)
 
virtual void makeEditable (TSymbol *&)
 
virtual TVariablegetEditableVariable (const char *name)
 
virtual void finish ()
 

Protected Attributes

const bool parsingBuiltins
 
TVector< TSymbol * > linkageSymbols
 
TScanContextscanContext
 
TPpContextppContext
 
TBuiltInResource resources
 
TLimitslimits
 
TString sourceEntryPointName
 
std::function< void(int, int, bool, int, const char *)> lineCallback
 
std::function< void(int, const TVector< TString > &)> pragmaCallback
 
std::function< void(int, int, const char *)> versionCallback
 
std::function< void(int, const char *, const char *)> extensionCallback
 
std::function< void(int, const char *)> errorCallback
 
TVariableglobalUniformBlock
 
unsigned int globalUniformBinding
 
unsigned int globalUniformSet
 
int firstNewMember
 
- Protected Attributes inherited from glslang::TParseVersions
TMap< TString, TExtensionBehaviorextensionBehavior
 
EShMessages messages
 
int numErrors
 
TInputScannercurrentScanner
 

Constructor & Destructor Documentation

◆ TParseContextBase() [1/2]

glslang::TParseContextBase::TParseContextBase ( TSymbolTable symbolTable,
TIntermediate interm,
bool  parsingBuiltins,
int  version,
EProfile  profile,
const SpvVersion spvVersion,
EShLanguage  language,
TInfoSink infoSink,
bool  forwardCompatible,
EShMessages  messages,
const TString entryPoint = nullptr 
)
inline

◆ ~TParseContextBase()

virtual glslang::TParseContextBase::~TParseContextBase ( )
inlinevirtual

◆ TParseContextBase() [2/2]

glslang::TParseContextBase::TParseContextBase ( TParseContextBase )
protected

Member Function Documentation

◆ checkIndex()

void glslang::TParseContextBase::checkIndex ( const TSourceLoc loc,
const TType type,
int &  index 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ error()

void C_DECL glslang::TParseContextBase::error ( const TSourceLoc loc,
const char *  szReason,
const char *  szToken,
const char *  szExtraInfoFormat,
  ... 
)
virtual

Implements glslang::TParseVersions.

Here is the call graph for this function:

◆ finalizeGlobalUniformBlockLayout()

virtual void glslang::TParseContextBase::finalizeGlobalUniformBlockLayout ( TVariable )
inlineprotectedvirtual

◆ finish()

void glslang::TParseContextBase::finish ( )
protectedvirtual

Reimplemented in glslang::TParseContext, and glslang::HlslParseContext.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEditableVariable()

TVariable * glslang::TParseContextBase::getEditableVariable ( const char *  name)
protectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGlobalUniformBlockName()

virtual const char* glslang::TParseContextBase::getGlobalUniformBlockName ( ) const
inlineprotectedvirtual

Reimplemented in glslang::HlslParseContext.

Here is the caller graph for this function:

◆ getLanguage()

EShLanguage glslang::TParseContextBase::getLanguage ( ) const
inline
Here is the caller graph for this function:

◆ getPpContext()

TPpContext* glslang::TParseContextBase::getPpContext ( ) const
inline
Here is the caller graph for this function:

◆ getScanContext()

TScanContext* glslang::TParseContextBase::getScanContext ( ) const
inline
Here is the caller graph for this function:

◆ growGlobalUniformBlock()

void glslang::TParseContextBase::growGlobalUniformBlock ( const TSourceLoc loc,
TType memberType,
const TString memberName,
TTypeList typeList = nullptr 
)
virtual

Reimplemented in glslang::HlslParseContext.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ handlePragma()

virtual void glslang::TParseContextBase::handlePragma ( const TSourceLoc ,
const TVector< TString > &   
)
pure virtual

Implemented in glslang::TParseContext, and glslang::HlslParseContext.

Here is the caller graph for this function:

◆ lineContinuationCheck()

virtual bool glslang::TParseContextBase::lineContinuationCheck ( const TSourceLoc ,
bool  endOfComment 
)
pure virtual

Implemented in glslang::TParseContext, and glslang::HlslParseContext.

Here is the caller graph for this function:

◆ lineDirectiveShouldSetNextLine()

virtual bool glslang::TParseContextBase::lineDirectiveShouldSetNextLine ( ) const
pure virtual

Implemented in glslang::TParseContext, and glslang::HlslParseContext.

Here is the caller graph for this function:

◆ lValueErrorCheck()

bool glslang::TParseContextBase::lValueErrorCheck ( const TSourceLoc loc,
const char *  op,
TIntermTyped node 
)
virtual

Reimplemented in glslang::TParseContext, and glslang::HlslParseContext.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeEditable()

void glslang::TParseContextBase::makeEditable ( TSymbol *&  symbol)
protectedvirtual

Reimplemented in glslang::TParseContext.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ notifyErrorDirective()

virtual void glslang::TParseContextBase::notifyErrorDirective ( int  line,
const char *  error_message 
)
inlinevirtual
Here is the caller graph for this function:

◆ notifyExtensionDirective()

virtual void glslang::TParseContextBase::notifyExtensionDirective ( int  line,
const char *  extension,
const char *  behavior 
)
inlinevirtual
Here is the caller graph for this function:

◆ notifyLineDirective()

virtual void glslang::TParseContextBase::notifyLineDirective ( int  curLineNo,
int  newLineNo,
bool  hasSource,
int  sourceNum,
const char *  sourceName 
)
inlinevirtual
Here is the caller graph for this function:

◆ notifyVersion()

virtual void glslang::TParseContextBase::notifyVersion ( int  line,
int  version,
const char *  type_string 
)
inlinevirtual
Here is the caller graph for this function:

◆ operator=()

TParseContextBase& glslang::TParseContextBase::operator= ( TParseContextBase )
protected

◆ outputMessage()

void glslang::TParseContextBase::outputMessage ( const TSourceLoc loc,
const char *  szReason,
const char *  szToken,
const char *  szExtraInfoFormat,
TPrefixType  prefix,
va_list  args 
)
protectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseShaderStrings()

virtual bool glslang::TParseContextBase::parseShaderStrings ( TPpContext ,
TInputScanner input,
bool  versionWillBeError = false 
)
pure virtual

◆ parseSwizzleSelector()

void glslang::TParseContextBase::parseSwizzleSelector ( const TSourceLoc loc,
const TString compString,
int  size,
TSwizzleSelectors< TVectorSelector > &  selector 
)
protectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ppError()

void C_DECL glslang::TParseContextBase::ppError ( const TSourceLoc loc,
const char *  szReason,
const char *  szToken,
const char *  szExtraInfoFormat,
  ... 
)
virtual

Implements glslang::TParseVersions.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ppWarn()

void C_DECL glslang::TParseContextBase::ppWarn ( const TSourceLoc loc,
const char *  szReason,
const char *  szToken,
const char *  szExtraInfoFormat,
  ... 
)
virtual

Implements glslang::TParseVersions.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ renameShaderFunction()

void glslang::TParseContextBase::renameShaderFunction ( TString *&  name) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reservedPpErrorCheck()

virtual void glslang::TParseContextBase::reservedPpErrorCheck ( const TSourceLoc ,
const char *  name,
const char *  op 
)
pure virtual

Implemented in glslang::TParseContext, and glslang::HlslParseContext.

Here is the caller graph for this function:

◆ rValueErrorCheck()

void glslang::TParseContextBase::rValueErrorCheck ( const TSourceLoc loc,
const char *  op,
TIntermTyped node 
)
virtual

Reimplemented in glslang::TParseContext.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ selectFunction()

const TFunction* glslang::TParseContextBase::selectFunction ( const TVector< const TFunction *>  ,
const TFunction ,
std::function< bool(const TType &, const TType &, TOperator, int arg)>  ,
std::function< bool(const TType &, const TType &, const TType &)>  ,
bool tie 
)
protected
Here is the caller graph for this function:

◆ setErrorCallback()

virtual void glslang::TParseContextBase::setErrorCallback ( const std::function< void(int, const char *)> &  func)
inlinevirtual

◆ setExtensionCallback()

virtual void glslang::TParseContextBase::setExtensionCallback ( const std::function< void(int, const char *, const char *)> &  func)
inlinevirtual

◆ setLimits()

virtual void glslang::TParseContextBase::setLimits ( const TBuiltInResource )
pure virtual

◆ setLineCallback()

virtual void glslang::TParseContextBase::setLineCallback ( const std::function< void(int, int, bool, int, const char *)> &  func)
inlinevirtual

◆ setPpContext()

void glslang::TParseContextBase::setPpContext ( TPpContext c)
inline

◆ setPragmaCallback()

virtual void glslang::TParseContextBase::setPragmaCallback ( const std::function< void(int, const TVector< TString > &)> &  func)
inlinevirtual

◆ setScanContext()

void glslang::TParseContextBase::setScanContext ( TScanContext c)
inline

◆ setUniformBlockDefaults()

virtual void glslang::TParseContextBase::setUniformBlockDefaults ( TType ) const
inlineprotectedvirtual

Reimplemented in glslang::HlslParseContext.

Here is the caller graph for this function:

◆ setVersionCallback()

virtual void glslang::TParseContextBase::setVersionCallback ( const std::function< void(int, int, const char *)> &  func)
inlinevirtual

◆ trackLinkage()

void glslang::TParseContextBase::trackLinkage ( TSymbol symbol)
protectedvirtual

Reimplemented in glslang::HlslParseContext.

Here is the caller graph for this function:

◆ warn()

void C_DECL glslang::TParseContextBase::warn ( const TSourceLoc loc,
const char *  szReason,
const char *  szToken,
const char *  szExtraInfoFormat,
  ... 
)
virtual

Implements glslang::TParseVersions.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ contextPragma

struct TPragma glslang::TParseContextBase::contextPragma

◆ controlFlowNestingLevel

int glslang::TParseContextBase::controlFlowNestingLevel

◆ currentFunctionType

const TType* glslang::TParseContextBase::currentFunctionType

◆ errorCallback

std::function<void(int, const char*)> glslang::TParseContextBase::errorCallback
protected

◆ extensionCallback

std::function<void(int, const char*, const char*)> glslang::TParseContextBase::extensionCallback
protected

◆ firstNewMember

int glslang::TParseContextBase::firstNewMember
protected

◆ functionReturnsValue

bool glslang::TParseContextBase::functionReturnsValue

◆ globalUniformBinding

unsigned int glslang::TParseContextBase::globalUniformBinding
protected

◆ globalUniformBlock

TVariable* glslang::TParseContextBase::globalUniformBlock
protected

◆ globalUniformSet

unsigned int glslang::TParseContextBase::globalUniformSet
protected

◆ limits

TLimits& glslang::TParseContextBase::limits
protected

◆ lineCallback

std::function<void(int, int, bool, int, const char*)> glslang::TParseContextBase::lineCallback
protected

◆ linkageSymbols

TVector<TSymbol*> glslang::TParseContextBase::linkageSymbols
protected

◆ loopNestingLevel

int glslang::TParseContextBase::loopNestingLevel

◆ parsingBuiltins

const bool glslang::TParseContextBase::parsingBuiltins
protected

◆ postEntryPointReturn

bool glslang::TParseContextBase::postEntryPointReturn

◆ ppContext

TPpContext* glslang::TParseContextBase::ppContext
protected

◆ pragmaCallback

std::function<void(int, const TVector<TString>&)> glslang::TParseContextBase::pragmaCallback
protected

◆ resources

TBuiltInResource glslang::TParseContextBase::resources
protected

◆ scanContext

TScanContext* glslang::TParseContextBase::scanContext
protected

◆ scopeMangler

const char* const glslang::TParseContextBase::scopeMangler

◆ sourceEntryPointName

TString glslang::TParseContextBase::sourceEntryPointName
protected

◆ statementNestingLevel

int glslang::TParseContextBase::statementNestingLevel

◆ structNestingLevel

int glslang::TParseContextBase::structNestingLevel

◆ switchLevel

TList<int> glslang::TParseContextBase::switchLevel

◆ switchSequenceStack

TList<TIntermSequence*> glslang::TParseContextBase::switchSequenceStack

◆ symbolTable

TSymbolTable& glslang::TParseContextBase::symbolTable

◆ versionCallback

std::function<void(int, int, const char*)> glslang::TParseContextBase::versionCallback
protected

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