Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2004-07-27 (22:03)
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 

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: