From: Hendrik Tews <tews@irritatie.cs.kun.nl>
To: caml-list@inria.fr
Subject: Re: Looking for a nail
Date: Thu, 28 Jan 1999 21:10:13 +0100 [thread overview]
Message-ID: <199901282010.VAA01245@irritatie.cs.kun.nl> (raw)
In-Reply-To: <199901261920.LAA23249@kronstadt.transbay.net>
Hi,
From: Ian T Zimmerman <itz@transbay.net>
Date: Tue, 26 Jan 1999 11:20:47 -0800
Subject: Re: Looking for a nail
[concerning an oo interface to ocamllex]
No. Sorry, but I don't want to be forced to use classes. I want to
Hold on! This was only a suggestion to somebody looking for a
nail! I agree that the possibility of choosing between (or even
mixing) the functional and the oo paradigm is one of the great
advantages of ocaml. Therefore there should always be a
functional version of the standard libray. But, by the same
argument it would be nice, to have an oo version.
> - adding start conditions a la flex to ocamllex
I haven't thought of this really hard, but I bet there is already a
way to do that. If there isn't, I would think hard again to find a
cleaner, more functional (less stateful) way to do it. If the current
condition is kept in a global as in flex, that just drops again the
reentrancy that Christian has been working so hard to achieve.
Yes, indeed, you can do the following:
{
type lexer_state_type = A | B
let lexer_state = ref A
}
rule token = parse
"" { match !lexer_state with
A -> atoken lexbuf
| B -> btoken lexbuf
}
and atoken = parse ...
But it would be nice to have an intuitive syntax for that.
Bye,
Hendrik
next prev parent reply other threads:[~1999-01-29 8:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-25 20:53 Hendrik Tews
1999-01-26 19:20 ` Ian T Zimmerman
1999-01-28 1:30 ` John Prevost
1999-01-28 20:10 ` Hendrik Tews [this message]
1999-01-27 1:29 ` Jacques GARRIGUE
1999-01-27 8:27 ` Jean-Christophe Filliatre
1999-01-28 9:34 ` Cuihtlauac ALVARADO
-- strict thread matches above, loose matches on Subject: below --
1999-01-29 0:45 Frank A. Christoph
1999-01-28 13:32 Don Syme
1999-01-29 0:25 ` Markus Mottl
1999-01-31 18:43 ` John Whitley
1999-01-24 21:06 Miles Egan
1999-01-24 23:01 ` Lyn A Headley
1999-01-25 8:44 ` Jean-Christophe Filliatre
1999-01-25 20:45 ` Markus Mottl
1999-01-25 13:36 ` mattwb
1999-01-25 20:48 ` Trevor Jim
1999-01-25 21:57 ` Gerd Stolpmann
1999-01-25 12:45 ` Michel Schinz
1999-01-25 20:37 ` Markus Mottl
1999-01-28 9:54 ` Michel Schinz
1999-01-28 14:13 ` Markus Mottl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199901282010.VAA01245@irritatie.cs.kun.nl \
--to=tews@irritatie.cs.kun.nl \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox