Group
Extension

Padre-Plugin-Perl6/share/templates/p6_grammar.p6

use v6;

=begin Pod
	An example of a Perl 6 grammar for 
	a Properties string can have key1=value1;key2=value2;...
=end Pod
grammar Properties {
	rule key { 
		(\w+)
	}
	rule value { 
		(\w+)
	}
	rule entry {
		<key> '=' <value> (';')?
	}
}

my $text = "foo=bar;me=self;";
if $text ~~ /^<Properties::entry>+$/ {
	"Matched".say;
} else {
	"Not Matched".say;
}

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.