diff options
author | 2003-04-29 09:39:34 +0000 | |
---|---|---|
committer | 2003-04-29 09:39:34 +0000 | |
commit | 740fb556ffda7095ffe9c67fdeeb19713e80ad62 (patch) | |
tree | ba3420e69c2e5997323a8ca03ec95e90ba46275f | |
parent | e870066f07eb872f5e913d9819f683bea13367cf (diff) |
Ajout is_ident_tail
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3970 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | lib/util.ml | 2 | ||||
-rw-r--r-- | lib/util.mli | 1 | ||||
-rw-r--r-- | parsing/esyntax.ml | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/lib/util.ml b/lib/util.ml index 6d9cf16b3..fb71357ba 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -42,6 +42,8 @@ let is_letter c = let is_digit c = (c >= '0' && c <= '9') +let is_ident_tail c = is_letter c or is_digit c or c = '\'' + (* Strings *) let explode s = diff --git a/lib/util.mli b/lib/util.mli index a18608712..5dac6d30e 100644 --- a/lib/util.mli +++ b/lib/util.mli @@ -45,6 +45,7 @@ val join_loc : loc -> loc -> loc val is_letter : char -> bool val is_digit : char -> bool +val is_ident_tail : char -> bool (*s Strings. *) diff --git a/parsing/esyntax.ml b/parsing/esyntax.ml index cc4e60d43..2c0541f4c 100644 --- a/parsing/esyntax.ml +++ b/parsing/esyntax.ml @@ -192,7 +192,7 @@ let print_delimiters inh se strm = function if is_letter (left.[String.length left -1]) then str " " else mt () in let rspace = let c = right.[0] in - if is_letter c or is_digit c or c = '\'' then str " " else mt () in + if is_ident_tail c then str " " else mt () in hov 0 (str left ++ lspace ++ strm ++ rspace ++ str right) (* Print the syntax entry. In the unparsing hunks, the tokens are |