Skip to content

Commit

Permalink
Use a rule instead of a regex in PL/Perl6 grammar example, bacek++
Browse files Browse the repository at this point in the history
  • Loading branch information
leto committed Aug 19, 2010
1 parent a1bc962 commit 39e900f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t/sql/plperl6.sql
Expand Up @@ -103,10 +103,10 @@ CREATE OR REPLACE FUNCTION test_grammar(text) RETURNS integer LANGUAGE plperl6 A
regex quantity { \d+ } regex quantity { \d+ }
regex color { \S+ } regex color { \S+ }
regex description { \N* } regex description { \N* }
regex TOP { ^^ <product> \s+ <quantity> \s+ rule TOP { ^^ <product> <quantity>
[ [
| <description> \s+ '(' \s* <color> \s* ')' | <description> '(' \s* <color> \s* ')'
| <color> \s+ <description> | <color> <description>
] ]
$$ $$
} }
Expand Down

0 comments on commit 39e900f

Please sign in to comment.