Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
078d7f24
Commit
078d7f24
authored
Mar 14, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Simplify appearances a bit to make easier to read.
parent
5f934b03
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
hlslGrammar.cpp
hlsl/hlslGrammar.cpp
+0
-0
hlslGrammar.h
hlsl/hlslGrammar.h
+12
-5
No files found.
hlsl/hlslGrammar.cpp
View file @
078d7f24
This diff is collapsed.
Click to expand it.
hlsl/hlslGrammar.h
View file @
078d7f24
...
@@ -41,10 +41,13 @@
...
@@ -41,10 +41,13 @@
namespace
glslang
{
namespace
glslang
{
// Should just be the grammar aspect of HLSL.
// Described in more detail in hlslGrammar.cpp.
class
HlslGrammar
{
class
HlslGrammar
{
public
:
public
:
HlslGrammar
(
HlslScanContext
&
scan
Context
,
HlslParseContext
&
parseContext
)
HlslGrammar
(
HlslScanContext
&
scan
ner
,
HlslParseContext
&
parseContext
)
:
scan
Context
(
scanContext
),
parseContext
(
parseContext
)
{
}
:
scan
ner
(
scanner
),
parseContext
(
parseContext
),
intermediate
(
parseContext
.
intermediate
)
{
}
virtual
~
HlslGrammar
()
{
}
virtual
~
HlslGrammar
()
{
}
bool
parse
();
bool
parse
();
...
@@ -53,6 +56,8 @@ namespace glslang {
...
@@ -53,6 +56,8 @@ namespace glslang {
void
expected
(
const
char
*
);
void
expected
(
const
char
*
);
void
advanceToken
();
void
advanceToken
();
bool
acceptTokenClass
(
EHlslTokenClass
);
bool
acceptTokenClass
(
EHlslTokenClass
);
bool
peekTokenClass
(
EHlslTokenClass
);
bool
lookAheadTokenClass
(
EHlslTokenClass
);
bool
acceptCompilationUnit
();
bool
acceptCompilationUnit
();
bool
acceptDeclaration
(
TIntermNode
*&
node
);
bool
acceptDeclaration
(
TIntermNode
*&
node
);
...
@@ -69,11 +74,13 @@ namespace glslang {
...
@@ -69,11 +74,13 @@ namespace glslang {
bool
acceptOperator
(
TOperator
&
op
);
bool
acceptOperator
(
TOperator
&
op
);
bool
acceptCompoundStatement
(
TIntermAggregate
*&
);
bool
acceptCompoundStatement
(
TIntermAggregate
*&
);
bool
acceptStatement
(
TIntermNode
*&
);
bool
acceptStatement
(
TIntermNode
*&
);
bool
acceptSemantic
();
HlslScanContext
&
scanContext
;
HlslScanContext
&
scanner
;
// lexical scanner, to get next token
HlslParseContext
&
parseContext
;
HlslParseContext
&
parseContext
;
// state of parsing and helper functions for building the intermediate
TIntermediate
&
intermediate
;
// the final product, the intermediate representation, includes the AST
HlslToken
token
;
HlslToken
token
;
// the current token we are processing
};
};
}
// end namespace glslang
}
// end namespace glslang
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment