Permalink
Browse files

[grammar] update to new % regex separator syntax

  • Loading branch information...
moritz committed May 19, 2012
1 parent 36caba6 commit bda5a7fd9c5e16cecdade7394045b491cec6848f
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/grammars.pod
View
@@ -13,9 +13,9 @@ introduced (see A<sec:multis>).
grammar JSON::Tiny::Grammar {
rule TOP { ^[ <object> | <array> ]$ }
rule object { '{' ~ '}' <pairlist> }
- rule pairlist { [ <pair> ** [ \, ] ]? }
+ rule pairlist { <pair>* % [ \, ] }
rule pair { <string> ':' <value> }
- rule array { '[' ~ ']' [ <value> ** [ \, ] ]? }
+ rule array { '[' ~ ']' [ <value>* % [ \, ] ] }
proto token value { <...> };
@@ -378,7 +378,7 @@ submatch and turns it into a hash by calling its C<hash> method.
=begin programlisting
- rule pairlist { [ <pair> ** [ \, ] ]? }
+ rule pairlist { <pair>* % [ \, ] }
method pairlist($/) { make $<pair>».ast; }
=end programlisting

0 comments on commit bda5a7f

Please sign in to comment.