summaryrefslogtreecommitdiff
path: root/camlp4/lib
diff options
context:
space:
mode:
authorMichel Mauny <Michel.Mauny@ensta.fr>2004-11-17 09:07:56 +0000
committerMichel Mauny <Michel.Mauny@ensta.fr>2004-11-17 09:07:56 +0000
commit22c16bdda1f86b4fd431b81b6384f07fe1a82d4a (patch)
treea42de5a71f08f3c0378ba0b6a4254d2def7b7827 /camlp4/lib
parentad6b860a9f82fbd4729345ca7933a8157b757fe0 (diff)
downloadocaml-22c16bdda1f86b4fd431b81b6384f07fe1a82d4a.tar.gz
Global renaming of "loc" into "_loc" and get rid of some unused variables
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6682 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'camlp4/lib')
-rw-r--r--camlp4/lib/Makefile2
-rw-r--r--camlp4/lib/grammar.ml2
-rw-r--r--camlp4/lib/plexer.ml10
-rw-r--r--camlp4/lib/stdpp.ml2
4 files changed, 8 insertions, 8 deletions
diff --git a/camlp4/lib/Makefile b/camlp4/lib/Makefile
index df803cf9e5..ffac6c9d51 100644
--- a/camlp4/lib/Makefile
+++ b/camlp4/lib/Makefile
@@ -3,7 +3,7 @@
include ../config/Makefile
INCLUDES=
-OCAMLCFLAGS=-warn-error A $(INCLUDES)
+OCAMLCFLAGS=-warn-error Ay -w Y $(INCLUDES)
OBJS=stdpp.cmo token.cmo plexer.cmo gramext.cmo grammar.cmo extfold.cmo extfun.cmo fstream.cmo
SHELL=/bin/sh
TARGET=gramlib.cma
diff --git a/camlp4/lib/grammar.ml b/camlp4/lib/grammar.ml
index f6d40bd9ef..bd2ddd7910 100644
--- a/camlp4/lib/grammar.ml
+++ b/camlp4/lib/grammar.ml
@@ -224,7 +224,7 @@ value rec name_of_symbol entry =
value rec get_token_list entry tokl last_tok tree =
match tree with
- [ Node {node = (Stoken tok as s); son = son; brother = DeadEnd} ->
+ [ Node {node = Stoken tok; son = son; brother = DeadEnd} ->
get_token_list entry [last_tok :: tokl] tok son
| _ ->
if tokl = [] then None
diff --git a/camlp4/lib/plexer.ml b/camlp4/lib/plexer.ml
index 81994ddd85..d677a0e50d 100644
--- a/camlp4/lib/plexer.ml
+++ b/camlp4/lib/plexer.ml
@@ -236,7 +236,7 @@ value next_token_fun dfa ssd find_kwd fname lnum bolpos glexr =
[ [: `('a'..'z' as c); len = ident (store 0 c); s :] ep ->
let id = get_buff len in
match s with parser
- [ [: `':' :] eb -> error_if_keyword (("LABEL", id), (bp, ep))
+ [ [: `':' :] ep -> error_if_keyword (("LABEL", id), (bp, ep))
| [: :] -> error_if_keyword (("TILDEIDENT", id), (bp, ep)) ]
| [: s :] ->
let id = get_buff (ident2 (store 0 c) s) in
@@ -249,7 +249,7 @@ value next_token_fun dfa ssd find_kwd fname lnum bolpos glexr =
[ [: `('a'..'z' as c); len = ident (store 0 c); s :] ep ->
let id = get_buff len in
match s with parser
- [ [: `':' :] eb -> error_if_keyword (("OPTLABEL", id), (bp,ep))
+ [ [: `':' :] ep -> error_if_keyword (("OPTLABEL", id), (bp,ep))
| [: :] -> error_if_keyword (("QUESTIONIDENT", id), (bp, ep)) ]
| [: s :] ->
let id = get_buff (ident2 (store 0 c) s) in
@@ -316,7 +316,7 @@ value next_token_fun dfa ssd find_kwd fname lnum bolpos glexr =
and string bp len =
parser
[ [: `'"' :] -> len
- | [: `'\\'; `c; s :] ep -> string bp (store (store len '\\') c) s
+ | [: `'\\'; `c; s :] -> string bp (store (store len '\\') c) s
| [: `'\010'; s :] ep -> do { bolpos.val := ep; incr lnum; string bp (store len '\010') s }
| [: `'\013'; s :] ep ->
let (len, ep) =
@@ -493,7 +493,7 @@ value next_token_fun dfa ssd find_kwd fname lnum bolpos glexr =
| _ -> False ]
and any_to_nl =
parser
- [ [: `'\010'; s :] ep ->
+ [ [: `'\010'; _s :] ep ->
do { bolpos.val := ep; incr lnum }
| [: `'\013'; s :] ep ->
let ep =
@@ -582,7 +582,7 @@ and check =
_ =
parser
[ [: `']' | ':' | '=' | '>' :] -> ()
- | [: :] -> () ] :] ep ->
+ | [: :] -> () ] :] ->
()
| [: `'>' | '|';
_ =
diff --git a/camlp4/lib/stdpp.ml b/camlp4/lib/stdpp.ml
index 665dac1f30..1a5f078a52 100644
--- a/camlp4/lib/stdpp.ml
+++ b/camlp4/lib/stdpp.ml
@@ -85,4 +85,4 @@ value line_of_loc fname (bp, ep) =
;
*)
-value loc_name = ref "loc";
+value loc_name = ref "_loc";