From: "lehalle@miriad" <charles.lehalle@miriadtech.com>
To: caml-list@inria.fr
Subject: [Caml-list] ocamllex parametrized parse regexp
Date: Mon, 06 Sep 2004 18:08:26 +0200 [thread overview]
Message-ID: <opsdwxscak1j4mhy@tahiti2.miriad.fr> (raw)
In-Reply-To: <20040906155041.GG7964@alan-schm1p>
Hi,
I try to use ocamllex like this (I want to have one of the parsing regexp
to be read from an external file) :
{
open Printf;;
}
let digit = ['0'-'9']
let mark = ...read in a file...
rule oaddress outcan = parse
| mark as bemark
{
printf "MARK(%s)" bemark;
oaddress outcan lexbuf
}
| _ as d
{ printf "Unk[%c]\n" d;
oaddress outcan lexbuf
}
| eof
{
fprintf outcan "END";
}
Is it possible or useless to try somethink like that ?
--
Charles-Albert Lehalle --- MIRIAD Technologies
Responsable Développements Algorithmiques et Applications
mailto:charles.lehalle@miriadtech.com
keyserver: http://pgp.mit.edu/
tel : 0156431816 - fax: 0156431828
8 av Hoche - 75008 PARIS - FRANCE
-------------------
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
next prev parent reply other threads:[~2004-09-06 16:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-06 15:50 [Caml-list] mod_caml makes Apache segfault Alan Schmitt
2004-09-06 16:02 ` Benjamin Geer
2004-09-06 16:03 ` Richard Jones
2004-09-07 6:50 ` Alan Schmitt
2004-09-07 8:34 ` Richard Jones
2004-11-09 18:02 ` Paul Argentoff
2004-11-10 3:52 ` N. Owen Gunden
2004-11-10 9:35 ` Richard Jones
2004-11-10 15:27 ` Paul Argentoff
2004-11-10 15:25 ` Paul Argentoff
2004-09-06 16:08 ` lehalle@miriad [this message]
2004-09-06 17:34 ` [Caml-list] ocamllex parametrized parse regexp Luc Maranget
2004-09-06 17:49 ` skaller
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=opsdwxscak1j4mhy@tahiti2.miriad.fr \
--to=charles.lehalle@miriadtech.com \
--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