Browse thread
[Caml-list] Parsing windows EOL
- Matt Boyd
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Matt Boyd <mattwb78756@y...> |
| Subject: | [Caml-list] Parsing windows EOL |
rule volume = parse
| ("\r\n"|"\n") { NEWLINE }
| _*[^'\r']*[^'\r''\n'] { LINE (Lexing.lexeme
lexbuf) }
This almost does what I want, but, ideally, it should
accept something like
"\r\r\n"
and return
LINE("\r") NEWLINE
but this is the one pattern that my lexer won't
accept.
How would I create a lexer which will accept any input
on a line and terminate with either a "\r\n" or a
"\n"?
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners