Permalink
Browse files

Use a rule instead of a regex in PL/Perl6 grammar example, bacek++

  • Loading branch information...
1 parent a1bc962 commit 39e900fe9a2be52fe17009fe8a82c9dc256653e8 @leto committed Aug 19, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 t/sql/plperl6.sql
View
@@ -103,10 +103,10 @@ CREATE OR REPLACE FUNCTION test_grammar(text) RETURNS integer LANGUAGE plperl6 A
regex quantity { \d+ }
regex color { \S+ }
regex description { \N* }
- regex TOP { ^^ <product> \s+ <quantity> \s+
+ rule TOP { ^^ <product> <quantity>
[
- | <description> \s+ '(' \s* <color> \s* ')'
- | <color> \s+ <description>
+ | <description> '(' \s* <color> \s* ')'
+ | <color> <description>
]
$$
}

0 comments on commit 39e900f

Please sign in to comment.