develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34453 - trunk/languages/perl6/src/parser

From:
pmichaud
Date:
December 27, 2008 14:29
Subject:
[svn:parrot] r34453 - trunk/languages/perl6/src/parser
Message ID:
20081227222921.9EFA7CBA12@x12.develooper.com
Author: pmichaud
Date: Sat Dec 27 14:29:20 2008
New Revision: 34453

Modified:
   trunk/languages/perl6/src/parser/grammar.pg

Log:
[rakudo]:  Update grammar to use goal matching syntax.


Modified: trunk/languages/perl6/src/parser/grammar.pg
==============================================================================
--- trunk/languages/perl6/src/parser/grammar.pg	(original)
+++ trunk/languages/perl6/src/parser/grammar.pg	Sat Dec 27 14:29:20 2008
@@ -155,9 +155,7 @@
 ##  closing brace is the last non-ws thing on the line.
 
 token block {
-    '{'
-    <statement_block>
-    [ '}' || <panic: Missing '}'> ]
+    '{' ~ '}' <statement_block>
     <.BLOCK_STATEMENT_END>?
     {*}
 }
@@ -425,13 +423,12 @@
         $P0 = 1
         set_global [ 'Perl6' ; 'Grammar' ; 'Actions' ], '$?SIG_BLOCK_NOT_NEEDED', $P0
     }}
-    <signature>
+    ~ ')' <signature>
     {{
         $P0 = new 'Integer'
         $P0 = 0
         set_global [ 'Perl6' ; 'Grammar' ; 'Actions' ], '$?SIG_BLOCK_NOT_NEEDED', $P0
     }}
-    [ ')' || <.panic: "Missing right parenthesis in signature"> ]
     {*}
 }
 
@@ -659,13 +656,12 @@
           $P0 = 1
           set_global [ 'Perl6' ; 'Grammar' ; 'Actions' ], '$?SIG_BLOCK_NOT_NEEDED', $P0
       }}
-      <signature>
+      ~ ')' <signature>
       {{
           $P0 = new 'Integer'
           $P0 = 0
           set_global [ 'Perl6' ; 'Grammar' ; 'Actions' ], '$?SIG_BLOCK_NOT_NEEDED', $P0
       }}
-      [ ')' || <.panic: "Missing right parenthsesis after signature"> ]
     ]
     {*}
 }



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About