aboutsummaryrefslogtreecommitdiff
path: root/Test/baseResults
diff options
context:
space:
mode:
authorJohn Kessenich <cepheus@frii.com>2015-07-27 09:37:55 -0600
committerJohn Kessenich <cepheus@frii.com>2015-07-27 09:37:55 -0600
commitc777fc2c4c14991af0d98c094f532405364701f2 (patch)
tree0b9c221e1e42bda2c15bbf31115190dbf33df849 /Test/baseResults
parent91b977e17217eea47c2bd0568e52df9db0c3c29d (diff)
downloadglslang-c777fc2c4c14991af0d98c094f532405364701f2.tar.gz
Scanning: 1) rationalize end-of-input everywhere, 2) prevent infinite loop at end-of-input, 3) use positive chars.
Fixes issue #25. (char 255 aliased to -1 and missing tests for end of input). 1) All layers of input scanning now share a single EndOfInput value. This avoids translation of it across layers of encapsulation. 2) Some places looking for end of line were not stopping on EndOfInput. 3) Use of "char" for the input made char values > 127 be negative numbers. This allowed for aliasing of 255 to -1, etc. This is fixed by using unsigned char.
Diffstat (limited to 'Test/baseResults')
-rw-r--r--Test/baseResults/badChars.frag.out26
-rw-r--r--Test/baseResults/cppComplexExpr.vert.out8
-rw-r--r--Test/baseResults/cppNest.vert.out2
-rw-r--r--Test/baseResults/lineContinuation.vert.out4
4 files changed, 33 insertions, 7 deletions
diff --git a/Test/baseResults/badChars.frag.out b/Test/baseResults/badChars.frag.out
new file mode 100644
index 00000000..e3ab9455
--- /dev/null
+++ b/Test/baseResults/badChars.frag.out
@@ -0,0 +1,26 @@
+badChars.frag
+ERROR: 0:1: 'preprocessor evaluation' : bad expression
+ERROR: 0:1: '#if' : unexpected tokens following directive
+ERROR: 0:3: '#error' : A <bad token> B
+ERROR: 0:4: 'preprocessor evaluation' : bad expression
+ERROR: 0:4: '#if' : unexpected tokens following directive
+ERROR: 0:6: 'ÿ' : unexpected token
+ERROR: 0:7: '' : syntax error
+ERROR: 7 compilation errors. No code generated.
+
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:? Linker Objects
+0:? 'a' (global mediump int)
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: Missing entry point: Each stage requires one "void main()" entry point
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:? Linker Objects
+0:? 'a' (global mediump int)
+
diff --git a/Test/baseResults/cppComplexExpr.vert.out b/Test/baseResults/cppComplexExpr.vert.out
index 3d881d3b..08dd9365 100644
--- a/Test/baseResults/cppComplexExpr.vert.out
+++ b/Test/baseResults/cppComplexExpr.vert.out
@@ -5,19 +5,19 @@ ERROR: 0:66: '#define' : Macro redefined; different substitutions: BIG
ERROR: 0:81: 'preprocessor evaluation' : bad expression
ERROR: 0:81: '#if' : unexpected tokens following directive
ERROR: 0:82: '#error' : good macro
-ERROR: 0:87: 'macro expansion' : end of line in macro substitution: foobar
+ERROR: 0:87: 'macro expansion' : End of line in macro substitution: foobar
ERROR: 0:88: 'preprocessor evaluation' : can't evaluate expression
ERROR: 0:88: 'preprocessor evaluation' : bad expression
ERROR: 0:88: '#if' : unexpected tokens following directive
-ERROR: 0:92: 'macro expansion' : end of line in macro substitution: foobar
+ERROR: 0:92: 'macro expansion' : End of line in macro substitution: foobar
ERROR: 0:93: 'preprocessor evaluation' : can't evaluate expression
ERROR: 0:93: 'preprocessor evaluation' : bad expression
ERROR: 0:93: '#if' : unexpected tokens following directive
-ERROR: 0:99: 'macro expansion' : end of line in macro substitution: foobar
+ERROR: 0:99: 'macro expansion' : End of line in macro substitution: foobar
ERROR: 0:100: 'preprocessor evaluation' : can't evaluate expression
ERROR: 0:100: 'preprocessor evaluation' : bad expression
ERROR: 0:100: '#if' : unexpected tokens following directive
-ERROR: 0:101: 'macro expansion' : end of line in macro substitution: foobar
+ERROR: 0:101: 'macro expansion' : End of line in macro substitution: foobar
ERROR: 0:102: 'preprocessor evaluation' : can't evaluate expression
ERROR: 0:102: 'preprocessor evaluation' : bad expression
ERROR: 0:102: '#if' : unexpected tokens following directive
diff --git a/Test/baseResults/cppNest.vert.out b/Test/baseResults/cppNest.vert.out
index 4ddc7f37..f9534e4f 100644
--- a/Test/baseResults/cppNest.vert.out
+++ b/Test/baseResults/cppNest.vert.out
@@ -3,7 +3,7 @@ ERROR: 0:144: '#elif' : #elif after #else
ERROR: 0:152: '#else' : #else after #else
ERROR: 0:161: '#elif' : #elif after #else
ERROR: 0:169: '#else' : #else after #else
-ERROR: 0:177: 'macro expansion' : EOF in macro FUNC
+ERROR: 0:177: 'macro expansion' : End of input in macro FUNC
ERROR: 0:178: '' : syntax error
ERROR: 6 compilation errors. No code generated.
diff --git a/Test/baseResults/lineContinuation.vert.out b/Test/baseResults/lineContinuation.vert.out
index 5d9726c2..b74c7a67 100644
--- a/Test/baseResults/lineContinuation.vert.out
+++ b/Test/baseResults/lineContinuation.vert.out
@@ -13,10 +13,10 @@ ERROR: 0:49: '$' : unexpected token
ERROR: 0:50: '@' : unexpected token
ERROR: 0:55: '#error' : good continuation
WARNING: 0:62: 'line continuation' : used at end of comment; the following line is still part of the comment
-ERROR: 0:111: 'macro expansion' : end of line in macro substitution: FOOM
+ERROR: 0:111: 'macro expansion' : End of line in macro substitution: FOOM
ERROR: 0:112: 'preprocessor evaluation' : can't evaluate expression
ERROR: 0:112: '#if' : unexpected tokens following directive
-ERROR: 0:117: 'macro expansion' : end of line in macro substitution: FOOM
+ERROR: 0:117: 'macro expansion' : End of line in macro substitution: FOOM
ERROR: 0:118: 'preprocessor evaluation' : can't evaluate expression
ERROR: 0:118: '#if' : unexpected tokens following directive
ERROR: 0:150: '' : syntax error