Revision 89b9e25c
Added by Xavier Thirioux about 8 years ago
src/parse.ml | ||
---|---|---|
27 | 27 |
let report_error loc = |
28 | 28 |
Location.print loc; |
29 | 29 |
print_string "Syntax error\n" |
30 |
(* |
|
31 |
let wrap own parsing_fun token_fun lexbuf = |
|
32 |
try |
|
33 |
let ast = parsing_fun token_fun lexbuf own in |
|
34 |
Parsing.clear_parser (); |
|
35 |
ast |
|
36 |
with |
|
37 |
| Parsing.Parse_error -> |
|
38 |
let loc = Location.curr lexbuf in |
|
39 |
raise (Syntax_err loc) |
|
40 |
*) |
|
41 |
let header own parsing_fun token_fun lexbuf = |
|
42 |
try |
|
43 |
let ast = parsing_fun token_fun lexbuf own in |
|
44 |
Parsing.clear_parser (); |
|
45 |
ast |
|
46 |
with |
|
47 |
| Parsing.Parse_error -> |
|
48 |
let loc = Location.curr lexbuf in |
|
49 |
raise (Syntax_err loc) |
|
30 | 50 |
|
31 |
let wrap parsing_fun token_fun lexbuf =
|
|
51 |
let prog parsing_fun token_fun lexbuf =
|
|
32 | 52 |
try |
33 | 53 |
let ast = parsing_fun token_fun lexbuf in |
34 | 54 |
Parsing.clear_parser (); |
... | ... | |
38 | 58 |
let loc = Location.curr lexbuf in |
39 | 59 |
raise (Syntax_err loc) |
40 | 60 |
|
41 |
let prog parse lex = wrap parse lex |
|
42 |
|
|
43 | 61 |
(* Local Variables: *) |
44 | 62 |
(* compile-command:"make -C .." *) |
45 | 63 |
(* End: *) |
Also available in: Unified diff
corrected bugs in clock generalization that produced pessimistic C code (not wrong though); corrected bug with node importation policy wrt (re)declaration, (re)definition...
git-svn-id: https://cavale.enseeiht.fr/svn/lustrec/lustre_compiler/trunk@194 041b043f-8d7c-46b2-b46e-ef0dd855326e