Permalink
Browse files

Start

  • Loading branch information...
0 parents commit 4d329e30a5e23476eeb8ce2fe202b0e9eccf31df @bobtfish committed Oct 29, 2011
Showing with 66 additions and 0 deletions.
  1. +5 −0 .gitignore
  2. +10 −0 Makefile.PL
  3. +11 −0 lib/Pegex/Puppet.pm
  4. +8 −0 lib/Pegex/Puppet/Grammar.pm
  5. +11 −0 share/puppet.pgx
  6. +21 −0 t/basic.t
@@ -0,0 +1,5 @@
+META.yml
+MYMETA.*
+Makefile
+inc/
+*.swp
@@ -0,0 +1,10 @@
+use inc::Module::Install 1.00;
+use strict;
+use warnings;
+
+all_from 'lib/Pegex/Puppet.pm';
+
+requires 'boolean';
+requires 'Pegex' => '0.18';
+WriteAll;
+
@@ -0,0 +1,11 @@
+package Pegex::Puppet;
+
+use 5.010;
+
+use Pegex 0.18 ();
+use boolean 0.28 ();
+use Pegex::Mo;
+extends 'Pegex::Module';
+
+1;
+
@@ -0,0 +1,8 @@
+package Pegex::Puppet::Grammar;
+use Mo;
+extends 'Pegex::Grammar';
+
+use constant text => 'share/puppet.pgx';
+
+1;
+
@@ -0,0 +1,11 @@
+pp_file: <list_of_resources>
+
+list_of_resources: <resource>+
+
+resource:
+ <resource_name>
+ /~<LCURLY>~/
+ /<RCURLY>/
+
+resource_name: /\w+/
+
@@ -0,0 +1,21 @@
+use strict;
+use warnings;
+use Test::More 0.88;
+
+use Pegex::Puppet;
+
+my $data = Pegex::Puppet->parse(q{file {
+}});
+# file { } });
+#
+# "/tmp/foo":
+# ensure => exists,
+# content => "bar";
+# }
+#});
+ok $data;
+use Data::Dumper;
+warn Dumper($data);
+
+done_testing;
+

0 comments on commit 4d329e3

Please sign in to comment.