From 55b6884dda47f773156fa2484e927430c53b4e05 Mon Sep 17 00:00:00 2001 From: herbelin Date: Tue, 31 Jan 2006 10:43:51 +0000 Subject: Ajout de fichiers d'interprétation de la syntaxe primitive pour string et char git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@7966 85f007b7-540e-0410-9357-904b9bb8a0f7 --- parsing/g_string_syntax.ml | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 parsing/g_string_syntax.ml (limited to 'parsing/g_string_syntax.ml') diff --git a/parsing/g_string_syntax.ml b/parsing/g_string_syntax.ml new file mode 100644 index 0000000000..d4d83f6d27 --- /dev/null +++ b/parsing/g_string_syntax.ml @@ -0,0 +1,60 @@ +(***********************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* + (match uninterp_ascii a with + | Some c -> Buffer.add_char b (Char.chr c); aux s + | _ -> raise Non_closed_string) + | RRef (_,z) when z = glob_EmptyString -> + Some (Buffer.contents b) + | _ -> + raise Non_closed_string + in aux r + with + Non_closed_string -> None + +let _ = + Notation.declare_string_interpreter "string_scope" + (glob_string,["Coq";"Strings";"String"]) + interp_string + ([RRef (dummy_loc,glob_String); RRef (dummy_loc,glob_EmptyString)], + uninterp_string, true) -- cgit v1.2.3