Revision ca7ff3f7
Added by Lélio Brun over 1 year ago
src/parsers/dune | ||
---|---|---|
5 | 5 |
;; The use of [--external-tokens Parser] is required for the two parsers |
6 | 6 |
;; to share a single [token] type. This makes them usable with the same |
7 | 7 |
;; lexer. |
8 |
|
|
8 | 9 |
(menhir |
9 | 10 |
(modules parser_lustre) |
10 | 11 |
(merge_into parser_lustre_table) |
... | ... | |
22 | 23 |
|
23 | 24 |
(rule |
24 | 25 |
(deps parser_lustre.check) |
25 |
(action (with-stdout-to parser_lustre_messages.ml |
|
26 |
(run menhir |
|
27 |
%{dep:parser_lustre.mly} |
|
28 |
--compile-errors %{dep:parser_lustre.messages})))) |
|
26 |
(action |
|
27 |
(with-stdout-to |
|
28 |
parser_lustre_messages.ml |
|
29 |
(run |
|
30 |
menhir |
|
31 |
%{dep:parser_lustre.mly} |
|
32 |
--compile-errors |
|
33 |
%{dep:parser_lustre.messages})))) |
|
29 | 34 |
|
30 | 35 |
;; This rule generates a file "parser_lustre.auto.messages" that contains a |
31 | 36 |
;; list of all error states. It is used by the completeness check. |
32 | 37 |
|
33 | 38 |
(rule |
34 |
(with-stdout-to parser_lustre.auto.messages |
|
39 |
(with-stdout-to |
|
40 |
parser_lustre.auto.messages |
|
35 | 41 |
(run menhir %{dep:parser_lustre.mly} --list-errors))) |
36 | 42 |
|
37 | 43 |
;; This rule implements the completeness check. It checks that every error |
... | ... | |
40 | 46 |
;; by the programmer. |
41 | 47 |
|
42 | 48 |
(rule |
43 |
(with-stdout-to parser_lustre.check |
|
44 |
(run menhir |
|
45 |
%{dep:parser_lustre.mly} |
|
46 |
--compare-errors %{dep:parser_lustre.auto.messages} |
|
47 |
--compare-errors %{dep:parser_lustre.messages}))) |
|
49 |
(with-stdout-to |
|
50 |
parser_lustre.check |
|
51 |
(run |
|
52 |
menhir |
|
53 |
%{dep:parser_lustre.mly} |
|
54 |
--compare-errors |
|
55 |
%{dep:parser_lustre.auto.messages} |
|
56 |
--compare-errors |
|
57 |
%{dep:parser_lustre.messages}))) |
Also available in: Unified diff
reformatting