summaryrefslogtreecommitdiffstats
path: root/camlp4
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2003-03-31 16:38:43 +0000
committerDamien Doligez <damien.doligez-inria.fr>2003-03-31 16:38:43 +0000
commita09530145b64ee697f12cf8f026a638f7a9cb5bf (patch)
tree7813e46de8ba0a8f98a24f69075bdff4830a2c48 /camlp4
parent0ac0d9ac3bef9cd9e3e0c41efc85ece70216f11e (diff)
PR#1610 (suite)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5471 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'camlp4')
-rw-r--r--camlp4/lib/plexer.ml4
-rw-r--r--camlp4/ocaml_src/lib/plexer.ml4
2 files changed, 4 insertions, 4 deletions
diff --git a/camlp4/lib/plexer.ml b/camlp4/lib/plexer.ml
index e12c20084..236d56551 100644
--- a/camlp4/lib/plexer.ml
+++ b/camlp4/lib/plexer.ml
@@ -145,8 +145,8 @@ value next_token_fun dfa find_kwd =
let loc = (bp, Stream.count s) in
(tok, loc)
| [: `'''; s :] ->
- match Stream.npeek 2 s with
- [ [_; '''] | ['\\'; _] ->
+ match Stream.npeek 3 s with
+ [ [_; '''; _] | ['\\'; _; _] | ['\x0D'; '\x0A'; '''] ->
let tok = ("CHAR", get_buff (char bp 0 s)) in
let loc = (bp, Stream.count s) in
(tok, loc)
diff --git a/camlp4/ocaml_src/lib/plexer.ml b/camlp4/ocaml_src/lib/plexer.ml
index 7186c29af..718e17b4f 100644
--- a/camlp4/ocaml_src/lib/plexer.ml
+++ b/camlp4/ocaml_src/lib/plexer.ml
@@ -174,8 +174,8 @@ let next_token_fun dfa find_kwd =
| Some '\'' ->
Stream.junk strm__;
let s = strm__ in
- begin match Stream.npeek 2 s with
- [_; '\''] | ['\\'; _] ->
+ begin match Stream.npeek 3 s with
+ [_; '\''; _] | ['\\'; _; _] | ['\x0D'; '\x0A'; '\''] ->
let tok = "CHAR", get_buff (char bp 0 s) in
let loc = bp, Stream.count s in tok, loc
| _ -> keyword_or_error (bp, Stream.count s) "'"