From: skaller <skaller@users.sourceforge.net>
To: caml-list@yquem.inria.fr
Subject: Testimonial: a tribute to Ocaml
Date: Wed, 07 Dec 2005 11:41:55 +1100 [thread overview]
Message-ID: <1133916115.15333.9.camel@rosella> (raw)
In a previous posting, I said thanks to those people who
helped me integrate an RD parser with Ocamlyacc LALR1 parser.
Thanks again! It allowed me to use the existing LALR1 parser engine,
and allow dynamic extensions to the grammar like this:
--------------------------
#keyword whenever
#statement repeat statements whenever expr ;
repeat
f x; g k;
whenever 1>0;
--------------------------
This system was pretty lame, since it didn't allow recursion
or alternatives -- but it was proof-of-principle, and established
the mechanism for providing the linkage from the lexer to the parser.
I am VERY pleased that with almost no effort, I have now been
able to introduce both alternatives and arbitrary nonterminal
symbols, the latter supporting recursion:
-------------------------
#nonterminal idlist ident
#nonterminal idlist ident , idlist
#statement assign idlist = expr ;
assign a,b,c = (1,2,3);
-------------------------
This involved some refactoring.
However the point is .. after I got rid of the
syntax and type errors so it compiled ..
IT WORKED FIRST TIME. So a big thanks to the Ocaml
team and contributors for a fine product!
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
reply other threads:[~2005-12-07 0:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1133916115.15333.9.camel@rosella \
--to=skaller@users.sourceforge.net \
--cc=caml-list@yquem.inria.fr \
/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