From bfd8f8a98a7392ac8cbd9070a8e4ff4d06e09510 Mon Sep 17 00:00:00 2001 From: acondolu Date: Wed, 12 Jul 2017 23:12:44 +0200 Subject: [PATCH] Disabled some chars as variable names in the parser --- ocaml/parser.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ocaml/parser.ml b/ocaml/parser.ml index 4c7b829..90cda05 100644 --- a/ocaml/parser.ml +++ b/ocaml/parser.ml @@ -10,7 +10,8 @@ let mk_var x = Var x;; exception ParsingError of string;; -let isAlphaNum c = let n = Char.code c in 48 <= n && n <= 122 ;; +let isAlphaNum c = let n = Char.code c in + (48 <= n && n <= 90) || (95 <= n && n <= 122) ;; let isSpace c = c = ' ' || c = '\n' || c = '\t' ;; let rec index_of x = -- 2.39.2