Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Shaders.Parser.ShaderParser Class Reference

Parser class. More...

Public Member Functions

ParsingResult TryPreProcessAndParse (string source, string sourceFileName, ShaderMacro[] macros=null, params string[] includeDirectories)
 Preprocesses and parses the specified source. More...
 
Shader PreProcessAndParse (string source, string sourceFileName, ShaderMacro[] macros=null, params string[] includeDirectories)
 Preprocesses and parses the specified source. More...
 
ParsingResult Parse (string sourceCode, string file)
 Parses the specified source code. More...
 
Shader ParseAndCheck (string sourceCode, string file)
 Parse a source code file and check that the result is valid. More...
 

Static Public Member Functions

static ShaderParser GetParser< T > (NonTerminal root=null)
 Gets the parser. More...
 
static T GetGrammar< T > ()
 Gets the language. More...
 
static Shader Check (ParsingResult result, string sourceFileName)
 

Properties

Irony.Parsing.Parser Parser [get, set]
 Gets or sets the parser. More...
 
ShaderGrammar Grammar [get, set]
 Gets the grammar. More...
 
ShaderLanguageData LanguageData [get, set]
 Gets or sets the language data. More...
 
Tokenizer Tokenizer [get, set]
 Gets the tokenizer. More...
 

Detailed Description

Parser class.

Definition at line 20 of file ShaderParser.cs.

Member Function Documentation

static Shader SiliconStudio.Shaders.Parser.ShaderParser.Check ( ParsingResult  result,
string  sourceFileName 
)
static
static T SiliconStudio.Shaders.Parser.ShaderParser.GetGrammar< T > ( )
static

Gets the language.

Template Parameters
T
Returns
Type Constraints
T :ShaderGrammar 
T :new() 

Definition at line 132 of file ShaderParser.cs.

static ShaderParser SiliconStudio.Shaders.Parser.ShaderParser.GetParser< T > ( NonTerminal  root = null)
static

Gets the parser.

Template Parameters
T
Returns
Type Constraints
T :ShaderGrammar 
T :new() 

Definition at line 112 of file ShaderParser.cs.

ParsingResult SiliconStudio.Shaders.Parser.ShaderParser.Parse ( string  sourceCode,
string  file 
)

Parses the specified source code.

Template Parameters
TType of the grammar
Parameters
sourceCodeThe source code.
fileThe file.
Returns
A parsing result

Definition at line 154 of file ShaderParser.cs.

Shader SiliconStudio.Shaders.Parser.ShaderParser.ParseAndCheck ( string  sourceCode,
string  file 
)

Parse a source code file and check that the result is valid.

Parameters
sourceCode
file
Returns

Definition at line 190 of file ShaderParser.cs.

Shader SiliconStudio.Shaders.Parser.ShaderParser.PreProcessAndParse ( string  source,
string  sourceFileName,
ShaderMacro[]  macros = null,
params string[]  includeDirectories 
)

Preprocesses and parses the specified source.

Parameters
sourceThe source.
sourceFileNameName of the source file.
macrosThe macros defined for the preprocessor.
includeDirectoriesThe include directories used by the preprocessor..
Returns
Result of parsing

Definition at line 100 of file ShaderParser.cs.

ParsingResult SiliconStudio.Shaders.Parser.ShaderParser.TryPreProcessAndParse ( string  source,
string  sourceFileName,
ShaderMacro[]  macros = null,
params string[]  includeDirectories 
)

Preprocesses and parses the specified source.

Parameters
sourceThe source.
sourceFileNameName of the source file.
macrosThe macros defined for the preprocessor.
includeDirectoriesThe include directories used by the preprocessor..
Returns
Result of parsing

Definition at line 71 of file ShaderParser.cs.

Property Documentation

ShaderGrammar SiliconStudio.Shaders.Parser.ShaderParser.Grammar
getset

Gets the grammar.

Definition at line 35 of file ShaderParser.cs.

ShaderLanguageData SiliconStudio.Shaders.Parser.ShaderParser.LanguageData
getset

Gets or sets the language data.

The language data.

Definition at line 43 of file ShaderParser.cs.

Irony.Parsing.Parser SiliconStudio.Shaders.Parser.ShaderParser.Parser
getset

Gets or sets the parser.

The parser.

Definition at line 30 of file ShaderParser.cs.

Tokenizer SiliconStudio.Shaders.Parser.ShaderParser.Tokenizer
getset

Gets the tokenizer.

Definition at line 48 of file ShaderParser.cs.


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