aboutsummaryrefslogtreecommitdiff
path: root/parsing
diff options
context:
space:
mode:
authorfilliatr2000-04-28 16:00:15 +0000
committerfilliatr2000-04-28 16:00:15 +0000
commitbd182166d8a97de81b6abdb3aa434cc32d95a9dc (patch)
treebaf2d5ef0691eaffeba3228f89877c8eef103411 /parsing
parent897cb12c7d539e63d52a701bad92376acdf6a473 (diff)
portage en ocaml / camlp4 3.00
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@379 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing')
-rw-r--r--parsing/lexer.mli3
-rw-r--r--parsing/lexer.mll9
2 files changed, 9 insertions, 3 deletions
diff --git a/parsing/lexer.mli b/parsing/lexer.mli
index 721afa2d1c..6c99238f4f 100644
--- a/parsing/lexer.mli
+++ b/parsing/lexer.mli
@@ -15,6 +15,9 @@ val func : char Stream.t -> (string * string) Stream.t * (int -> int * int)
val add_token : Token.pattern -> unit
+ifdef CAMLP4_300 then
+val tparse : string * string -> ((string * string) Stream.t -> string) option
+else
val tparse : string * string -> (string * string) Stream.t -> string
val token_text : string * string -> string
diff --git a/parsing/lexer.mll b/parsing/lexer.mll
index 6a35d19dee..0f7b4938c9 100644
--- a/parsing/lexer.mll
+++ b/parsing/lexer.mll
@@ -261,9 +261,12 @@ let token_text = function
| (con, prm) -> con ^ " \"" ^ prm ^ "\""
let tparse (p_con, p_prm) =
- if p_prm = "" then
- parser [< '(con, prm) when con = p_con >] -> prm
+ ifdef CAMLP4_300 then
+ None
else
- parser [< '(con, prm) when con = p_con && prm = p_prm >] -> prm
+ if p_prm = "" then
+ parser [< '(con, prm) when con = p_con >] -> prm
+ else
+ parser [< '(con, prm) when con = p_con && prm = p_prm >] -> prm
}