caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Testimonial: a tribute to Ocaml
@ 2005-12-07  0:41 skaller
  0 siblings, 0 replies; only message in thread
From: skaller @ 2005-12-07  0:41 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-07  0:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-07  0:41 Testimonial: a tribute to Ocaml 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).