caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* yacc style
@ 2005-01-27 20:17 Chris King
  2005-01-27 21:39 ` [Caml-list] " Erik de Castro Lopo
       [not found] ` <200501272252.43720.jon@jdh30.plus.com>
  0 siblings, 2 replies; 7+ messages in thread
From: Chris King @ 2005-01-27 20:17 UTC (permalink / raw)
  To: O'Caml Mailing List

I'm defining a grammar which, when parsed, returns an imperative
structure (i.e. one which can't easily be created in a functional
style).  ocamlyacc is making this difficult for me, since there's no
clean way to pass to the main parser function a structure on which to
operate.  Right now I'm getting around this by defining global
references in the header of the parser and setting them before each
call to the parser main function.  Is it considered better style to
instead have the parser return a parse tree, and then use that to
generate the imperative structure, or is there a more direct way to do
what I want to do?

Thanks!


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

end of thread, other threads:[~2005-01-28  9:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-27 20:17 yacc style Chris King
2005-01-27 21:39 ` [Caml-list] " Erik de Castro Lopo
2005-01-28  1:14   ` skaller
2005-01-28  2:28     ` Erik de Castro Lopo
2005-01-28  4:30       ` skaller
2005-01-28  9:04       ` Jean-Christophe Filliatre
     [not found] ` <200501272252.43720.jon@jdh30.plus.com>
2005-01-28  0:41   ` Chris King

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