caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] RealWorld-Examples for OcamlLex/OcamlYacc?
@ 2003-10-05 20:15 Oliver Bandel
  2003-10-05 22:07 ` Remi Vanicat
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Oliver Bandel @ 2003-10-05 20:15 UTC (permalink / raw)
  To: caml-list

Hello Hackers,

after pausing with OCaml and programming at all,
coming back to an interesting problem to solve,
I tried to solve it in C, with flex and yacc.

Even if find C nice, it was annoying how much
code to write... so it seems to be true, that
OCaml is a drug.

Back to it now, I ask the other addicts here for
real-world programs, that use ocamllex and ocamlyacc
and if available, a good tutorial.

The example in the Refman seems a littlebid confusing to me:
There is a function Parser.main called, but in the Refman there only
is a module Parsing, not a module Parser described.

And in the ocmallex/Ocamlyacc-chapter I didn't find something about
a call to Parser.main.

Or maybe I'm short-time blind, evry time, when I look into that manual?


Any help and hint is welcome... please help this OCaml-addict
programmer who I am now.


TIA,
   Oliver

-------------------
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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] RealWorld-Examples for OcamlLex/OcamlYacc?
  2003-10-05 20:15 [Caml-list] RealWorld-Examples for OcamlLex/OcamlYacc? Oliver Bandel
@ 2003-10-05 22:07 ` Remi Vanicat
  2003-10-05 22:33 ` Benjamin Geer
  2003-10-06  3:56 ` skaller
  2 siblings, 0 replies; 4+ messages in thread
From: Remi Vanicat @ 2003-10-05 22:07 UTC (permalink / raw)
  To: caml-list

oliver@first.in-berlin.de (Oliver Bandel) writes:

> Hello Hackers,
>

[...]

> The example in the Refman seems a littlebid confusing to me:
> There is a function Parser.main called, but in the Refman there only
> is a module Parsing, not a module Parser described.
>
> And in the ocmallex/Ocamlyacc-chapter I didn't find something about
> a call to Parser.main.
>

May I remind you that each ocaml source file is a module, so if you
have a parser.mly it will produce a parser.ml, and so a Parser module?  

Then in the given example, the main rules is named "main", so the
Parser.main must be the call to the main rule of the parser your are
definning... 

[...]

-- 
Rémi Vanicat
remi.vanicat@laposte.net

-------------------
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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] RealWorld-Examples for OcamlLex/OcamlYacc?
  2003-10-05 20:15 [Caml-list] RealWorld-Examples for OcamlLex/OcamlYacc? Oliver Bandel
  2003-10-05 22:07 ` Remi Vanicat
@ 2003-10-05 22:33 ` Benjamin Geer
  2003-10-06  3:56 ` skaller
  2 siblings, 0 replies; 4+ messages in thread
From: Benjamin Geer @ 2003-10-05 22:33 UTC (permalink / raw)
  To: Oliver Bandel; +Cc: caml-list

Oliver Bandel wrote:
> I ask the other addicts here for
> real-world programs, that use ocamllex and ocamlyacc
> and if available, a good tutorial.

The OCaml compiler itself is a very good example.  Have a look at 
parsing/lexer.mll and parsing/parser.mly in the OCaml source 
distribution.  I learnt a lot from them.

Ben

-------------------
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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] RealWorld-Examples for OcamlLex/OcamlYacc?
  2003-10-05 20:15 [Caml-list] RealWorld-Examples for OcamlLex/OcamlYacc? Oliver Bandel
  2003-10-05 22:07 ` Remi Vanicat
  2003-10-05 22:33 ` Benjamin Geer
@ 2003-10-06  3:56 ` skaller
  2 siblings, 0 replies; 4+ messages in thread
From: skaller @ 2003-10-06  3:56 UTC (permalink / raw)
  To: Oliver Bandel; +Cc: caml-list

On Mon, 2003-10-06 at 06:15, Oliver Bandel wrote:
> Hello Hackers,

> Back to it now, I ask the other addicts here for
> real-world programs, that use ocamllex and ocamlyacc
> and if available, a good tutorial.

http://felix.sourceforge.net



-------------------
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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-06  3:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-05 20:15 [Caml-list] RealWorld-Examples for OcamlLex/OcamlYacc? Oliver Bandel
2003-10-05 22:07 ` Remi Vanicat
2003-10-05 22:33 ` Benjamin Geer
2003-10-06  3:56 ` skaller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).