summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1996-05-24 15:17:21 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1996-05-24 15:17:21 +0000
commitdc2b931d52466780368caa140c4890dc83e60d82 (patch)
tree02562ed44e3f2676b0fdabf74e4b37de8bc1427b
parentdc6ebc037f00060a629ec44398a4a9024541f81d (diff)
Traitement des caracteres litteraux dans les actions
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@839 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--lex/lexer.mll6
1 files changed, 4 insertions, 2 deletions
diff --git a/lex/lexer.mll b/lex/lexer.mll
index 11779cc75..1eb89c718 100644
--- a/lex/lexer.mll
+++ b/lex/lexer.mll
@@ -119,9 +119,11 @@ and action = parse
string lexbuf;
reset_string_buffer();
action lexbuf }
- | "'{'"
+ | "'" [^ '\\'] "'"
+ { action lexbuf }
+ | "'" '\\' ['\\' '\'' 'n' 't' 'b' 'r'] "'"
{ action lexbuf }
- | "'}'"
+ | "'" '\\' ['0'-'9'] ['0'-'9'] ['0'-'9'] "'"
{ action lexbuf }
| "(*"
{ comment_depth := 1;