On Fri, 2012-09-21 at 07:37 -0700, llowder wrote: > Are there any documents available that discuss how to use the puppet > parser from code, such as to make use of it in other projects? > > I looked around the puppet site, but did not find anything, though it > is possible I just used the wrong search terms. > > I'm getting ready to start developing some tools to help make > creating/maintaining tests easier, and I'd like to use the actual > puppet parser rather than try to roll my own.
You can look to lib/puppet/util/rdoc/parser.rb in the puppet codebase. This is what implements "puppet doc". This parses a set of manifests and introspect the returned AST to build rdoc data structure to produce documentation. The specific is that it is designed to parse independently all the manifests, instead of globally like puppet does usually. -- Brice Figureau Follow the latest Puppet Community evolutions on www.planetpuppet.org! -- 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.
