Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
GLSL::Lexer Class Reference

#include <glsllexer_p.h>

+ Collaboration diagram for GLSL::Lexer:

Classes

union  Value
 

Public Types

enum  Variant {
  Variant_GLSL_120 = 0x00010000 , Variant_GLSL_150 = 0x00020000 , Variant_GLSL_400 = 0x00040000 , Variant_GLSL_ES_100 = 0x00080000 ,
  Variant_VertexShader = 0x00200000 , Variant_FragmentShader = 0x00400000 , Variant_Reserved = 0x80000000 , Variant_Mask = 0xFFFF0000 ,
  Variant_All = 0xFFFF0000
}
 

Public Member Functions

 Lexer (Engine *engine, const char *source, unsigned size)
 
 ~Lexer ()
 
Engineengine () const
 
int state () const
 
void setState (int state)
 
int variant () const
 
void setVariant (int flags)
 
bool scanKeywords () const
 
void setScanKeywords (bool scanKeywords)
 
bool scanComments () const
 
void setScanComments (bool scanComments)
 
int yylex (Token *tk)
 
int findKeyword (const char *word, int length) const
 
voidyyval () const
 

Static Public Member Functions

static QStringList keywords (int variant)
 

Detailed Description

Definition at line 51 of file glsllexer_p.h.

Member Enumeration Documentation

◆ Variant

Enumerator
Variant_GLSL_120 
Variant_GLSL_150 
Variant_GLSL_400 
Variant_GLSL_ES_100 
Variant_VertexShader 
Variant_FragmentShader 
Variant_Reserved 
Variant_Mask 
Variant_All 

Definition at line 57 of file glsllexer_p.h.

Constructor & Destructor Documentation

◆ Lexer()

Lexer::Lexer ( Engine * engine,
const char * source,
unsigned size )

Definition at line 16 of file glsllexer.cpp.

◆ ~Lexer()

Lexer::~Lexer ( )

Definition at line 30 of file glsllexer.cpp.

Member Function Documentation

◆ engine()

Engine * GLSL::Lexer::engine ( ) const
inline

Definition at line 77 of file glsllexer_p.h.

◆ findKeyword()

int Lexer::findKeyword ( const char * word,
int length ) const

Definition at line 373 of file glsllexer.cpp.

References GLSLParserTable::T_RESERVED, and Variant_Mask.

◆ keywords()

QStringList Lexer::keywords ( int variant)
static

Definition at line 1642 of file glslkeywords.cpp.

References list, variant(), Variant_FragmentShader, Variant_GLSL_120, Variant_GLSL_150, Variant_GLSL_400, Variant_GLSL_ES_100, Variant_Reserved, and Variant_VertexShader.

+ Here is the call graph for this function:

◆ scanComments()

bool GLSL::Lexer::scanComments ( ) const
inline

Definition at line 88 of file glsllexer_p.h.

◆ scanKeywords()

bool GLSL::Lexer::scanKeywords ( ) const
inline

Definition at line 85 of file glsllexer_p.h.

◆ setScanComments()

void GLSL::Lexer::setScanComments ( bool scanComments)
inline

Definition at line 89 of file glsllexer_p.h.

◆ setScanKeywords()

void GLSL::Lexer::setScanKeywords ( bool scanKeywords)
inline

Definition at line 86 of file glsllexer_p.h.

◆ setState()

void GLSL::Lexer::setState ( int state)
inline

Definition at line 80 of file glsllexer_p.h.

References state.

◆ setVariant()

void GLSL::Lexer::setVariant ( int flags)
inline

Definition at line 83 of file glsllexer_p.h.

Referenced by GLSL::Parser::Parser().

+ Here is the caller graph for this function:

◆ state()

int GLSL::Lexer::state ( ) const
inline

Definition at line 79 of file glsllexer_p.h.

◆ variant()

int GLSL::Lexer::variant ( ) const
inline

Definition at line 82 of file glsllexer_p.h.

Referenced by keywords().

+ Here is the caller graph for this function:

◆ yylex()

int Lexer::yylex ( Token * tk)

Definition at line 41 of file glsllexer.cpp.

References line, pos, and GLSL::Lexer::Value::ptr.

Referenced by GLSL::Parser::Parser().

+ Here is the caller graph for this function:

◆ yyval()

void * GLSL::Lexer::yyval ( ) const
inline

Definition at line 94 of file glsllexer_p.h.


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