On Oct 25, 2008, at 8:48 AM, Brice Figureau wrote:
> I choose to push the comments on the stack on each LBRACE and pop on
> each RBRACE. I also fetch a reset the current stack level on each
> statement reduction. This way I can attach comment precisely to the
> puppet statement they belong to.

Seems reasonable.  I did something similar when I had some code that  
needed to know whether it was in a define or not, and I think it's a  
pretty common pattern.  It's clumsy, but then, LALR parses always are,  
it seems.

-- 
You can't build a reputation on what you are going to do.
     -- Henry Ford
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to