Commit 01bff295 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Add two tests of --list-errors, a small one (calc) and a large one (compcert_pre_parser).

Information about the maximum heap size can no longer be logged to stdout, as it is machine-dependent.
parent 15cfb759
......@@ -271,12 +271,10 @@ let () =
Printf.eprintf
"%d graph nodes explored by forward search.\n\
%d out of %d states are reachable.\n\
Found %d states where an error can occur.\n\
Maximum size reached by the major heap: %dM\n%!"
Found %d states where an error can occur.\n%!"
!explored
(Lr1.NodeSet.cardinal !reachable) Lr1.n
(Lr1.NodeSet.cardinal !domain)
max_heap_size
end
(* ------------------------------------------------------------------------ *)
......
......@@ -17,6 +17,191 @@ Built an LR(1) automaton with 18 states.
7 out of 18 states are represented.
0 out of 13 symbols keep track of their start position.
0 out of 13 symbols keep track of their end position.
4 out of 9 productions exploit shiftreduce optimization.
0 out of 18 states can peek at an error.
53 functions before inlining, 11 functions after inlining.
Total star size: 89
Done with level 0.
22 calls to intern; 4 unique strings.
F stores 8 facts.
E stores 0 edges.
Q stores 20 facts.
8 facts extracted out of Q, of which 7 considered.
Done with level 1.
139 calls to intern; 15 unique strings.
F stores 51 facts.
E stores 56 edges.
Q stores 103 facts.
51 facts extracted out of Q, of which 50 considered.
Done with level 2.
446 calls to intern; 32 unique strings.
F stores 177 facts.
E stores 120 edges.
Q stores 286 facts.
177 facts extracted out of Q, of which 176 considered.
Done with level 3.
915 calls to intern; 55 unique strings.
F stores 307 facts.
E stores 184 edges.
Q stores 543 facts.
398 facts extracted out of Q, of which 306 considered.
Done with level 4.
1179 calls to intern; 67 unique strings.
F stores 408 facts.
E stores 192 edges.
Q stores 527 facts.
678 facts extracted out of Q, of which 407 considered.
Done with level 5.
1179 calls to intern; 67 unique strings.
F stores 495 facts.
E stores 192 edges.
Q stores 0 facts.
1205 facts extracted out of Q, of which 495 considered.
144 graph nodes explored by forward search.
18 out of 18 states are reachable.
Found 11 states where an error can occur.
main: INT DIV TIMES
##
## Ends in an error in state: 10.
##
## expr -> expr DIV . expr [ TIMES RPAREN PLUS MINUS EOL DIV ]
##
## The known suffix of the stack is as follows:
## expr DIV
##
<YOUR SYNTAX ERROR MESSAGE HERE>
main: INT MINUS INT LPAREN
##
## Ends in an error in state: 13.
##
## expr -> expr . PLUS expr [ TIMES RPAREN PLUS MINUS EOL DIV ]
## expr -> expr . MINUS expr [ TIMES RPAREN PLUS MINUS EOL DIV ]
## expr -> expr MINUS expr . [ TIMES RPAREN PLUS MINUS EOL DIV ]
## expr -> expr . TIMES expr [ TIMES RPAREN PLUS MINUS EOL DIV ]
## expr -> expr . DIV expr [ TIMES RPAREN PLUS MINUS EOL DIV ]
##
## The known suffix of the stack is as follows:
## expr MINUS expr
##
<YOUR SYNTAX ERROR MESSAGE HERE>
main: INT MINUS TIMES
##
## Ends in an error in state: 12.
##
## expr -> expr MINUS . expr [ TIMES RPAREN PLUS MINUS EOL DIV ]
##
## The known suffix of the stack is as follows:
## expr MINUS
##
<YOUR SYNTAX ERROR MESSAGE HERE>
main: INT PLUS INT LPAREN
##
## Ends in an error in state: 9.
##
## expr -> expr . PLUS expr [ TIMES RPAREN PLUS MINUS EOL DIV ]
## expr -> expr PLUS expr . [ TIMES RPAREN PLUS MINUS EOL DIV ]
## expr -> expr . MINUS expr [ TIMES RPAREN PLUS MINUS EOL DIV ]
## expr -> expr . TIMES expr [ TIMES RPAREN PLUS MINUS EOL DIV ]
## expr -> expr . DIV expr [ TIMES RPAREN PLUS MINUS EOL DIV ]
##
## The known suffix of the stack is as follows:
## expr PLUS expr
##
<YOUR SYNTAX ERROR MESSAGE HERE>
main: INT PLUS TIMES
##
## Ends in an error in state: 8.
##
## expr -> expr PLUS . expr [ TIMES RPAREN PLUS MINUS EOL DIV ]
##
## The known suffix of the stack is as follows:
## expr PLUS
##
<YOUR SYNTAX ERROR MESSAGE HERE>
main: INT RPAREN
##
## Ends in an error in state: 16.
##
## expr -> expr . PLUS expr [ TIMES PLUS MINUS EOL DIV ]
## expr -> expr . MINUS expr [ TIMES PLUS MINUS EOL DIV ]
## expr -> expr . TIMES expr [ TIMES PLUS MINUS EOL DIV ]
## expr -> expr . DIV expr [ TIMES PLUS MINUS EOL DIV ]
## main -> expr . EOL [ # ]
##
## The known suffix of the stack is as follows:
## expr
##
<YOUR SYNTAX ERROR MESSAGE HERE>
main: INT TIMES TIMES
##
## Ends in an error in state: 5.
##
## expr -> expr TIMES . expr [ TIMES RPAREN PLUS MINUS EOL DIV ]
##
## The known suffix of the stack is as follows:
## expr TIMES
##
<YOUR SYNTAX ERROR MESSAGE HERE>
main: LPAREN INT LPAREN
##
## Ends in an error in state: 4.
##
## expr -> LPAREN expr . RPAREN [ TIMES RPAREN PLUS MINUS EOL DIV ]
## expr -> expr . PLUS expr [ TIMES RPAREN PLUS MINUS DIV ]
## expr -> expr . MINUS expr [ TIMES RPAREN PLUS MINUS DIV ]
## expr -> expr . TIMES expr [ TIMES RPAREN PLUS MINUS DIV ]
## expr -> expr . DIV expr [ TIMES RPAREN PLUS MINUS DIV ]
##
## The known suffix of the stack is as follows:
## LPAREN expr
##
<YOUR SYNTAX ERROR MESSAGE HERE>
main: LPAREN TIMES
##
## Ends in an error in state: 2.
##
## expr -> LPAREN . expr RPAREN [ TIMES RPAREN PLUS MINUS EOL DIV ]
##
## The known suffix of the stack is as follows:
## LPAREN
##
<YOUR SYNTAX ERROR MESSAGE HERE>
main: MINUS TIMES
##
## Ends in an error in state: 1.
##
## expr -> MINUS . expr [ TIMES RPAREN PLUS MINUS EOL DIV ]
##
## The known suffix of the stack is as follows:
## MINUS
##
<YOUR SYNTAX ERROR MESSAGE HERE>
main: TIMES
##
## Ends in an error in state: 0.
##
## main' -> . main [ # ]
##
## The known suffix of the stack is as follows:
##
##
<YOUR SYNTAX ERROR MESSAGE HERE>
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -845,7 +845,7 @@
(with-outputs-to calc.opp.out
(chdir ../good
(system
"timeout 60 %{bin:menhir} --only-preprocess %{deps} || echo 'TIMEOUT after 60 seconds.'")))))
"timeout 60 %{bin:menhir} --only-preprocess %{read-lines:../good/calc.flags} %{deps} || echo 'TIMEOUT after 60 seconds.'")))))
(rule (alias calc) (action (diff ../good/calc.opp.exp calc.opp.out)))
......@@ -854,7 +854,7 @@
(with-outputs-to calc.out
(chdir ../good
(system
"timeout 60 %{bin:menhir} --explain -lg 2 -la 2 -lc 2 --timings-to ../src/calc.out.timings %{deps} || echo 'TIMEOUT after 60 seconds.'")))))
"timeout 60 %{bin:menhir} --explain -lg 2 -la 2 -lc 2 --timings-to ../src/calc.out.timings %{read-lines:../good/calc.flags} %{deps} || echo 'TIMEOUT after 60 seconds.'")))))
(rule (alias calc) (action (diff ../good/calc.exp calc.out)))
......@@ -1594,7 +1594,7 @@
(with-outputs-to compcert_pre_parser.opp.out
(chdir ../good
(system
"timeout 60 %{bin:menhir} --only-preprocess %{deps} || echo 'TIMEOUT after 60 seconds.'")))))
"timeout 60 %{bin:menhir} --only-preprocess %{read-lines:../good/compcert_pre_parser.flags} %{deps} || echo 'TIMEOUT after 60 seconds.'")))))
(rule (alias compcert_pre_parser)
(action
......@@ -1606,7 +1606,7 @@
(with-outputs-to compcert_pre_parser.out
(chdir ../good
(system
"timeout 60 %{bin:menhir} --explain -lg 2 -la 2 -lc 2 --timings-to ../src/compcert_pre_parser.out.timings %{deps} || echo 'TIMEOUT after 60 seconds.'")))))
"timeout 60 %{bin:menhir} --explain -lg 2 -la 2 -lc 2 --timings-to ../src/compcert_pre_parser.out.timings %{read-lines:../good/compcert_pre_parser.flags} %{deps} || echo 'TIMEOUT after 60 seconds.'")))))
(rule (alias compcert_pre_parser)
(action (diff ../good/compcert_pre_parser.exp compcert_pre_parser.out)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment