caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Paul Snively <psnively@mac.com>
To: Erik de Castro Lopo <ocaml-erikd@mega-nerd.com>
Cc: effbiae@ivorykite.com, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Re: some comments on ocaml{lex,yacc} from a novice's POV
Date: Mon, 4 Apr 2005 10:39:22 -0700	[thread overview]
Message-ID: <6ed7a87a9c29d26e2bc742181b787e49@mac.com> (raw)
In-Reply-To: <20050404154408.16534457.ocaml-erikd@mega-nerd.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Apr 3, 2005, at 10:44 PM, Erik de Castro Lopo wrote:

> On Mon, 4 Apr 2005 13:42:03 +1000 (EST)
> "Jack Andrews" <effbiae@ivorykite.com> wrote:
>
>> here's the usual calc example that generates a parser:
>>
>>  (define expr-parser
>>   (lalr-parser
>>    ; Terminal symbols
>>    (ID + - * /)
>>    ; Productions
>>    (e (e + t)    : (+ $1 $3)
>>       (e - t)    : (- $1 $3)
>>       (t)        : $1)
>>    (t (t * f)    : (* $1 $3)
>>       (t / f)    : (/ $1 $3)
>>       (f)        : $1)
>>    (f (ID)       : $1)))
>>
>> isn't that nice?!?
>
> Yes.
>
>> compare with caml solutions? compare with any other solution?
>
> There are parsers for Haskell which would compare very favourably
> with your lisp parser. I haven't used them myself but I've seen
> example code somewhere.
>
ONAE's cf's parser combinators, perhaps, if the point is to have an 
"in-native-code" solution. See also the Spirit parser generator 
framework in the Boost libraries for C++, at <http://www.boost.org> or 
<http://spirit.sourceforge.net>.

>> i'm told there are good scheme compilers.
>
> Since scheme is a dynamically typed language, scheme compilers are
> unlikely to ever produce code as fast as a compiler for a statically
> typed langugae like ocaml.
>
It's hard, but by making the closed-world assumption and doing some 
careful type inference, it's possible to be competitive: see the 
Stalin, Bigloo, and Gambit compilers.

> Erik
> -- 
> +-----------------------------------------------------------+
>   Erik de Castro Lopo  nospam@mega-nerd.com (Yes it's valid)
> +-----------------------------------------------------------+
> " ... new TV ad for Microsoft's Internet Explorer e-mail program which
> uses the musical theme of the "Confutatis Maledictis" from Mozart's
> Requiem. "Where do you want to go today?" is the cheery line on the
> screen, while the chorus sings "Confutatis maledictis, flammis acribus
> addictis,". This translates to "The damned and accursed are convicted
> to the flames of hell."
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
Best regards,
Paul

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)

iEYEARECAAYFAkJRe9gACgkQO3fYpochAqKNyQCg8wks+wUbD9phOo2/7p9s+uDc
u+sAn1bc3LOKJJyVDMrIsKqtiIFOFrv8
=KmnK
-----END PGP SIGNATURE-----


  parent reply	other threads:[~2005-04-04 17:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-01 11:32 bug in "developing applications with objective caml" (english translation) Jack Andrews
2005-04-01 20:03 ` [Caml-list] " Ken Rose
2005-04-02  5:10   ` some comments on ocaml{lex,yacc} from a novice's POV Jack Andrews
2005-04-02  7:02     ` [Caml-list] " Erik de Castro Lopo
2005-04-02  7:38     ` Jacques Garrigue
2005-04-03 16:18       ` Parser combinators [was: some comments on ocaml{lex,yacc} from a novice's POV] Alex Baretta
2005-04-04  0:40         ` [Caml-list] Parser combinators Jacques Garrigue
2005-04-05 16:06       ` [Caml-list] some comments on ocaml{lex,yacc} from a novice's POV Oliver Bandel
     [not found]   ` <50130.202.164.198.46.1112418605.squirrel@www.ivorykite.com>
2005-04-04  3:42     ` Jack Andrews
2005-04-04  5:44       ` [Caml-list] " Erik de Castro Lopo
2005-04-04  9:51         ` Jon Harrop
2005-04-05 12:00           ` Geoff Wozniak
2005-04-05 13:49             ` Jon Harrop
2005-04-05 14:26               ` Richard Jones
2005-04-05 16:13                 ` Oliver Bandel
2005-04-06  4:52               ` Geoff Wozniak
2005-04-06  5:12                 ` Kenneth Knowles
2005-04-06  6:15                 ` some comments on ocaml{lex,yacc} from anovice's POV Jack Andrews
2005-04-04 10:29         ` [Caml-list] Re: some comments on ocaml{lex,yacc} from a novice's POV Daan Leijen
2005-04-04 17:39         ` Paul Snively [this message]
2005-04-04 18:16           ` skaller
2005-04-04 18:49             ` Paul Snively

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=6ed7a87a9c29d26e2bc742181b787e49@mac.com \
    --to=psnively@mac.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=effbiae@ivorykite.com \
    --cc=ocaml-erikd@mega-nerd.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;
as well as URLs for NNTP newsgroup(s).