Browse thread
[Caml-list] ocamllex, regular expression syntax
[
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: | David Brown <caml-list@d...> |
| Subject: | Re: [Caml-list] ocamllex, regular expression syntax |
On Thu, May 22, 2003 at 10:56:33PM +0200, Stefan Heimann wrote:
> "[^"\\]*(\\.[^"\\]*)*"
>
> are not easy to read, but with the ocamllex syntax it is even more
> difficult:
>
> '"'[^'"''\\']*('\\'_[^'"''\\']*)*'"'
But don't you find:
'"' [^ '"' '\\' ]* ( '\\' _ [^ '"' '\\']* )*
easier to read. I certainly do.
Perl even has a mode where whitespace can be inserted into regexps to
make them more readable.
Dave
-------------------
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