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

[svn:parrot] r33957 - branches/rakudoreg/languages/perl6/src/parser

From:
jonathan
Date:
December 16, 2008 08:36
Subject:
[svn:parrot] r33957 - branches/rakudoreg/languages/perl6/src/parser
Message ID:
20081216163633.00F08CBA12@x12.develooper.com
Author: jonathan
Date: Tue Dec 16 08:36:32 2008
New Revision: 33957

Modified:
   branches/rakudoreg/languages/perl6/src/parser/grammar.pg

Log:
[rakudo] Remove hack and use new assertion syntax.

Modified: branches/rakudoreg/languages/perl6/src/parser/grammar.pg
==============================================================================
--- branches/rakudoreg/languages/perl6/src/parser/grammar.pg	(original)
+++ branches/rakudoreg/languages/perl6/src/parser/grammar.pg	Tue Dec 16 08:36:32 2008
@@ -808,14 +808,8 @@
 }
 
 token typename {
-    $<name>=<registered_typename>
-    {*}
-}
-
-# XXX This goes away once we have assertions.
-token registered_typename {
     <name>
-    {{
+    <?{{
         .local pmc compiler_obj, check_ns, check_symbol
         .local string full_name
         full_name = match['name']
@@ -841,10 +835,11 @@
         goto fail_it
       type_ok:
         $P0 = match['name']
-        .return ($P0)
+        .return (1)
       fail_it:
-    }}
-    <fail>
+        .return (0)
+    }}>
+    {*}
 }
 
 # These regex rules are some way off STD.pm at the moment, but we'll work them



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