caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Parsing windows EOL
@ 2002-09-26 19:13 Matt Boyd
  0 siblings, 0 replies; only message in thread
From: Matt Boyd @ 2002-09-26 19:13 UTC (permalink / raw)
  To: caml-list


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-27 14:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-26 19:13 [Caml-list] Parsing windows EOL Matt Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).