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

[svn:parrot] r33624 - trunk/docs/book

From:
fperrad
Date:
December 7, 2008 10:23
Subject:
[svn:parrot] r33624 - trunk/docs/book
Message ID:
20081207182323.48C0FCB9AF@x12.develooper.com
Author: fperrad
Date: Sun Dec  7 10:23:22 2008
New Revision: 33624

Modified:
   trunk/docs/book/ch01_overview.pod
   trunk/docs/book/ch03_pir_basics.pod
   trunk/docs/book/ch04_pir_subroutines.pod

Log:
[book]
- fix typo
- remove trailing space

Modified: trunk/docs/book/ch01_overview.pod
==============================================================================
--- trunk/docs/book/ch01_overview.pod	(original)
+++ trunk/docs/book/ch01_overview.pod	Sun Dec  7 10:23:22 2008
@@ -179,7 +179,7 @@
 
 =item Compiler Developer
 
-Compiler Develoeprs develop and maintain one or more Parrot front-end
+Compiler Developers develop and maintain one or more Parrot front-end
 compilers such as IMCC, PIRC, PGE and TGE.
 
 =item High Level Language Developer
@@ -363,7 +363,7 @@
 #  Tables
 #  ......
 #  A 2x2 table with top header row looks like this:
-#  
+#
 #  =begin table An Example Table
 #  =headrow
 #  =row

Modified: trunk/docs/book/ch03_pir_basics.pod
==============================================================================
--- trunk/docs/book/ch03_pir_basics.pod	(original)
+++ trunk/docs/book/ch03_pir_basics.pod	Sun Dec  7 10:23:22 2008
@@ -1,4 +1,4 @@
-=pod 
+=pod
 
 =head0 Parrot Intermediate Representation
 
@@ -16,7 +16,7 @@
 number of reasons. PASM, the Parrot assembly language on which PIR is
 based, is discussed in more detail in A<CHP-5>Chapter 5.
 
-X<.pir files> As a convention, files containing pure PIR code generally 
+X<.pir files> As a convention, files containing pure PIR code generally
 have a F<.pir> extension. Parrot will treat a file with any other
 extension, besides F<.pasm> as a PIR file in mixed mode. This means that
 the file can contain PIR and PASM code interchangably, with a few caveats
@@ -31,7 +31,7 @@
 that is slowly maturing. This is a useful source of information too. The
 test suite in F<imcc/t> shows examples of proper working code. In fact,
 the test suite is the definitive PIR resource, because it shows how PIR
-I<actually works>, even when the documentation may be out of date. 
+I<actually works>, even when the documentation may be out of date.
 
 =head1 Statements
 
@@ -131,7 +131,7 @@
   $N0 = 3.14     # Numbers can have a decimal point
   $N1 = 4        # ...or they don't
   $N2 = -1.2e+4  # Numbers can also use scientific notation.
-  
+
 String literals are enclosed in single or double-quotes:
 
   $S0 = "This is a valid literal string"
@@ -147,12 +147,12 @@
 Or, if you need more flexibility, you can use a heredoc:
 
   $S2 = << "End_Token"
-  
+
   This is a multi-line string literal. Notice that
   it doesn't use quotation marks. The string continues
   until the ending token (the thing in quotes next to
   the << above) is found.
-  
+
   End_Token
 
 =head2 Named Variables
@@ -274,7 +274,7 @@
 set in X<CHP-5> Chapter 5.
 
 PIR also provides automatic assignment operators such as C<+=>, C<-=>,
-and C<<< >>= >>>. These operators help programmers to peform common
+and C<<< >>= >>>. These operators help programmers to perform common
 manipulations on a data value in place, and save a few keystrokes while
 doing them.
 
@@ -293,8 +293,8 @@
 later) are one of the primary methods to change control flow in PIR, so
 it is well worth understanding.
 
-PIR code can contain both local and global labels. Global labels start 
-with an underscore. The name of a global label has to be unique since 
+PIR code can contain both local and global labels. Global labels start
+with an underscore. The name of a global label has to be unique since
 it can be called at any point in the program. Local labels start with a
 letter. A local label is accessible only in the function where it is
 defined. The name has to be unique within that function, but the same
@@ -358,7 +358,7 @@
 If you want to do more stuff if your program, you will need to call
 other functions explicitly.
 
-A<CHP-04>Chapter 4 goes into much more detail about compilation units 
+A<CHP-04>Chapter 4 goes into much more detail about compilation units
 and their uses.
 
 =head1 Flow Control
@@ -374,9 +374,9 @@
 to the language in which they are used, so any attempt by Parrot to
 provide these structures would work for some languages but not by
 others. The only way to make sure all languages and their control
-structures can be equally accomdated is to simply give them the most
+structures can be equally accomodated is to simply give them the most
 simple and fundamental building blocks to work with. Language
-agnosticism is an important design goal in Parrot. 
+agnosticism is an important design goal in Parrot.
 
 X<goto instruction (PIR)>
 The most basic branching instruction is the unconditional branch:
@@ -561,7 +561,7 @@
 #  Tables
 #  ......
 #  A 2x2 table with top header row looks like this:
-#  
+#
 #  =begin table An Example Table
 #  =headrow
 #  =row

Modified: trunk/docs/book/ch04_pir_subroutines.pod
==============================================================================
--- trunk/docs/book/ch04_pir_subroutines.pod	(original)
+++ trunk/docs/book/ch04_pir_subroutines.pod	Sun Dec  7 10:23:22 2008
@@ -94,7 +94,7 @@
 
 X<.param directive>
 In addition to syntax for subroutine calls, PIR provides syntax for
-subroutine definitions. Subrtroutines are defined with the C<.sub>
+subroutine definitions. Subroutines are defined with the C<.sub>
 directive, and end with the C<.end> directive. We've already seen
 this syntax in our earlier examples. The C<.param> defines input
 parameters and creates local named variables for them:
@@ -167,7 +167,7 @@
     print $S0
     print $S1
  .end
- 
+
  .sub main :main
     'MySub'("age" => 42, "name" => "Bob")
  .end
@@ -193,7 +193,7 @@
 
 Optional parameters are actually treated like two parameters: The value
 that may or may not be passed, and the flag value to determine if it
-has been or not. Here's an example declaration of an optional paramter:
+has been or not. Here's an example declaration of an optional parameter:
 
   .param string name :optional
   .param int has_name :opt_flag
@@ -251,7 +251,7 @@
 return to the point where the continuation was first created. It's
 like a magical timewarp that allows the developer to arbitrarily move
 control flow back to any previous point in the program N<there's actually
-no magic involved, just a lot of interesting ideas and involved code>. 
+no magic involved, just a lot of interesting ideas and involved code>.
 
 Continuations are not a new concept, they've been boggling the minds
 of Lisp and Scheme programmers for many years. However, despite all
@@ -277,7 +277,7 @@
 example in pseudocode:
 
  call add_two(5)
- 
+
  subroutine add_two(value)
 	 value = add_one(value)
 	 return add_one(value)
@@ -327,7 +327,7 @@
           // x, y, and z are all visible here
       }
       // only x and y are visible here
-  {
+  }
 
 The code above illustrates this idea perfectly without having to get into a
 detailed and convoluted example: In the inner block, we define the variable
@@ -349,7 +349,7 @@
       'MyInner'()
       # only x and y are visible here
   .end
-  
+
   .sub 'MyInner' :outer('MyOuter')
       .lex int z
       #x, y, and z are all visible here
@@ -365,7 +365,7 @@
 outer subroutine to give it a different--and unique--name that the lexical
 subroutines can reference in their C<:outer> declarations. Within lexical
 subroutines, the C<.lex> command defines a local variable that follows these
-scoping rules. 
+scoping rules.
 
 Sound confusing? It's not so bad. The basics are that we use C<:outer> to
 define a lexically-scoped subroutine, and we use C<.lex> to define lexically
@@ -664,14 +664,14 @@
 as VTABLE interfaces. This means we can have the following:
 
   .namespace [ "MyClass" ]
-  
+
   .sub 'ToString' :vtable('get_string') :method
       $S0 = "hello!"
       .return($S0)
   .end
-  
+
   .namespace [ "OtherClass" ]
-  
+
   .local pmc myclass = new "MyClass"
   say myclass                 # say converts to string internally
   $S0 = myclass               # Convert to a string, store in SS0
@@ -748,7 +748,7 @@
 the number and/or type of arguments passed to the function. Having
 two multisubs with the same function signature could result in a
 parsing error, or the later function could overwrite the former one
-in the multi. 
+in the multi.
 
 Multisubs are defined like this:
 
@@ -830,7 +830,7 @@
 #  Tables
 #  ......
 #  A 2x2 table with top header row looks like this:
-#  
+#
 #  =begin table An Example Table
 #  =headrow
 #  =row



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