nitcc/tests: add lexer-shortest.sablecc
authorJean Privat <jean@pryen.org>
Fri, 29 Nov 2013 17:38:52 +0000 (12:38 -0500)
committerJean Privat <jean@pryen.org>
Fri, 29 Nov 2013 17:38:52 +0000 (12:38 -0500)
Signed-off-by: Samuel Lambert <tweakedsam@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

contrib/nitcc/tests/lexer-shortest.input1 [new file with mode: 0644]
contrib/nitcc/tests/lexer-shortest.input2 [new file with mode: 0644]
contrib/nitcc/tests/lexer-shortest.sablecc [new file with mode: 0644]
contrib/nitcc/tests/sav/lexer-shortest.input1.res [new file with mode: 0644]
contrib/nitcc/tests/sav/lexer-shortest.input2.res [new file with mode: 0644]

diff --git a/contrib/nitcc/tests/lexer-shortest.input1 b/contrib/nitcc/tests/lexer-shortest.input1
new file mode 100644 (file)
index 0000000..2ed7d32
--- /dev/null
@@ -0,0 +1 @@
+{gffffdg}
\ No newline at end of file
diff --git a/contrib/nitcc/tests/lexer-shortest.input2 b/contrib/nitcc/tests/lexer-shortest.input2
new file mode 100644 (file)
index 0000000..915d212
--- /dev/null
@@ -0,0 +1 @@
+{gffffdg
\ No newline at end of file
diff --git a/contrib/nitcc/tests/lexer-shortest.sablecc b/contrib/nitcc/tests/lexer-shortest.sablecc
new file mode 100644 (file)
index 0000000..0e61d95
--- /dev/null
@@ -0,0 +1,8 @@
+Grammar x;
+
+Lexer
+    c = Shortest ('{' Any* '}') ;
+
+Parser
+    p = c ;
+
diff --git a/contrib/nitcc/tests/sav/lexer-shortest.input1.res b/contrib/nitcc/tests/sav/lexer-shortest.input1.res
new file mode 100644 (file)
index 0000000..830ca2d
--- /dev/null
@@ -0,0 +1,4 @@
+Start
+  p
+    c@(1:1-1:10)='{gffffdg}'
+  Eof@(1:10-1:10)=''
diff --git a/contrib/nitcc/tests/sav/lexer-shortest.input2.res b/contrib/nitcc/tests/sav/lexer-shortest.input2.res
new file mode 100644 (file)
index 0000000..926053c
--- /dev/null
@@ -0,0 +1,3 @@
+NLexerError@(1:1-1:9)='{gffffdg'
+Nodes
+  NLexerError@(1:1-1:9)='{gffffdg'