]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani.mdc
oceani/parsergen: assorted text improvements.
[ocean] / csrc / oceani.mdc
index c3e5904f72296bd86be79346616b09c6428a5d4f..a9046750e5b658a0f26a3423bb2b396bd773d60a 100644 (file)
@@ -531,12 +531,12 @@ subclasses, and to access these we need to be able to `cast` the
 Each different type of `exec` node needs a number of functions
 defined, a bit like methods.  We must be able to be able to free it,
 print it, analyse it and execute it.  Once we have specific `exec`
 Each different type of `exec` node needs a number of functions
 defined, a bit like methods.  We must be able to be able to free it,
 print it, analyse it and execute it.  Once we have specific `exec`
-types we will need to parse them to.  Let's take this a bit more
+types we will need to parse them too.  Let's take this a bit more
 slowly.
 
 #### Freeing
 
 slowly.
 
 #### Freeing
 
-The parser generator requires as `free_foo` function for each struct
+The parser generator requires a `free_foo` function for each struct
 that stores attributes and they will be `exec`s of subtypes there-of.
 So we need `free_exec` which can handle all the subtypes, and we need
 `free_binode`.
 that stores attributes and they will be `exec`s of subtypes there-of.
 So we need `free_exec` which can handle all the subtypes, and we need
 `free_binode`.
@@ -608,10 +608,10 @@ also want to know what sort of bracketing to use.
 
 #### Analysing
 
 
 #### Analysing
 
-As discusses, analysis involves propagating type requirements around
+As discussed, analysis involves propagating type requirements around
 the program and looking for errors.
 
 the program and looking for errors.
 
-So propagate_types is passed a type that the `exec` is expected to return,
+So `propagate_types` is passed a type that the `exec` is expected to return,
 and returns the type that it does return, either of which can be `Vunknown`.
 An `ok` flag is passed by reference. It is set to `0` when an error is
 found, and `2` when any change is made.  If it remains unchanged at
 and returns the type that it does return, either of which can be `Vunknown`.
 An `ok` flag is passed by reference. It is set to `0` when an error is
 found, and `2` when any change is made.  If it remains unchanged at
@@ -858,7 +858,7 @@ Our first user of the `binode` will be expressions, and particularly
 Boolean expressions.  As I haven't implemented precedence in the
 parser generator yet, we need different names from each precedence
 level used by expressions.  The outer most or lowest level precedence
 Boolean expressions.  As I haven't implemented precedence in the
 parser generator yet, we need different names from each precedence
 level used by expressions.  The outer most or lowest level precedence
-are Boolean `or` `and`, and `not` which form and `Expression` our of `BTerm`s
+are Boolean `or` `and`, and `not` which form an `Expression` out of `BTerm`s
 and `BFact`s.
 
 ###### Binode types
 and `BFact`s.
 
 ###### Binode types
@@ -972,7 +972,7 @@ expression operator.
                        $0->left = $<1;
                        $0->right = $<3;
                }$
                        $0->left = $<1;
                        $0->right = $<3;
                }$
-               | Expr ${ $0 = $<1; }$
+       | Expr ${ $0 = $<1; }$
 
 ###### Grammar
 
 
 ###### Grammar
 
@@ -1573,7 +1573,7 @@ function.
 ### The Conditional Statement
 
 This is the biggy and currently the only complex statement.
 ### The Conditional Statement
 
 This is the biggy and currently the only complex statement.
-This subsumes `if`, `while`, `do/while`, `switch`, and some part of
+This subsumes `if`, `while`, `do/while`, `switch`, and some parts of
 `for`.  It is comprised of a number of parts, all of which are
 optional though set combinations apply.
 
 `for`.  It is comprised of a number of parts, all of which are
 optional though set combinations apply.
 
@@ -1584,7 +1584,7 @@ value.  `condpart` can fail to return any value if it simply executes
 to completion.  This is treated the same as returning True.
 
 If there is a `thenpart` it will be executed whenever the `condpart`
 to completion.  This is treated the same as returning True.
 
 If there is a `thenpart` it will be executed whenever the `condpart`
-or `cond` returns True (or does not return), but this will happen
+or `cond` returns True (or does not return any value), but this will happen
 *after* `dopart` (when present).
 
 If `elsepart` is present it will be executed at most once when the
 *after* `dopart` (when present).
 
 If `elsepart` is present it will be executed at most once when the
@@ -1594,7 +1594,7 @@ executed when the condition returns a matching value.
 The particular sorts of values allowed in case parts has not yet been
 determined in the language design.
 
 The particular sorts of values allowed in case parts has not yet been
 determined in the language design.
 
-The cond_statement cannot fit into a `binode` so a new `exec` is
+The `cond_statement` cannot fit into a `binode` so a new `exec` is
 defined.
 
 ###### exec type
 defined.
 
 ###### exec type
@@ -1949,7 +1949,7 @@ defined.
 ### Finally the whole program.
 
 Somewhat reminiscent of Pascal a (current) Ocean program starts with
 ### Finally the whole program.
 
 Somewhat reminiscent of Pascal a (current) Ocean program starts with
-the keyword "program" and list of variable names which are assigned
+the keyword "program" and list of variable names which are assigned
 values from command line arguments.  Following this is a `block` which
 is the code to execute.
 
 values from command line arguments.  Following this is a `block` which
 is the code to execute.