Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Map + Set
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] Camlp4 help/questions
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