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

[svn:parrot] r34506 - trunk/languages/pipp/src/pct

From:
bernhard
Date:
December 28, 2008 09:58
Subject:
[svn:parrot] r34506 - trunk/languages/pipp/src/pct
Message ID:
20081228175838.9FE05CB9FA@x12.develooper.com
Author: bernhard
Date: Sun Dec 28 09:58:37 2008
New Revision: 34506

Modified:
   trunk/languages/pipp/src/pct/actions.pm
   trunk/languages/pipp/src/pct/grammar.pg

Log:
[Pipp] Rename rule arguments to argument_list


Modified: trunk/languages/pipp/src/pct/actions.pm
==============================================================================
--- trunk/languages/pipp/src/pct/actions.pm	(original)
+++ trunk/languages/pipp/src/pct/actions.pm	Sun Dec 28 09:58:37 2008
@@ -78,7 +78,7 @@
 method code_echo_tag($/) {
     my $stmts := $( $<statement_list> );
 
-    my $echo := $( $<arguments> );
+    my $echo := $( $<argument_list> );
     $echo.name( 'echo' );
 
     $stmts.unshift( $echo );
@@ -151,7 +151,7 @@
 }
 
 method echo_statement($/) {
-    my $past := $( $<arguments> );
+    my $past := $( $<argument_list> );
     $past.name( 'echo' );
 
     make $past;
@@ -162,14 +162,14 @@
 }
 
 method closure_call($/) {
-    my $past := $( $<arguments> );
+    my $past := $( $<argument_list> );
     $past.unshift( $( $<var> ) );
 
     make $past;
 }
 
 method function_call($/) {
-    my $past := $( $<arguments> );
+    my $past := $( $<argument_list> );
     $past.name( ~$<FUNCTION_NAME> );
 
     make $past;
@@ -206,7 +206,7 @@
 }
 
 method method_call($/) {
-    my $past := $( $<arguments> );
+    my $past := $( $<argument_list> );
     $past.name( ~$<METHOD_NAME> );
     $past.pasttype( 'callmethod' );
     $past.unshift( $( $<var> ) );
@@ -267,7 +267,7 @@
     make $past;
 }
 
-method arguments($/) {
+method argument_list($/) {
     my $past := PAST::Op.new(
                     :pasttype('call'),
                     :node($/)

Modified: trunk/languages/pipp/src/pct/grammar.pg
==============================================================================
--- trunk/languages/pipp/src/pct/grammar.pg	(original)
+++ trunk/languages/pipp/src/pct/grammar.pg	Sun Dec 28 09:58:37 2008
@@ -48,7 +48,7 @@
 }
 
 rule code_echo_tag {
-    <.CODE_START_ECHO_TAG> <arguments> <.statement_delimiter>
+    <.CODE_START_ECHO_TAG> <argument_list> <.statement_delimiter>
         <statement_list>
     <.close_short_tag>?
     {*}
@@ -72,7 +72,7 @@
     '<script' <ws_char>+: 'language' <ws_char>*: '=' <ws_char>*: <quoted_lang_name> <ws_char>*: '>'
     {{ $P0 = new 'String'
        $P0 = "script"
-        set_global "tag_type", $P0
+       set_global "tag_type", $P0
     }}
 }
 
@@ -93,7 +93,7 @@
     '<?=' 
     {{ $P0 = new 'String'
        $P0 = "short"
-        set_global "tag_type", $P0
+       set_global "tag_type", $P0
     }}
 }
 
@@ -101,7 +101,7 @@
     '<?' 'php'?  
     {{ $P0 = new 'String'
        $P0 = "short"
-        set_global "tag_type", $P0
+       set_global "tag_type", $P0
     }}
 }
 
@@ -162,7 +162,7 @@
 }
 
 token echo_statement {
-    'echo' <.ws_char> <arguments> <ws> <.statement_delimiter>
+    'echo' <.ws_char> <argument_list> <ws> <.statement_delimiter>
     {*}
 }
 
@@ -171,7 +171,7 @@
     {*}
 }
 
-rule arguments {
+rule argument_list {
     [ <expression> [',' <expression>]* ]?
     {*}
 }
@@ -264,17 +264,17 @@
 
 # terms
 rule method_call {
-    <var> '->' <METHOD_NAME> '(' <arguments> ')'
+    <var> '->' <METHOD_NAME> '(' <argument_list> ')'
     {*}
 }
 
 rule closure_call {
-    <var> '(' <arguments> ')'
+    <var> '(' <argument_list> ')'
     {*}
 }
 
 rule function_call {
-    <FUNCTION_NAME> '(' <arguments> ')'
+    <FUNCTION_NAME> '(' <argument_list> ')'
     {*}
 }
 
@@ -362,13 +362,13 @@
 }
 
 token var {
-      <this>        {*}   #= this
+    | <this>        {*}   #= this
     | <array_elem>  {*}   #= array_elem
     | <simple_var>  {*}   #= simple_var
 }
 
 rule literal {
-      <TRUE>    {*}    #= TRUE
+    | <TRUE>    {*}    #= TRUE
     | <FALSE>   {*}    #= FALSE
     | <NULL>    {*}    #= NULL
     | <NUMBER>  {*}    #= NUMBER
@@ -456,8 +456,6 @@
     {*}                                     #= close
 }
 
-
-
 token curly_interpolation {
     '{' <var> '}'
     {*}



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