develooper Front page | perl.cvs.parrot | Postings from January 2009

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

From:
bernhard
Date:
January 23, 2009 03:54
Subject:
[svn:parrot] r35906 - trunk/languages/pipp/src/pct
Message ID:
20090123115445.0841DCB9AE@x12.develooper.com
Author: bernhard
Date: Fri Jan 23 03:54:43 2009
New Revision: 35906

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

Log:
[Pipp] Formating of grammar file

Modified: trunk/languages/pipp/src/pct/grammar.pg
==============================================================================
--- trunk/languages/pipp/src/pct/grammar.pg	(original)
+++ trunk/languages/pipp/src/pct/grammar.pg	Fri Jan 23 03:54:43 2009
@@ -14,11 +14,17 @@
 
 # Whitespace and comments
 
-token ws_char           { \h | \v }
+token ws_char {
+    \h | \v             # horizontal or vertical whitespace
+}
 
-token singlelinecomment { [ '#' || '//' ] \N* }    # end of line comment like Unix shell and C++
+token singlelinecomment {
+    [ '#' || '//' ] \N*    # end of line comment like Unix shell and C++
+}
 
-token multilinecomment  { '/*' .*?  '*/' }         # C-like multiline comment
+token multilinecomment {
+    '/*' .*?  '*/'         # C-like multiline comment
+}
 
 token ws_all {
     | <.ws_char>
@@ -243,15 +249,25 @@
     <ident>
 }
 
-token function_name            { <ident> }
+token function_name {
+    <ident>
+}
 
-token interface_name           { <ident> }
+token interface_name {
+    <ident>
+}
 
-token member_name              { <ident> }
+token member_name {
+    <ident>
+}
 
-token method_name              { <ident> }
+token method_name {
+    <ident>
+}
 
-token namespace_name           { <ns_path> <ident> }
+token namespace_name {
+    <ns_path> <ident>
+}
 
 token name {
     <leading_backslash=ns_sep>?           # a leading backslash is optional, but significant
@@ -259,13 +275,17 @@
     <ident>                               # identifier is required
 }
 
-token ns_sep                   { '\\' }   # yes, PHP 5.3 uses backslash as the namespace separator
+token ns_sep {
+    '\\'                                  # yes, PHP 5.3 uses backslash as the namespace separator
+}
 
-token ns_path                  {
+token ns_path {
     [ <ident> <.ns_sep> ]*
-} 
+}
 
-token var_name                 { '$' <ident> }
+token var_name {
+    '$' <ident>
+}
 
 # terms
 rule method_call {



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