caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* camlp4 grammar and LIST1
@ 2009-03-10 18:41 Joel Reymont
  2009-03-10 21:48 ` [Caml-list] " Jake Donham
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Reymont @ 2009-03-10 18:41 UTC (permalink / raw)
  To: O'Caml Mailing List

In the following bit of camlp4 grammar

   inputDeclarations:
   [
     [ "Input"; ":";
       l = LIST1 inputDeclaration SEP "," -> l
     ]
   ];

Is it always necessary to write [ x = inputDeclaration -> x ] instead  
of just inputDeclaration?

I'm trying to debug the type of each rule and I'm often getting  
complaints about 'unit list' being used instead of just 'statement'.

By the same token, can I shorten the gramar below to just  
[ openStatement | closedStatement ]?

   statement: [ [ s = openStatement -> s | s = closedStatement -> s ] ];

How do you folks debug grammar rule types?

	Thanks, Joel

---
http://tinyco.de
--- Mac & iPhone






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

end of thread, other threads:[~2009-03-10 23:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-10 18:41 camlp4 grammar and LIST1 Joel Reymont
2009-03-10 21:48 ` [Caml-list] " Jake Donham
2009-03-10 22:07   ` Joel Reymont
2009-03-10 23:01     ` Jake Donham
2009-03-10 23:36       ` Joel Reymont

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