Revision 01c7d5e1 src/lexerLustreSpec.mll
src/lexerLustreSpec.mll | ||
---|---|---|
1 | 1 |
{ |
2 | 2 |
|
3 |
open ParserLustreSpec |
|
3 |
(* open ParserLustreSpec *) |
|
4 |
open Parser_lustre |
|
4 | 5 |
open Utils |
5 | 6 |
|
6 | 7 |
let str_buf = Buffer.create 1024 |
... | ... | |
11 | 12 |
used to handle all the possible keywords. *) |
12 | 13 |
let keyword_table = |
13 | 14 |
create_hashtable 20 [ |
14 |
"true", TRUE;
|
|
15 |
"false", FALSE;
|
|
15 |
(* "true", TRUE; *)
|
|
16 |
(* "false", FALSE; *)
|
|
16 | 17 |
"stateless", STATELESS; |
17 | 18 |
"if", IF; |
18 | 19 |
"then", THEN; |
... | ... | |
44 | 45 |
"pre", PRE; |
45 | 46 |
"div", DIV; |
46 | 47 |
"const", CONST; |
47 |
"include", INCLUDE;
|
|
48 |
(* "include", INCLUDE; *)
|
|
48 | 49 |
"assert", ASSERT; |
49 | 50 |
"ensures", ENSURES; |
50 | 51 |
"requires", REQUIRES; |
... | ... | |
136 | 137 |
let annot s = |
137 | 138 |
let lb = Lexing.from_string s in |
138 | 139 |
try |
139 |
ParserLustreSpec.lustre_annot token lb
|
|
140 |
Parser_lustre.lustre_annot(* ParserLustreSpec.lustre_annot *) token lb
|
|
140 | 141 |
with Parsing.Parse_error as _e -> ( |
141 | 142 |
Format.eprintf "Lexing error at position %a:@.unexpected token %s@.@?" |
142 | 143 |
(fun fmt p -> Format.fprintf fmt "%s l%i c%i" p.Lexing.pos_fname p.Lexing.pos_lnum p.Lexing.pos_cnum) lb.Lexing.lex_curr_p |
... | ... | |
146 | 147 |
|
147 | 148 |
let spec s = |
148 | 149 |
let lb = Lexing.from_string s in |
149 |
ParserLustreSpec.lustre_spec token lb
|
|
150 |
Parser_lustre.lustre_spec (*ParserLustreSpec.lustre_spec*) token lb
|
|
150 | 151 |
|
151 | 152 |
} |
Also available in: Unified diff