summaryrefslogtreecommitdiff
path: root/test/Lex/gram_aux.ml
diff options
context:
space:
mode:
Diffstat (limited to 'test/Lex/gram_aux.ml')
-rw-r--r--test/Lex/gram_aux.ml33
1 files changed, 0 insertions, 33 deletions
diff --git a/test/Lex/gram_aux.ml b/test/Lex/gram_aux.ml
deleted file mode 100644
index 525ee69b5e..0000000000
--- a/test/Lex/gram_aux.ml
+++ /dev/null
@@ -1,33 +0,0 @@
-(* Auxiliaries for the parser. *)
-
-open Syntax
-
-let regexp_for_string s =
- let l = String.length s in
- if l = 0 then
- Epsilon
- else begin
- let re = ref(Characters [String.get s (l - 1)]) in
- for i = l - 2 downto 0 do
- re := Sequence(Characters [String.get s i], !re)
- done;
- !re
- end
-
-
-let char_class c1 c2 =
- let class = ref [] in
- for i = Char.code c2 downto Char.code c1 do
- class := Char.chr i :: !class
- done;
- !class
-
-
-let all_chars = char_class '\001' '\255'
-
-
-let rec subtract l1 l2 =
- match l1 with
- [] -> []
- | a::l -> if List.mem a l2 then subtract l l2 else a :: subtract l l2
-