Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] otags problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Chris Hecker <checker@d...>
Subject: [Caml-list] LL, LR, and camlp4 (was Re: syntax change)

> Could you reformulate your question? I don't understand. What is an
>*RD* parser?

Sorry, I'm the farthest thing from a compiler expert, so bear with me.

You said that you liked LL because it was easier and simpler to parse.  You mentioned that you used a recursive descent (RD) parser in camlp4 for the revised syntax (since it's LL) and for the ocaml syntax (but were only able to parse it with recursive descent with hacks because it's LR, I think).  I assume that meant you used a hand-written parser, not a parser generated by a tool.

My question is just why did you hand-write the parser, rather than using a tool like yacc?  Was it because of the extensibility and hooks you needed in camlp4 and there's no way to make an extensible generated parser?  Are parser generators not all they're cracked up to be?  If so, why does caml use yacc?

Make sense now?

I don't really know how camlp4 works internally, nor do I really know much about LL, LR, yacc, recursive descent, etc.  Just enough to be dangerous (where dangerous is defined as asking unintelligible questions :).

Thanks,
Chris


-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr