source: Deliverables/D2.2/8051/cparser/Parse_aux.ml @ 486

Last change on this file since 486 was 486, checked in by ayache, 8 years ago

Deliverable D2.2

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1(* *********************************************************************)
2(*                                                                     *)
3(*              The Compcert verified compiler                         *)
4(*                                                                     *)
5(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)
6(*                                                                     *)
7(*  Copyright Institut National de Recherche en Informatique et en     *)
8(*  Automatique.  All rights reserved.  This file is distributed       *)
9(*  under the terms of the GNU General Public License as published by  *)
10(*  the Free Software Foundation, either version 2 of the License, or  *)
11(*  (at your option) any later version.  This file is also distributed *)
12(*  under the terms of the INRIA Non-Commercial License Agreement.     *)
13(*                                                                     *)
14(* *********************************************************************)
15
16open Format
17open Errors
18open Cabshelper
19
20(* Report parsing errors *)
21
22let parse_error msg =
23  error "%a: %s" format_cabsloc (currentLoc()) msg
24
25(* Are we parsing msvc syntax? *)
26
27let msvcMode = ref false
28
29(* We provide here a pointer to a function. It will be set by the lexer and
30 * used by the parser. In Ocaml lexers depend on parsers, so we we have put
31 * such functions in a separate module. *)
32let add_identifier: (string -> unit) ref = 
33  ref (fun _ -> assert false)
34
35let add_type: (string -> unit) ref = 
36  ref (fun _ -> assert false)
37
38let push_context: (unit -> unit) ref = 
39  ref (fun _ -> assert false)
40
41let pop_context: (unit -> unit) ref = 
42  ref (fun _ -> assert false)
43
44(* Keep here the current pattern for formatparse *)
45let currentPattern = ref ""
46
Note: See TracBrowser for help on using the repository browser.