Project

General

Profile

Revision a0b18d45 src/lexerLustreSpec.mll

View differences:

src/lexerLustreSpec.mll
89 89
      {REAL (Num.num_of_string (l^r), String.length r, s)}
90 90
  | (('-'? ['0'-'9']+ as l)  '.' (['0'-'9']+ as r) ('E'|'e') (('+'|'-') ['0'-'9'] ['0'-'9']* as exp)) as s
91 91
      {REAL (Num.num_of_string (l^r), String.length r + -1 * int_of_string exp, s)}
92
  | '-'? ['0'-'9']+ 
92
  | '-'? ['0'-'9']+
93 93
      {INT (int_of_string (Lexing.lexeme lexbuf)) }
94 94
 (* | '/' (['_' 'A'-'Z' 'a'-'z'] ['A'-'Z' 'a'-'z' '_' '0'-'9']* '/')+ as s
95 95
      {IDENT s}
......
149 149
  let annot s =
150 150
    let lexbuf = Lexing.from_string s in
151 151
   try
152
     Parser_lustre.lustre_annot(* ParserLustreSpec.lustre_annot *) token lexbuf
152
     Parser_lustre.lustre_annot_main(* ParserLustreSpec.lustre_annot *) token lexbuf
153 153
   with Parsing.Parse_error as _e -> (
154 154
     Format.eprintf "Lexing error at position %a:@.unexpected token %s when parsing annotation %s@.@?"
155 155
       (fun fmt p -> Format.fprintf fmt "%s l%i c%i" p.Lexing.pos_fname p.Lexing.pos_lnum p.Lexing.pos_cnum) lexbuf.Lexing.lex_curr_p
156 156
       (Lexing.lexeme lexbuf) s;
157 157
     raise (Error (Location.curr lexbuf)))
158
     
158

  
159 159

  
160 160
  let spec s =
161 161
    let lexbuf = Lexing.from_string s in
162 162
    try
163
      Parser_lustre.lustre_spec (*ParserLustreSpec.lustre_spec*) token lexbuf
163
      Parser_lustre.lustre_spec_main (*ParserLustreSpec.lustre_spec*) token lexbuf
164 164
    with Parsing.Parse_error ->
165 165
      raise (Error (Location.curr lexbuf))
166 166
}

Also available in: Unified diff