-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 PERL Regex in BNF: http://www.cs.sfu.ca/~cameron/Teaching/384/99-3/regexp-plg.html
Seems worthwhile, but it might be easier just to fake it with a stub to a reference page. Trevor On 12/20/2010 06:38 PM, Luke Kanies wrote: > Hi Kenn, > > The BNF is definitely not complete - partially because I couldn't quite > figure out how complete I could even make it. Or rather, I didn't take the > time to do so. Can BNF include regexes? > > In general, it should perfectly mirror the current state of Puppet's parser > and lexer - that is, <type> should be defined as Puppet does, if at all > possible[1]. I'd like to have it fleshed out with all of the regexes, and > I'd much appreciate help in doing so. > > 1 - https://github.com/lak/puppet/blob/master/lib/puppet/parser/lexer.rb > > On Dec 20, 2010, at 2:28 PM, Kenn Hussey wrote: > >> After looking at the BNF in more detail, I have a couple of questions: >> >> 1. Do you plan to provide definitions (regular expressions?) for the >> <name>, <uc_name>, <naked_string>, and <quoted_string> elements? >> >> 2. Shouldn't the definition for <parameters> be recursive, e.g., >> <parameter> "," <parameters> instead of <parameter> "," <parameter>? >> And if so, is <optional_comma> really needed? >> >> 3. Any further thoughts on what a suitable regular expression for >> <type> might be? >> >> Thanks, >> >> Kenn >> >> >> On Dec 20, 1:52 pm, Kenn Hussey <[email protected]> wrote: >>> Luke, >>> >>> From the looks of things, this is quite relevant to the Puppet-related >>> work we're doing at Cloudsmith (see Henrik Lindberg's recent post to >>> the users group). We'd definitely like to help out, especially on the >>> Java front (most of our work is currently in Java). We've started >>> working with the BNF definition and will report back as soon as we >>> have something interesting to share. >>> >>> Cheers, >>> >>> Kenn >>> >>> On Dec 2, 1:18 am, Luke Kanies <[email protected]> wrote: >>> >>> >>> >>>> Hi all, >>> >>>> Some have already noticed this, but I've begun a project to define and >>>> produce a minimal data-focused subset of Puppet's language, just like JSON >>>> is a data-focused subset of Javascript. I had initially called it MPF >>>> (for Minimal Puppet Format), but we've decided to use our internal name >>>> for it - p(0), or pzero: >>> >>>> https://github.com/lak/pzero >>> >>>> The only thing there so far is Jordan Sissel's work getting a Ragel parser >>>> to work, along with my attempt at a BNF definition. My hope is to have >>>> implementations in many languages: >>> >>>> * Ruby >>>> * Python >>>> * C >>>> * Javascript >>>> * Java >>> >>>> And I'd like each of these to be able to both parse and generate the >>>> format. >>> >>>> Jesse Wolfe first came up with this idea, and our goal is to have a >>>> language that any project or tool can use to describe desired system >>>> state. I'm especially interested in having tools for converting to and >>>> from existing data formats, like the rpm and dpkg manifest formats. >>> >>>> So anyway, if this is interesting to you, I'd love help on it. We're >>>> still in the formative stages of what it is and what it would do, but >>>> we're pretty excited by the potential. One of the things we clearly need >>>> to develop is a list of example files that each implementation could test >>>> against. >>> >>>> -- >>>> Tradition is what you resort to when you don't have the time or the >>>> money to do it right. -- Kurt Herbert Alder >>>> --------------------------------------------------------------------- >>>> Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199 >> >> -- >> 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. >> > > - -- Trevor Vaughan Vice President, Onyx Point, Inc. email: [email protected] phone: 410-541-ONYX (6699) pgp: 0x6C701E94 - -- This account not approved for unencrypted sensitive information -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJNEUnlAAoJECNCGV1OLcypZwMH/2BLGdmIVr053N+8kRWZQphv VSJ4+G3TOefPUFVXCvRgXJjNVkfeCkEhHikynH7dJbf1K+/Ea0/Fa7u7xQwuFO9U OJUpNyO2qlDHJT3yURj2uN323WXEZUnbbd7KnupsrurE9DPEDfinIoGF+1Lgr/KJ sPxd//OU/p119jhRghTMtYQNgzaz3j1trDRR3ZFECkW502lHTbi8Dm4kPIl54acW XL+MT0YXSd89m8QStq9zJ3oSfGanMYT3I6GWJaEK30ix4GVCH0kGWxJVlPN6GJ7s jO104WTCnLBgVZ2+rx34tyLbReiU+2wgN6CgleUVfhLLbOgQwonszVnhRBCv5JQ= =30SQ -----END PGP SIGNATURE----- -- 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.
<<attachment: tvaughan.vcf>>
