diff website/src/manual.html.luan @ 1092:a26fbde7ee28

documentation
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 08 Jan 2017 17:23:06 -0700
parents 616761e0b9f6
children ad6b3b9fef40
line wrap: on
line diff
--- a/website/src/manual.html.luan	Mon Jan 02 21:28:30 2017 -0700
+++ b/website/src/manual.html.luan	Sun Jan 08 17:23:06 2017 -0700
@@ -534,6 +534,7 @@
 
 <pre>
      and       break     do        else      elseif    end
+     end_do    end_for   end_function        end_if    end_while
      false     for       function  goto      if        in
      local     nil       not       or        repeat    return
      then      true      until     while
@@ -785,7 +786,8 @@
 A block can be explicitly delimited to produce a single statement:
 
 <pre>
-	stat ::= <b>do</b> block <b>end</b>
+	stat ::= <b>do</b> block end_do
+	end_do ::= <b>end_do</b> | <b>end</b>
 </pre>
 
 <p>
@@ -921,9 +923,11 @@
 familiar syntax:
 
 <pre>
-	stat ::= <b>while</b> exp <b>do</b> block <b>end</b>
+	stat ::= <b>while</b> exp <b>do</b> block end_while
 	stat ::= <b>repeat</b> block <b>until</b> exp
-	stat ::= <b>if</b> exp <b>then</b> block {<b>elseif</b> exp <b>then</b> block} [<b>else</b> block] <b>end</b>
+	stat ::= <b>if</b> exp <b>then</b> block {<b>elseif</b> exp <b>then</b> block} [<b>else</b> block] end_if
+	end_while ::= <b>end_while</b> | <b>end</b>
+	end_if ::= <b>end_if</b> | <b>end</b>
 </pre>
 
 <p>
@@ -984,8 +988,9 @@
 The <b>for</b> loop has the following syntax:
 
 <pre>
-	stat ::= <b>for</b> namelist <b>in</b> exp <b>do</b> block <b>end</b>
+	stat ::= <b>for</b> namelist <b>in</b> exp <b>do</b> block end_for
 	namelist ::= Name {&lsquo;<b>,</b>&rsquo; Name}
+	end_for ::= <b>end_for</b> | <b>end</b>
 </pre>
 
 <p>
@@ -1519,7 +1524,8 @@
 
 <pre>
 	functiondef ::= <b>function</b> funcbody
-	funcbody ::= &lsquo;<b>(</b>&rsquo; [parlist] &lsquo;<b>)</b>&rsquo; block <b>end</b>
+	funcbody ::= &lsquo;<b>(</b>&rsquo; [parlist] &lsquo;<b>)</b>&rsquo; block end_function
+	end_function ::= <b>end_function</b> | <b>end</b>
 </pre>
 
 <p>