RetroArch
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
glslang::TPpContext Class Reference

#include <PpContext.h>

Collaboration diagram for glslang::TPpContext:
[legend]

Classes

struct  MacroSymbol
 
class  tInput
 
class  tMacroInput
 
class  tMarkerInput
 
class  TokenizableIncludeFile
 
class  TokenStream
 
class  tStringInput
 
class  tTokenInput
 
class  tUngotTokenInput
 
class  tZeroInput
 

Public Types

typedef TMap< int, MacroSymbolTSymbolMap
 

Public Member Functions

 TPpContext (TParseContextBase &, const std::string &rootFileName, TShader::Includer &)
 
virtual ~TPpContext ()
 
void setPreamble (const char *preamble, size_t length)
 
int tokenize (TPpToken &ppToken)
 
int tokenPaste (int token, TPpToken &)
 
void setInput (TInputScanner &input, bool versionWillBeError)
 
void pushInput (tInput *in)
 
void popInput ()
 
MacroSymbollookupMacroDef (int atom)
 
void addMacroDef (int atom, MacroSymbol &macroDef)
 

Public Attributes

TSymbolMap macroDefs
 

Protected Member Functions

 TPpContext (TPpContext &)
 
TPpContextoperator= (TPpContext &)
 
int scanToken (TPpToken *ppToken)
 
int getChar ()
 
void ungetChar ()
 
bool peekPasting ()
 
bool endOfReplacementList ()
 
bool isMacroInput ()
 
int CPPdefine (TPpToken *ppToken)
 
int CPPundef (TPpToken *ppToken)
 
int CPPelse (int matchelse, TPpToken *ppToken)
 
int extraTokenCheck (int atom, TPpToken *ppToken, int token)
 
int eval (int token, int precedence, bool shortCircuit, int &res, bool &err, TPpToken *ppToken)
 
int evalToToken (int token, bool shortCircuit, int &res, bool &err, TPpToken *ppToken)
 
int CPPif (TPpToken *ppToken)
 
int CPPifdef (int defined, TPpToken *ppToken)
 
int CPPinclude (TPpToken *ppToken)
 
int CPPline (TPpToken *ppToken)
 
int CPPerror (TPpToken *ppToken)
 
int CPPpragma (TPpToken *ppToken)
 
int CPPversion (TPpToken *ppToken)
 
int CPPextension (TPpToken *ppToken)
 
int readCPPline (TPpToken *ppToken)
 
int scanHeaderName (TPpToken *ppToken, char delimit)
 
TokenStreamPrescanMacroArg (TokenStream &, TPpToken *, bool newLineOkay)
 
int MacroExpand (TPpToken *ppToken, bool expandUndef, bool newLineOkay)
 
void pushTokenStreamInput (TokenStream &, bool pasting=false)
 
void UngetToken (int token, TPpToken *)
 
int ScanFromString (char *s)
 
void missingEndifCheck ()
 
int lFloatConst (int len, int ch, TPpToken *ppToken)
 
int characterLiteral (TPpToken *ppToken)
 
void push_include (TShader::Includer::IncludeResult *result)
 
void pop_include ()
 

Protected Attributes

TStringAtomMap atomStrings
 
char * preamble
 
int preambleLength
 
char ** strings
 
size_t * lengths
 
int numStrings
 
int currentString
 
int previous_token
 
TParseContextBase_parseContext
 
int ifdepth
 
bool elseSeen [maxIfNesting]
 
int elsetracker
 
std::vector< tInput * > inputStack
 
bool errorOnVersion
 
bool versionSeen
 
TShader::Includerincluder
 
bool inComment
 
std::string rootFileName
 
std::stack< TShader::Includer::IncludeResult * > includeStack
 
std::string currentSourceFile
 
std::istringstream strtodStream
 

Static Protected Attributes

static const int maxIfNesting = 65
 

Member Typedef Documentation

◆ TSymbolMap

Constructor & Destructor Documentation

◆ TPpContext() [1/2]

glslang::TPpContext::TPpContext ( TParseContextBase pc,
const std::string rootFileName,
TShader::Includer inclr 
)

◆ ~TPpContext()

glslang::TPpContext::~TPpContext ( )
virtual
Here is the call graph for this function:

◆ TPpContext() [2/2]

glslang::TPpContext::TPpContext ( TPpContext )
protected

Member Function Documentation

◆ addMacroDef()

void glslang::TPpContext::addMacroDef ( int  atom,
MacroSymbol macroDef 
)
inline
Here is the caller graph for this function:

◆ characterLiteral()

int glslang::TPpContext::characterLiteral ( TPpToken ppToken)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CPPdefine()

int glslang::TPpContext::CPPdefine ( TPpToken ppToken)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CPPelse()

int glslang::TPpContext::CPPelse ( int  matchelse,
TPpToken ppToken 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CPPerror()

int glslang::TPpContext::CPPerror ( TPpToken ppToken)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CPPextension()

int glslang::TPpContext::CPPextension ( TPpToken ppToken)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CPPif()

int glslang::TPpContext::CPPif ( TPpToken ppToken)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CPPifdef()

int glslang::TPpContext::CPPifdef ( int  defined,
TPpToken ppToken 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CPPinclude()

int glslang::TPpContext::CPPinclude ( TPpToken ppToken)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CPPline()

int glslang::TPpContext::CPPline ( TPpToken ppToken)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CPPpragma()

int glslang::TPpContext::CPPpragma ( TPpToken ppToken)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CPPundef()

int glslang::TPpContext::CPPundef ( TPpToken ppToken)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CPPversion()

int glslang::TPpContext::CPPversion ( TPpToken ppToken)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ endOfReplacementList()

bool glslang::TPpContext::endOfReplacementList ( )
inlineprotected
Here is the caller graph for this function:

◆ eval()

int glslang::TPpContext::eval ( int  token,
int  precedence,
bool  shortCircuit,
int &  res,
bool err,
TPpToken ppToken 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ evalToToken()

int glslang::TPpContext::evalToToken ( int  token,
bool  shortCircuit,
int &  res,
bool err,
TPpToken ppToken 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ extraTokenCheck()

int glslang::TPpContext::extraTokenCheck ( int  atom,
TPpToken ppToken,
int  token 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getChar()

int glslang::TPpContext::getChar ( )
inlineprotected
Here is the caller graph for this function:

◆ isMacroInput()

bool glslang::TPpContext::isMacroInput ( )
inlineprotected
Here is the caller graph for this function:

◆ lFloatConst()

int glslang::TPpContext::lFloatConst ( int  len,
int  ch,
TPpToken ppToken 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookupMacroDef()

MacroSymbol* glslang::TPpContext::lookupMacroDef ( int  atom)
inline
Here is the caller graph for this function:

◆ MacroExpand()

int glslang::TPpContext::MacroExpand ( TPpToken ppToken,
bool  expandUndef,
bool  newLineOkay 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ missingEndifCheck()

void glslang::TPpContext::missingEndifCheck ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

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

◆ peekPasting()

bool glslang::TPpContext::peekPasting ( )
inlineprotected
Here is the caller graph for this function:

◆ pop_include()

void glslang::TPpContext::pop_include ( )
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ popInput()

void glslang::TPpContext::popInput ( )
inline
Here is the caller graph for this function:

◆ PrescanMacroArg()

TPpContext::TokenStream * glslang::TPpContext::PrescanMacroArg ( TokenStream arg,
TPpToken ppToken,
bool  newLineOkay 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_include()

void glslang::TPpContext::push_include ( TShader::Includer::IncludeResult result)
inlineprotected
Here is the caller graph for this function:

◆ pushInput()

void glslang::TPpContext::pushInput ( tInput in)
inline
Here is the caller graph for this function:

◆ pushTokenStreamInput()

void glslang::TPpContext::pushTokenStreamInput ( TokenStream ts,
bool  pasting = false 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readCPPline()

int glslang::TPpContext::readCPPline ( TPpToken ppToken)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScanFromString()

int glslang::TPpContext::ScanFromString ( char *  s)
protected

◆ scanHeaderName()

int glslang::TPpContext::scanHeaderName ( TPpToken ppToken,
char  delimit 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scanToken()

int glslang::TPpContext::scanToken ( TPpToken ppToken)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setInput()

void glslang::TPpContext::setInput ( TInputScanner input,
bool  versionWillBeError 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPreamble()

void glslang::TPpContext::setPreamble ( const char *  preamble,
size_t  length 
)

◆ tokenize()

int glslang::TPpContext::tokenize ( TPpToken ppToken)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tokenPaste()

int glslang::TPpContext::tokenPaste ( int  token,
TPpToken ppToken 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ungetChar()

void glslang::TPpContext::ungetChar ( )
inlineprotected
Here is the caller graph for this function:

◆ UngetToken()

void glslang::TPpContext::UngetToken ( int  token,
TPpToken ppToken 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _parseContext

TParseContextBase& glslang::TPpContext::_parseContext
protected

◆ atomStrings

TStringAtomMap glslang::TPpContext::atomStrings
protected

◆ currentSourceFile

std::string glslang::TPpContext::currentSourceFile
protected

◆ currentString

int glslang::TPpContext::currentString
protected

◆ elseSeen

bool glslang::TPpContext::elseSeen[maxIfNesting]
protected

◆ elsetracker

int glslang::TPpContext::elsetracker
protected

◆ errorOnVersion

bool glslang::TPpContext::errorOnVersion
protected

◆ ifdepth

int glslang::TPpContext::ifdepth
protected

◆ includer

TShader::Includer& glslang::TPpContext::includer
protected

◆ includeStack

std::stack<TShader::Includer::IncludeResult*> glslang::TPpContext::includeStack
protected

◆ inComment

bool glslang::TPpContext::inComment
protected

◆ inputStack

std::vector<tInput*> glslang::TPpContext::inputStack
protected

◆ lengths

size_t* glslang::TPpContext::lengths
protected

◆ macroDefs

TSymbolMap glslang::TPpContext::macroDefs

◆ maxIfNesting

const int glslang::TPpContext::maxIfNesting = 65
staticprotected

◆ numStrings

int glslang::TPpContext::numStrings
protected

◆ preamble

char* glslang::TPpContext::preamble
protected

◆ preambleLength

int glslang::TPpContext::preambleLength
protected

◆ previous_token

int glslang::TPpContext::previous_token
protected

◆ rootFileName

std::string glslang::TPpContext::rootFileName
protected

◆ strings

char** glslang::TPpContext::strings
protected

◆ strtodStream

std::istringstream glslang::TPpContext::strtodStream
protected

◆ versionSeen

bool glslang::TPpContext::versionSeen
protected

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