Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Regexes no longer need explicit action markers at the end.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Oct 18, 2009
1 parent 180f18e commit 73205a0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Regex/P6Grammar/Grammar.pm
Expand Up @@ -4,25 +4,22 @@ grammar Regex::P6Grammar::Grammar is Regex::P6Regex::Grammar;
<grammar_stmt>
<regex_stmt>*
[ $ || <.panic: 'Confused'> ]
{*}
}

token name { <.ident> ** '::' {*} }
token name { <.ident> ** '::' }

token longname {
[
| <.ident> [ ':sym<' <-[>]>* '>' ]?
]
{*}
}

rule grammar_stmt { grammar <name> [ is <base=name> ]? ';' {*} }
rule grammar_stmt { grammar <name> [ is <base=name> ]? ';' }

rule regex_stmt {
$<sym>=[regex|token|rule]
<longname>
{*} #= open
'{'<nibbler>'}'
{*}
}

0 comments on commit 73205a0

Please sign in to comment.