From: Brian Hurt <bhurt@spnz.org>
To: Josh Smith <josh@trdlnk.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Camlp4 help/questions
Date: Tue, 27 Jul 2004 17:11:32 -0500 (CDT) [thread overview]
Message-ID: <Pine.LNX.4.44.0407271705300.6739-100000@localhost.localdomain> (raw)
In-Reply-To: <20040727214504.GA7950@trdlnk.com>
On Tue, 27 Jul 2004, Josh Smith wrote:
> I apologize if this is not the right list to send this too, but I'm
> nearing my feeble wits' end and I'm starting here...
I don't think Camlp4 is the right tool. It's mainly an Ocaml
preprocessor, you want Ocaml code that parses the line.
Ocamllex/Ocamlyacc are great for a lot of things- but I think I agree,
they're also the wrong tools for the job.
I think what you want is a split function- a function that takes a string
and splits it up at certan characters. It'd have a type something like:
val split: char -> string -> string list
You'd then read an entire line, split it apart on '|'. You could then
split various substrings on ';' to get the integers, etc.
Hope this helps.
--
"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
- Gene Spafford
Brian
-------------------
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-07-27 22:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-25 8:17 [Caml-list] Map + Set Martin Jambon
2004-07-25 16:26 ` Matt Gushee
2004-07-25 17:01 ` Brian Hurt
2004-07-26 10:40 ` Matthieu Sozeau
2004-07-26 15:25 ` Brian Hurt
2004-07-26 15:47 ` Martin Jambon
2004-07-26 16:26 ` Brian Hurt
2004-07-26 7:43 ` Diego Olivier Fernandez Pons
2004-07-26 16:24 ` Martin Jambon
2004-07-26 16:52 ` Diego Olivier Fernandez Pons
2004-07-27 21:45 ` [Caml-list] Camlp4 help/questions Josh Smith
2004-07-27 22:11 ` Brian Hurt [this message]
2004-07-28 1:15 ` Josh Smith
[not found] ` <200407272307.50167.jon@jdh30.plus.com>
2004-07-28 1:38 ` Josh Smith
2004-07-28 8:03 ` Pierre Weis
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=Pine.LNX.4.44.0407271705300.6739-100000@localhost.localdomain \
--to=bhurt@spnz.org \
--cc=caml-list@inria.fr \
--cc=josh@trdlnk.com \
/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