aboutsummaryrefslogtreecommitdiffstats
path: root/cil/src/frontc/lexerhack.ml
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-03-29 09:47:11 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-03-29 09:47:11 +0000
commita5f03d96eee482cd84861fc8cefff9eb451c0cad (patch)
treecbc66cbc183a7c5ef2c044ed9ed04b8011df9cd4 /cil/src/frontc/lexerhack.ml
parenta9621943087a5578c995d88b06f87c5158eb5d00 (diff)
downloadcompcert-a5f03d96eee482cd84861fc8cefff9eb451c0cad.tar.gz
compcert-a5f03d96eee482cd84861fc8cefff9eb451c0cad.zip
Cleaned up configure script.
Distribution of CIL as an expanded source tree with changes applied (instead of original .tar.gz + patches to be applied at config time). git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1020 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cil/src/frontc/lexerhack.ml')
-rwxr-xr-xcil/src/frontc/lexerhack.ml22
1 files changed, 22 insertions, 0 deletions
diff --git a/cil/src/frontc/lexerhack.ml b/cil/src/frontc/lexerhack.ml
new file mode 100755
index 00000000..ecae28ef
--- /dev/null
+++ b/cil/src/frontc/lexerhack.ml
@@ -0,0 +1,22 @@
+
+module E = Errormsg
+
+(* We provide here a pointer to a function. It will be set by the lexer and
+ * used by the parser. In Ocaml lexers depend on parsers, so we we have put
+ * such functions in a separate module. *)
+let add_identifier: (string -> unit) ref =
+ ref (fun _ -> E.s (E.bug "You called an uninitialized add_identifier"))
+
+let add_type: (string -> unit) ref =
+ ref (fun _ -> E.s (E.bug "You called an uninitialized add_type"))
+
+let push_context: (unit -> unit) ref =
+ ref (fun _ -> E.s (E.bug "You called an uninitialized push_context"))
+
+let pop_context: (unit -> unit) ref =
+ ref (fun _ -> E.s (E.bug "You called an uninitialized pop_context"))
+
+
+(* Keep here the current pattern for formatparse *)
+let currentPattern = ref ""
+