You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/10/15 23:30:19 UTC

[lucy-commits] svn commit: r1183726 - in /incubator/lucy/branches/clownfish_lemon/clownfish: lib/Clownfish/Parser.pm t/108-composite_type.t

Author: marvin
Date: Sat Oct 15 21:30:18 2011
New Revision: 1183726

URL: http://svn.apache.org/viewvc?rev=1183726&view=rev
Log:
Remove Clownfish feature of allowing symbolic constants in array prefixes.

Modified:
    incubator/lucy/branches/clownfish_lemon/clownfish/lib/Clownfish/Parser.pm
    incubator/lucy/branches/clownfish_lemon/clownfish/t/108-composite_type.t

Modified: incubator/lucy/branches/clownfish_lemon/clownfish/lib/Clownfish/Parser.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/clownfish_lemon/clownfish/lib/Clownfish/Parser.pm?rev=1183726&r1=1183725&r2=1183726&view=diff
==============================================================================
--- incubator/lucy/branches/clownfish_lemon/clownfish/lib/Clownfish/Parser.pm (original)
+++ incubator/lucy/branches/clownfish_lemon/clownfish/lib/Clownfish/Parser.pm Sat Oct 15 21:30:18 2011
@@ -248,7 +248,7 @@ type_postfix:
       { '*' }
     | '[' ']'
       { '[]' }
-    | '[' constant_expression ']'
+    | '[' /\d+/ ']'
       { "[$item[2]]" }
 
 identifier:
@@ -259,10 +259,6 @@ docucomment:
     /\/\*\*.*?\*\//s
     { Clownfish::DocuComment->parse($item[1]) }
 
-constant_expression:
-      /\d+/
-    | /[A-Z_]+/
-
 scalar_constant:
       hex_constant
     | float_constant

Modified: incubator/lucy/branches/clownfish_lemon/clownfish/t/108-composite_type.t
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/clownfish_lemon/clownfish/t/108-composite_type.t?rev=1183726&r1=1183725&r2=1183726&view=diff
==============================================================================
--- incubator/lucy/branches/clownfish_lemon/clownfish/t/108-composite_type.t (original)
+++ incubator/lucy/branches/clownfish_lemon/clownfish/t/108-composite_type.t Sat Oct 15 21:30:18 2011
@@ -23,8 +23,8 @@ use Clownfish::Parser;
 my $parser = Clownfish::Parser->new;
 
 is( $parser->type_postfix($_), $_, "postfix: $_" )
-    for ( '[]', '[A_CONSTANT]', '*' );
-is( $parser->type_postfix('[ FOO ]'), '[FOO]', "type_postfix: [ FOO ]" );
+    for ( '[]', '[32]', '*' );
+is( $parser->type_postfix('[ 3 ]'), '[5]', "type_postfix: [ 76 ]" );
 
 my @composite_type_strings = (
     qw(
@@ -35,7 +35,7 @@ my @composite_type_strings = (
         Obj**
         neato_method_t[]
         neato_method_t[1]
-        multi_dimensional_t[SOME][A_FEW]
+        multi_dimensional_t[1][10]
         ),
     'char * * ',
     'const Obj**',