Signed-off-by: Jean Privat <jean@pryen.org>
15 files changed:
--- /dev/null
+ax
\ No newline at end of file
--- /dev/null
+ayx
\ No newline at end of file
--- /dev/null
+abx
\ No newline at end of file
--- /dev/null
+Grammar rejected;
+Lexer
+a = 'a';
+b = 'b';
+Parser
+Rejected
+ b, 'y'; //alt1 a; //alt2 'x'; //alt3 'y'; //alt4 p;
+p = a 'x';
--- /dev/null
+8:5-8:6 Error: a is already a rejected token.
--- /dev/null
+8:7-8:10 Error: 'x' is already a rejected token.
--- /dev/null
+Start
+ p
+ a@(1:1-1:2)='a'
+ 'x'@(1:2-1:3)
+ Eof@(1:3-1:3)=''
--- /dev/null
+NParserError@(1:2-1:3)='y'
+Nodes
+ a@(1:1-1:2)='a'
+ 'y'@(1:2-1:3)
--- /dev/null
+NLexerError@(1:2-1:2)='b'
+Nodes
+ a@(1:1-1:2)='a'
+ NLexerError@(1:2-1:2)='b'
--- /dev/null
+Error: cannot reject p, it is a production
--- /dev/null
+Start
+ p
+ a@(1:1-1:2)='a'
+ 'x'@(1:2-1:3)
+ Eof@(1:3-1:3)=''
--- /dev/null
+NParserError@(1:2-1:3)='y'
+Nodes
+ a@(1:1-1:2)='a'
+ 'y'@(1:2-1:3)
--- /dev/null
+NParserError@(1:2-1:3)='b'
+Nodes
+ a@(1:1-1:2)='a'
+ b@(1:2-1:3)='b'