summaryrefslogtreecommitdiffstats
path: root/camlp4
diff options
context:
space:
mode:
authorDaniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>2002-02-16 19:06:56 +0000
committerDaniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>2002-02-16 19:06:56 +0000
commit4991390992550e8d9366c7e2ef64c6b88c83cf2c (patch)
tree8fdcf323e87e3dd895e922c53db64e32f1eb7671 /camlp4
parent0054bf8a75b52a6c837f9dde9e9834dc45fc7437 (diff)
-
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4423 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'camlp4')
-rw-r--r--camlp4/compile/Makefile2
-rw-r--r--camlp4/compile/comp_head.ml2
-rw-r--r--camlp4/compile/compile.ml21
3 files changed, 4 insertions, 21 deletions
diff --git a/camlp4/compile/Makefile b/camlp4/compile/Makefile
index bc817c3fa..6298ca785 100644
--- a/camlp4/compile/Makefile
+++ b/camlp4/compile/Makefile
@@ -23,7 +23,7 @@ camlp4$D.fast.opt: pa_$D_fast.cmx
cd ../camlp4; $(MAKE) optp4 CAMLP4OPT=../compile/camlp4$D.fast.opt CAMLP4M="../compile/pa_$D_fast.cmx ../meta/pr_dump.cmx"
pa_$D_fast.ml: comp_head.ml $D_fast.ml comp_trail.ml
- cat $(SRC) | sed -e "s/Plexer.make ()/P.lexer/" -e "/EXTEND/,/END/d" -e "/Grammar.Entry.of_parser/d" -e "/Grammar.Entry.create/d" | cat comp_head.ml - $D_fast.ml comp_trail.ml > pa_$D_fast.ml
+ cat $(SRC) | sed -e "s/Plexer.gmake ()/P.lexer/" -e "/EXTEND/,/END/d" -e "/Grammar.Entry.of_parser/d" -e "/Grammar.Entry.gcreate/d" | cat comp_head.ml - $D_fast.ml comp_trail.ml > pa_$D_fast.ml
$D_fast.ml: compile.cmo $(SRC)
OTOP=$(OTOP) EXE=$(EXE) ./compile.sh $(COMP_OPT) $(SRC) > $D_fast.ml
diff --git a/camlp4/compile/comp_head.ml b/camlp4/compile/comp_head.ml
index c9a75dae6..5efa06407 100644
--- a/camlp4/compile/comp_head.ml
+++ b/camlp4/compile/comp_head.ml
@@ -62,7 +62,7 @@ let _ = do { Printf.eprintf "recovered or_zero at loc (%d, %d)\n" loc1 loc2; flu
(if prev_symb = "" then "" else " after " ^ prev_symb) ^
" (in [" ^ entry ^ "])"
;
- value lexer = Plexer.make ();
+ value lexer = Plexer.gmake ();
end
;
diff --git a/camlp4/compile/compile.ml b/camlp4/compile/compile.ml
index bb8ae8d36..4fcb3ce7e 100644
--- a/camlp4/compile/compile.ml
+++ b/camlp4/compile/compile.ml
@@ -21,7 +21,7 @@ value rec name_of_symbol entry =
[ Snterm e -> "[" ^ e.ename ^ "]"
| Snterml e l -> "[" ^ e.ename ^ " level " ^ l ^ "]"
| Sself | Snext -> "[" ^ entry.ename ^ "]"
- | Stoken tok -> entry.egram.glexer.Token.text tok
+ | Stoken tok -> entry.egram.glexer.Token.tok_text tok
| _ -> "???" ]
;
@@ -363,11 +363,6 @@ value rec continue_parser_of_levels entry clevn levs =
let pel = continue_parser_of_levels entry (succ clevn) levs in
match lev.lsuffix with
[ DeadEnd ->
-(*
- let ncont = entry.ename ^ "_" ^ string_of_int clevn ^ "_cont" in
- let e = <:expr< fun bp a__ strm__ -> a__ >> in
- let pel = if levs = [] then [] else pel in
-*)
[None :: pel]
| tree ->
let alevn =
@@ -515,18 +510,6 @@ value all_entries_in_graph list entry =
value entries = ref [];
-(*
- [Grammar.Entry.obj Pcaml.interf;
- Grammar.Entry.obj Pcaml.implem;
- Grammar.Entry.obj Pcaml.top_phrase;
- Grammar.Entry.obj Pcaml.use_file;
- Grammar.Entry.obj Pcaml.str_item;
- Grammar.Entry.obj Pcaml.sig_item;
- Grammar.Entry.obj Pcaml.ctyp;
- Grammar.Entry.obj Pcaml.expr;
- Grammar.Entry.obj Pcaml.patt]
-*)
-
value rec list_mem_right_assoc x =
fun
[ [] -> False
@@ -561,7 +544,7 @@ value compile () =
let si2 =
let list = List.sort compare keywords.val in
<:str_item<
- List.iter (fun kw -> P.lexer.Token.using ("", kw))
+ List.iter (fun kw -> P.lexer.Token.tok_using ("", kw))
$expr_list list$
>>
in