From c5e946f855018ccb55b5347d13a2eb1f2344fcf1 Mon Sep 17 00:00:00 2001 From: jnthn Date: Sun, 9 Dec 2012 00:50:58 +0100 Subject: [PATCH] A little STD alignment. Gets us a panic where STD has one and we lacked it, plus a bogus statement error that was also missing. --- src/Perl6/Grammar.pm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Perl6/Grammar.pm b/src/Perl6/Grammar.pm index b6f1d20c2e6..e38573f4f3c 100644 --- a/src/Perl6/Grammar.pm +++ b/src/Perl6/Grammar.pm @@ -812,6 +812,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD { :s [ | $ + | > | [<.eat_terminator> ]* ] } @@ -837,14 +838,15 @@ grammar Perl6::Grammar is HLL::Grammar does STD { :my $*SCOPE := ''; :my $*ACTIONS := %*LANG; | $ > + ) }> [ | - | :dba('statement end') <.ws> + | :dba('statement end') [ || - || :dba('statement modifier') ? - || :dba('statement modifier loop') + || :dba('statement modifier') <.ws> ? + || :dba('statement modifier loop') <.ws> { my $sp := $; if $sp && $sp eq 'do' { @@ -853,15 +855,19 @@ grammar Perl6::Grammar is HLL::Grammar does STD { } } ]? - ] | + | > + | {} <.panic: "Bogus statement"> + ] } token eat_terminator { || ';' || - || + || || $ + || + || <.typed_panic: 'X::Syntax::Confused'> } token xblock($*IMPLICIT = 0) {