Skip to content

Commit

Permalink
update special variable guards, GlitchMr++
Browse files Browse the repository at this point in the history
fixes #3
  • Loading branch information
TimToady committed Sep 15, 2012
1 parent aab1162 commit a8f1a47
Showing 1 changed file with 24 additions and 25 deletions.
49 changes: 24 additions & 25 deletions STD.pm6
Expand Up @@ -2174,17 +2174,17 @@ grammar P6 is STD {
} }


token special_variable:sym<$~> { token special_variable:sym<$~> {
<sym> :: <?before \s | ',' | '=' | <terminator> > <sym> <!before \w | '('>
<.obs('$~ variable', 'Form module')> <.obs('$~ variable', 'Form module')>
} }


token special_variable:sym<$`> { token special_variable:sym<$`> {
<sym> :: <?before \s | ',' | <terminator> > <sym>
<.obs('$` variable', 'explicit pattern before <(')> <.obs('$` variable', 'explicit pattern before <(')>
} }


token special_variable:sym<$@> { token special_variable:sym<$@> {
<sym> <?before \W> :: <sym> <!before \w | '(' | <sigil> > ::
<.obs('$@ variable as eval error', '$!')> <.obs('$@ variable as eval error', '$!')>
} }


Expand All @@ -2196,11 +2196,11 @@ grammar P6 is STD {
] ]
} }
token special_variable:sym<$$> { token special_variable:sym<$$> {
<sym> <!alpha> :: <?before \s | ',' | <terminator> > <sym> <!before \w | '(' | <sigil> >
<.obs('$$ variable', '$*PID')> <.obs('$$ variable', '$*PID')>
} }
token special_variable:sym<$%> { token special_variable:sym<$%> {
<sym> <!before \w> <!sigil> :: <sym> <!before \w | '(' | <sigil> >
<.obs('$% variable', 'Form module')> <.obs('$% variable', 'Form module')>
} }


Expand All @@ -2211,42 +2211,42 @@ grammar P6 is STD {
} }


token special_variable:sym<$^> { token special_variable:sym<$^> {
<sym> :: <?before \s | ',' | '=' | <terminator> > <sym> <!before \w>
<.obs('$^ variable', 'Form module')> <.obs('$^ variable', 'Form module')>
} }


token special_variable:sym<$&> { token special_variable:sym<$&> {
<sym> :: <?before \s | ',' | <terminator> > <sym> <!before \w | '(' | <sigil> >
<.obs('$& variable', '$/ or $()')> <.obs('$& variable', '$/ or $()')>
} }


token special_variable:sym<$*> { token special_variable:sym<$*> {
<sym> :: <?before \s | ',' | '=' | <terminator> > <sym> <!before \w | '(' >
<.obs('$* variable', '^^ and $$')> <.obs('$* variable', '^^ and $$')>
} }


token special_variable:sym<$)> { token special_variable:sym<$)> {
<sym> <?{ $*GOAL ne ')' }> <?before \s | ',' | <terminator> > <sym> <?{ $*GOAL ne ')' }>
<.obs('$) variable', '$*EGID')> <.obs('$) variable', '$*EGID')>
} }


token special_variable:sym<$-> { token special_variable:sym<$-> {
<sym> :: <?before \s | ',' | '=' | <terminator> > <sym>
<.obs('$- variable', 'Form module')> <.obs('$- variable', 'Form module')>
} }


token special_variable:sym<$=> { token special_variable:sym<$=> {
<sym> :: <?before \s | ',' | '=' | <terminator> > <sym> <!before \w | '('>
<.obs('$= variable', 'Form module')> <.obs('$= variable', 'Form module')>
} }


token special_variable:sym<@+> { token special_variable:sym<@+> {
<sym> :: <?before \s | ',' | <terminator> > <sym>
<.obs('@+ variable', '.to method')> <.obs('@+ variable', '.to method')>
} }


token special_variable:sym<%+> { token special_variable:sym<%+> {
<sym> :: <?before \s | ',' | <terminator> > <sym>
<.obs('%+ variable', '.to method')> <.obs('%+ variable', '.to method')>
} }


Expand Down Expand Up @@ -2369,48 +2369,47 @@ grammar P6 is STD {
} }


token special_variable:sym<$[> { token special_variable:sym<$[> {
<sym> :: <?before \s | ',' | '=' | <terminator> > <sym>
<.obs('$[ variable', 'user-defined array indices')> <.obs('$[ variable', 'user-defined array indices')>
} }


token special_variable:sym<$]> { token special_variable:sym<$]> {
<sym> :: <?before \s | ',' | <terminator> > <sym>
<.obs('$] variable', '$*PERL_VERSION')> <.obs('$] variable', '$*PERL_VERSION')>
} }


token special_variable:sym<$\\> { token special_variable:sym<$\\> {
<sym> :: <?before \s | ',' | '=' | <terminator> > <sym>
<.obs('$\\ variable', "the filehandle's :ors attribute")> <.obs('$\\ variable', "the filehandle's :ors attribute")>
} }


token special_variable:sym<$|> { token special_variable:sym<$|> {
<sym> :: <?before \s | ',' | '=' | <terminator> > <sym>
<.obs('$| variable', ':autoflush on open')> <.obs('$| variable', ':autoflush on open')>
} }


token special_variable:sym<$:> { token special_variable:sym<$:> {
<sym> <?before <[\x20\t\n\],=)}]> > <sym> <!before \w>
<.obs('$: variable', 'Form module')> <.obs('$: variable', 'Form module')>
} }


token special_variable:sym<$;> { token special_variable:sym<$;> {
<sym> :: <?before \s | ',' | '=' | <terminator> > <sym>
<.obs('$; variable', 'real multidimensional hashes')> <.obs('$; variable', 'real multidimensional hashes')>
} }


token special_variable:sym<$'> { #' token special_variable:sym<$'> { #'
<sym> :: <?before \s | ',' | <terminator> > <sym> <!{ $*QSIGIL }>
<.obs('$' ~ "'" ~ 'variable', "explicit pattern after )\x3E")> <.obs('$' ~ "'" ~ 'variable', "explicit pattern after )\x3E")>
} }


token special_variable:sym<$"> { token special_variable:sym<$"> {
<sym> <!{ $*QSIGIL }> <sym> <!{ $*QSIGIL }>
:: <?before \s | ',' | '=' | <terminator> >
<.obs('$" variable', '.join() method')> <.obs('$" variable', '.join() method')>
} }


token special_variable:sym<$,> { token special_variable:sym<$,> {
<sym> :: <?before \s | ',' | <terminator> > <sym>
<.obs('$, variable', ".join() method")> <.obs('$, variable', ".join() method")>
} }


Expand All @@ -2420,17 +2419,17 @@ grammar P6 is STD {
} }


token special_variable:sym«\$>» { token special_variable:sym«\$>» {
<sym> :: <?before \s | ',' | <terminator> > <sym>
<.obs('$> variable', '$*EUID')> <.obs('$> variable', '$*EUID')>
} }


token special_variable:sym<$.> { token special_variable:sym<$.> {
<sym> :: <?before \s | ',' | <terminator> > <sym> <!before \w | '('>
<.obs('$. variable', "the filehandle's .line method")> <.obs('$. variable', "the filehandle's .line method")>
} }


token special_variable:sym<$?> { token special_variable:sym<$?> {
<sym> :: <?before \s | ',' | <terminator> > <sym> <!before \w | '('>
<.obs('$? variable as child error', '$!')> <.obs('$? variable as child error', '$!')>
} }


Expand Down

0 comments on commit a8f1a47

Please sign in to comment.