Skip to content

Commit

Permalink
Update obsolete ** syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
coke committed Aug 28, 2012
1 parent e5d3cf1 commit 68fe753
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/FileGlob/Grammar.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ grammar FileGlob::Grammar is StringGlob::Grammar {

# This is how globs do alternation
token metachar:sym<{> {
'{' ~ '}' [ <word> ** ',' ]
'{' ~ '}' [ <word> +% ',' ]
}

token word { <-[,}]>+ }
Expand Down
8 changes: 4 additions & 4 deletions src/Partcl/Grammar.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ grammar Partcl::Grammar is HLL::Grammar {
token body { <script> [ $ || <.panic: 'Confused' > ] }

token script {
[ \h* [ <.comment> | <command> | <?> ] \h* ] ** <.command_sep>
[ \h* [ <.comment> | <command> | <?> ] \h* ] +% <.command_sep>
\s*
}

token comment { '#' [ \\ \n \h* | \N ]* }
token command { <word> ** [[\h+ || \\ \x0a]+] }
token command { <word> +% [[\h+ || \\ \x0a]+] }
token command_sep { ';' | \n }

proto token word { <...> }
Expand Down Expand Up @@ -80,7 +80,7 @@ grammar Partcl::Grammar is HLL::Grammar {
| <EXPR=.braced_word>
[ $<extra>=(\S+) { $/.CURSOR.badList('braces', $<extra><sym>); }]?
| <EXPR=.list_word>
] ** [\s+]
] +% [\s+]
}

method badList($types, $extra) {
Expand All @@ -93,7 +93,7 @@ grammar Partcl::Grammar is HLL::Grammar {
token list_atom:sym<chr> { <-[ \\ ]-space>+ }

token colons { ':' ':'+ }
token identifier { <ident> ** <.colons> }
token identifier { <ident> +% <.colons> }

proto token variable { <...> }
# XXX The key here is wrong. It needs to do variable interpolation, and more.
Expand Down

0 comments on commit 68fe753

Please sign in to comment.