You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2011/08/28 01:39:30 UTC

svn commit: r1162459 - in /incubator/lcf/trunk: framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/ site/src/documentation/content/xdocs/

Author: kwright
Date: Sat Aug 27 23:39:29 2011
New Revision: 1162459

URL: http://svn.apache.org/viewvc?rev=1162459&view=rev
Log:
Various script-engine related updates, including substantial documentation and various fixes for consistency etc.

Modified:
    incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/Variable.java
    incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableBoolean.java
    incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableInt.java
    incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableResult.java
    incubator/lcf/trunk/site/src/documentation/content/xdocs/how-to-build-and-deploy.xml
    incubator/lcf/trunk/site/src/documentation/content/xdocs/script.xml

Modified: incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/Variable.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/Variable.java?rev=1162459&r1=1162458&r2=1162459&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/Variable.java (original)
+++ incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/Variable.java Sat Aug 27 23:39:29 2011
@@ -50,8 +50,6 @@ public interface Variable
   public static String ATTRIBUTE_NOTFOUNDSTATUS = "__NOTFOUND__";
   /** CREATED status attribute */
   public static String ATTRIBUTE_CREATEDSTATUS = "__CREATED__";
-  /** RESULT attribute */
-  public static String ATTRIBUTE_RESULT = "__result__";
   
   /** Get the variable's value as a string */
   public String getStringValue()

Modified: incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableBoolean.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableBoolean.java?rev=1162459&r1=1162458&r2=1162459&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableBoolean.java (original)
+++ incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableBoolean.java Sat Aug 27 23:39:29 2011
@@ -45,13 +45,20 @@ public class VariableBoolean extends Var
     return value;
   }
 
-  /** Get the variable's value as a string */
-  public String getStringValue()
+  public VariableReference doubleEquals(Variable v)
     throws ScriptException
   {
-    if (value)
-      return "true";
-    return "false";
+    if (v == null)
+      throw new ScriptException("== operand cannot be null");
+    return new VariableBoolean(value == v.getBooleanValue());
+  }
+
+  public VariableReference exclamationEquals(Variable v)
+    throws ScriptException
+  {
+    if (v == null)
+      throw new ScriptException("!= operand cannot be null");
+    return new VariableBoolean(value != v.getBooleanValue());
   }
 
   public VariableReference doubleAmpersand(Variable v)
@@ -70,6 +77,22 @@ public class VariableBoolean extends Var
     return new VariableBoolean(value || v.getBooleanValue());
   }
 
+  public VariableReference ampersand(Variable v)
+    throws ScriptException
+  {
+    if (v == null)
+      throw new ScriptException("& operand cannot be null");
+    return new VariableBoolean(value && v.getBooleanValue());
+  }
+    
+  public VariableReference pipe(Variable v)
+    throws ScriptException
+  {
+    if (v == null)
+      throw new ScriptException("| operand cannot be null");
+    return new VariableBoolean(value || v.getBooleanValue());
+  }
+
   public VariableReference unaryExclamation()
     throws ScriptException
   {

Modified: incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableInt.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableInt.java?rev=1162459&r1=1162458&r2=1162459&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableInt.java (original)
+++ incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableInt.java Sat Aug 27 23:39:29 2011
@@ -72,7 +72,8 @@ public class VariableInt extends Variabl
       throw new ScriptException("- operand cannot be null");
     return new VariableInt(value - v.getIntValue());
   }
-    
+
+  
   public VariableReference asterisk(Variable v)
     throws ScriptException
   {
@@ -159,4 +160,10 @@ public class VariableInt extends Variabl
     return new VariableInt(value | v.getIntValue());
   }
 
+  public VariableReference unaryExclamation()
+    throws ScriptException
+  {
+    return new VariableInt(value ^ value);
+  }
+
 }

Modified: incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableResult.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableResult.java?rev=1162459&r1=1162458&r2=1162459&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableResult.java (original)
+++ incubator/lcf/trunk/framework/script-engine/src/main/java/org/apache/manifoldcf/scriptengine/VariableResult.java Sat Aug 27 23:39:29 2011
@@ -57,7 +57,7 @@ public class VariableResult extends Vari
       return new VariableBoolean(resultCode == 201);
     else if (attributeName.equals(ATTRIBUTE_NOTFOUNDSTATUS))
       return new VariableBoolean(resultCode == 404);
-    else if (attributeName.equals(ATTRIBUTE_RESULT))
+    else if (attributeName.equals(ATTRIBUTE_VALUE))
       return result;
     else
       return super.getAttribute(attributeName);

Modified: incubator/lcf/trunk/site/src/documentation/content/xdocs/how-to-build-and-deploy.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/site/src/documentation/content/xdocs/how-to-build-and-deploy.xml?rev=1162459&r1=1162458&r2=1162459&view=diff
==============================================================================
--- incubator/lcf/trunk/site/src/documentation/content/xdocs/how-to-build-and-deploy.xml (original)
+++ incubator/lcf/trunk/site/src/documentation/content/xdocs/how-to-build-and-deploy.xml Sat Aug 27 23:39:29 2011
@@ -83,6 +83,7 @@
           <tr><td><em>lib</em></td><td>jars for all the connector plugins, which should be referenced by the appropriate clause in the ManifoldCF configuration file</td></tr>
           <tr><td><em>wsdd</em></td><td>wsdd files that are needed by the included connectors in order to function</td></tr>
           <tr><td><em>xxx-process</em></td><td>scripts, classpath jars, and -D switch values needed for a required connector-specific process</td></tr>
+          <tr><td><em>script-engine</em></td><td>jars and scripts for running the ManifoldCF script interpreter</td></tr>
           <tr><td><em>example</em></td><td>a jetty-based example that runs in a single process (except for any connector-specific processes)</td></tr>
           <tr><td><em>doc</em></td><td>javadocs for framework and all included connectors</td></tr>
         </table>

Modified: incubator/lcf/trunk/site/src/documentation/content/xdocs/script.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/site/src/documentation/content/xdocs/script.xml?rev=1162459&r1=1162458&r2=1162459&view=diff
==============================================================================
--- incubator/lcf/trunk/site/src/documentation/content/xdocs/script.xml (original)
+++ incubator/lcf/trunk/site/src/documentation/content/xdocs/script.xml Sat Aug 27 23:39:29 2011
@@ -53,42 +53,282 @@ java -cp ... org.apache.manifoldcf.scrip
         and the ScriptParser will accordingly exit.  You can also type ^Z to terminate the script.</p>
       <p>If you use ScriptParser with a scripting file, that file will be read and interpreted.  The arguments you provide will be loaded into an array
         of strings, which is accessible from your script as the variable named <em>__args__</em>.</p>
-        <section>
-          <title>Running the scripting language by hand</title>
-          <p></p>
-          <p>When you build ManifoldCF, the required dependent jars for the scripting language are copied to <em>dist/script-engine/jar</em>.
-            You can run the interpreter in interactive mode by typing:</p>
-          <source>
+      <section>
+        <title>Running the script interpreter by hand</title>
+        <p></p>
+        <p>When you build ManifoldCF, the required dependent jars for the scripting language are copied to <em>dist/script-engine/jar</em>.
+          You can run the interpreter in interactive mode by typing:</p>
+        <source>
 cd dist
 script-engine\script\run-script.bat &lt;args&gt;
-          </source>
-          <p>Or, on Linux:</p>
-          <source>
+        </source>
+        <p>Or, on Linux:</p>
+        <source>
 cd dist
 script-engine/script/run-script.sh &lt;args&gt;
-          </source>
-        </section>
-        <section>
-          <title>Running the script interpreter using Ant</title>
-          <p></p>
-          <p>You can also start the script interpreter with all the correct required jars using Ant.  Simple type the following:</p>
-          <source>
+        </source>
+      </section>
+      <section>
+        <title>Running the script interpreter using Ant</title>
+        <p></p>
+        <p>You can also start the script interpreter with all the correct required jars using Ant.  Simple type the following:</p>
+        <source>
 ant run-script-interpreter
-          </source>
-          <p>This will start the script interpreter in interactive mode only.</p>
-        </section>
-        <section>
-          <title>Running the script interpreter using Maven</title>
-          <p></p>
-          <p>You can also run the script interpreter using maven.  The commands are:</p>
-          <source>
+        </source>
+        <p>This will start the script interpreter in interactive mode only.</p>
+      </section>
+      <section>
+        <title>Running the script interpreter using Maven</title>
+        <p></p>
+        <p>You can also run the script interpreter using maven.  The commands are:</p>
+        <source>
 cd framework/script-engine
 mvn exec:exec
-          </source>
-          <p>This, once again, will start the interpreter in interactive mode.</p>
-        </section>
+        </source>
+        <p>This, once again, will start the interpreter in interactive mode.</p>
+      </section>
     </section>
 
+    <section>
+      <title>Script language syntax</title>
+      <p></p>
+      <p>A ManifoldCF script is not sensitive to whitespace or indenting.  All comments begin with a '#' character and end with the end of that line.
+        Unquoted tokens can include alphanumeric characters, plus '_', '$', and '@'.  Numeric tokens always begin with a number ('0'-'9'), and are
+        considered floating-point if they include a decimal point ('.').  Otherwise they are integers.  String tokens can be quoted with either a double quote
+        ('"') or a single quote, and within strings characters can be escaped with a preceding backslash ('\').</p>
+      <p>A ManifoldCF script has a syntax that is readily described with a BNF grammar.  See below.</p>
+      <source>
+program:
+--&gt; statements
+  
+statements:
+--&gt; statement1 ... statementN
+
+statement:
+--&gt; 'set' expression '=' expression ';'
+--&gt; 'print' expression ';'
+--&gt; 'if' expression 'then' statements ['else' statements] ';'
+--&gt; 'while' expression 'do' statements ';'
+--&gt; 'break' ';'
+--&gt; 'error' expression ';'
+--&gt; 'insert' expression 'into' expression ['at' expression] ';'
+--&gt; 'remove' expression 'from' expression ';'
+--&gt; 'GET' expression '=' expression ';'
+--&gt; 'PUT' expression '=' expression 'to' expression ';'
+--&gt; 'POST' expression '=' expression 'to' expression ';'
+--&gt; 'DELETE' expression ';'
+
+expression:
+--&gt; '(' expression ')'
+--&gt; expression '&amp;&amp;' expression
+--&gt; expression '||' expression
+--&gt; '!' expression
+--&gt; expression '&amp;' expression
+--&gt; expression '|' expression
+--&gt; expression '==' expression
+--&gt; expression '!=' expression
+--&gt; expression '&gt;=' expression
+--&gt; expression '&lt;=' expression
+--&gt; expression '&gt;' expression
+--&gt; expression '&lt;' expression
+--&gt; expression '+' expression
+--&gt; expression '-' expression
+--&gt; expression '*' expression
+--&gt; expression '/' expression
+--&gt; '-' expression
+--&gt; '[' expression ',' ... expression ']'
+--&gt; '{' expression ',' ... expression '}'
+--&gt; '&lt;' expression ':' expression ':' expression '=' expression ',' ... expression '=' expression ':' expression ',' ... expression '&gt;'
+--&gt; expression '[' expression ']'
+--&gt; expression '.' token
+--&gt; token
+--&gt; string
+--&gt; number
+--&gt; 'true' | 'false'
+--&gt; 'null'
+--&gt; 'new' newexpression
+--&gt; 'isnull' expression
+
+newexpression:
+--&gt; 'url' expression
+--&gt; 'connectionname' expression
+
+      </source>  
+    </section>
+    
+    <section>
+      <title>Script language variables</title>
+      <p></p>
+      <p>Variables in the ManifoldCF scripting language determine the behavior of all aspects of expression evaluation, with the exception of operator precedence.
+        In particular, every canonical variable has the ability to support arbitrary <em>attributes</em> (which are named properties of the variable), 
+        <em>subscripts</em> (children which are accessed by a numeric subscript), and all other <em>operations</em>, such as '+' or '=='.  Not all kinds of
+        variable instance will in fact support all such features.  Should you try to use a feature with a variable that does not support it, you will receive a
+        ScriptException telling you what you did wrong.</p>
+      <p>Since the actual operation details are bound to the variable, for binary operations the left-hand variable typically determines what actually takes place.  For example:</p>
+      <source>
+print 3+7;
+     [java] 10
+print "3"+7;
+     [java] 37
+      </source>
+      <p>There is, of course, a way to caste a variable to a different type.  For example:</p>
+      <source>
+print "3".__int__+7;
+     [java] 10
+      </source>
+      <p>Here, we are using the built-in attribute <em>__int__</em> to obtain the integer equivalent of the original string variable "3".  See the following table for
+        a list of some of the standard attributes and their meanings:</p>
+      <table>
+        <caption>Standard attributes</caption>
+        <tr><th>Attribute name</th><th>Meaning</th></tr>
+        <tr><td>__script__</td><td>Returns the script code that would create this variable</td></tr>
+        <tr><td>__string__</td><td>Returns the string value of the variable, if any</td></tr>
+        <tr><td>__int__</td><td>Returns the integer value of the variable, if any</td></tr>
+        <tr><td>__float__</td><td>Returns the floating-point value of the variable, if any</td></tr>
+        <tr><td>__boolean__</td><td>Returns the boolean value of the variable, if any</td></tr>
+        <tr><td>__size__</td><td>Returns the number of subscript children</td></tr>
+        <tr><td>__name__</td><td>Returns the 'name' of the variable</td></tr>
+        <tr><td>__value__</td><td>Returns the 'value' of the variable</td></tr>
+        <tr><td>__OK__</td><td>Returns a boolean 'true' if the variable was "OK", false otherwise</td></tr>
+        <tr><td>__NOTFOUND__</td><td>Returns a boolean 'true' if the variable was "NOTFOUND", false otherwise</td></tr>
+        <tr><td>__CREATED__</td><td>Returns a boolean 'true' if the variable was "CREATED", false otherwise</td></tr>
+      </table>
+      <p>Obviously, only some variables will support each of the standard attributes.  You will receive a script exception if you try to obtain a non-existent
+        attribute for a variable.</p>
+      <section>
+        <title>Integers</title>
+        <p>Integer variable types are created by non-quoted numeric values that do not have a '.' in them.  For example, the character '4' will create an integer
+          variable type with a value of 4.</p>
+        <p>The operations supported for this variable type, and their meanings, are listed in the table below:</p>
+        <table>
+          <caption>Integer operations</caption>
+          <tr><th>Operation</th><th>Meaning</th><th>Example</th></tr>
+          <tr><td>binary +</td><td>Addition, yielding an integer</td><td>4+7</td></tr>
+          <tr><td>binary -</td><td>Subtraction, yielding an integer</td><td>7-4</td></tr>
+          <tr><td>binary *</td><td>Multiplication, yielding an integer</td><td>7*4</td></tr>
+          <tr><td>binary /</td><td>Division, yielding an integer</td><td>7/4</td></tr>
+          <tr><td>unary -</td><td>Negation, yielding an integer</td><td>-4</td></tr>
+          <tr><td>binary ==</td><td>Equality comparison, yielding a boolean</td><td>7 == 4</td></tr>
+          <tr><td>binary !=</td><td>Inequality comparison, yielding a boolean</td><td>7 != 4</td></tr>
+          <tr><td>binary &gt;=</td><td>Greater or equals comparison, yielding a boolean</td><td>7 &gt;= 4</td></tr>
+          <tr><td>binary &lt;=</td><td>Less or equals comparison, yielding a boolean</td><td>7 &lt;= 4</td></tr>
+          <tr><td>binary &gt;</td><td>Greater comparison, yielding a boolean</td><td>7 &gt; 4</td></tr>
+          <tr><td>binary &lt;</td><td>Less comparison, yielding a boolean</td><td>7 &lt; 4</td></tr>
+          <tr><td>binary &amp;</td><td>Bitwise AND, yielding an integer</td><td>7 &amp; 4</td></tr>
+          <tr><td>binary |</td><td>Bitwise OR, yielding an integer</td><td>7 | 4</td></tr>
+          <tr><td>unary !</td><td>Bitwise NOT, yielding an integer</td><td>! 7</td></tr>
+        </table>
+        <p>In addition, the standard attributes <em>__script__</em>, <em>__string__</em>, <em>__int__</em>, and <em>__float__</em> are supported 
+          by integer types.</p>
+      </section>
+      <section>
+        <title>Strings</title>
+        <p>String variable types are created by quoted sequences of characters.  For example, the character '"hello world"' will create a string
+          variable type with an (unquoted) value of "hello world".</p>
+        <p>The operations supported for this variable type, and their meanings, are listed in the table below:</p>
+        <table>
+          <caption>String operations</caption>
+          <tr><th>Operation</th><th>Meaning</th><th>Example</th></tr>
+          <tr><td>binary +</td><td>Concatenation, yielding a string</td><td>"hi" + "there"</td></tr>
+          <tr><td>binary ==</td><td>Equality comparison, yielding a boolean</td><td>"hi" == "there"</td></tr>
+          <tr><td>binary !=</td><td>Inequality comparison, yielding a boolean</td><td>"hi" != "there"</td></tr>
+        </table>
+        <p>In addition, the standard attributes <em>__script__</em>, <em>__string__</em>, <em>__int__</em>, and <em>__float__</em> are supported 
+          by string types.</p>
+      </section>
+      <section>
+        <title>Floating-point numbers</title>
+        <p>Float variable types are created by non-quoted numeric values that have a '.' in them.  For example, the token '4.1' will create a float
+          variable type with a value of 4.1</p>
+        <p>The operations supported for this variable type, and their meanings, are listed in the table below:</p>
+        <table>
+          <caption>Float operations</caption>
+          <tr><th>Operation</th><th>Meaning</th><th>Example</th></tr>
+          <tr><td>binary +</td><td>Addition, yielding a float</td><td>4.0+7.0</td></tr>
+          <tr><td>binary -</td><td>Subtraction, yielding a float</td><td>7.0-4.0</td></tr>
+          <tr><td>binary *</td><td>Multiplication, yielding a float</td><td>7.0*4.0</td></tr>
+          <tr><td>binary /</td><td>Division, yielding a float</td><td>7.0/4.0</td></tr>
+          <tr><td>unary -</td><td>Negation, yielding a float</td><td>-4.0</td></tr>
+          <tr><td>binary ==</td><td>Equality comparison, yielding a boolean</td><td>7.0 == 4.0</td></tr>
+          <tr><td>binary !=</td><td>Inequality comparison, yielding a boolean</td><td>7.0 != 4.0</td></tr>
+          <tr><td>binary &gt;=</td><td>Greater or equals comparison, yielding a boolean</td><td>7.0 &gt;= 4.0</td></tr>
+          <tr><td>binary &lt;=</td><td>Less or equals comparison, yielding a boolean</td><td>7.0 &lt;= 4.0</td></tr>
+          <tr><td>binary &gt;</td><td>Greater comparison, yielding a boolean</td><td>7.0 &gt; 4.0</td></tr>
+          <tr><td>binary &lt;</td><td>Less comparison, yielding a boolean</td><td>7.0 &lt; 4.0</td></tr>
+        </table>
+        <p>In addition, the standard attributes <em>__script__</em>, <em>__string__</em>, <em>__int__</em>, and <em>__float__</em> are supported 
+          by float types.</p>
+      </section>
+      <section>
+        <title>Booleans</title>
+        <p>Boolean variable types are created by the keywords 'true' and 'false'.  For example, the token 'true' will create a boolean
+          variable type with a value of "true".</p>
+        <p>The operations supported for this variable type, and their meanings, are listed in the table below:</p>
+        <table>
+          <caption>Boolean operations</caption>
+          <tr><th>Operation</th><th>Meaning</th><th>Example</th></tr>
+          <tr><td>binary ==</td><td>Equality comparison, yielding a boolean</td><td>7.0 == 4.0</td></tr>
+          <tr><td>binary !=</td><td>Inequality comparison, yielding a boolean</td><td>7.0 != 4.0</td></tr>
+          <tr><td>binary &amp;&amp;</td><td>AND logical operation, yielding a boolean</td><td>true &amp;&amp; false</td></tr>
+          <tr><td>binary ||</td><td>OR logical operation, yielding a boolean</td><td>true || false</td></tr>
+          <tr><td>binary &amp;</td><td>AND logical operation, yielding a boolean</td><td>true &amp; false</td></tr>
+          <tr><td>binary |</td><td>OR logical operation, yielding a boolean</td><td>true | false</td></tr>
+          <tr><td>unary !</td><td>NOT logical operation, yielding a boolean</td><td>! true</td></tr>
+        </table>
+        <p>In addition, the standard attributes <em>__script__</em> and <em>__boolean__</em> are supported 
+          by boolean types.</p>
+      </section>
+      <section>
+        <title>Arrays</title>
+        <p>Array variable types are created by an initializer of the form '[' expression ',' ... expression ']'.  For example, the code '[3, 4]' will create an array
+          variable type with two values,  the integer "3" and the integer "4".</p>
+        <p>The operations supported for this variable type, and their meanings, are listed in the table below:</p>
+        <table>
+          <caption>Array operations</caption>
+          <tr><th>Operation</th><th>Meaning</th><th>Example</th></tr>
+          <tr><td>subscript []</td><td>Find the specified subscript variable, yielding the variable</td><td>[3,4] [0]</td></tr>
+        </table>
+        <p>In addition, the standard attributes <em>__script__</em> and <em>__size__</em> are supported 
+          by array types.</p>
+      </section>
+      <section>
+        <title>Configurations</title>
+      </section>
+      <section>
+        <title>Configuration nodes</title>
+      </section>
+      <section>
+        <title>URLs</title>
+      </section>
+      <section>
+        <title>Connection names</title>
+      </section>
+      <section>
+        <title>Results</title>
+      </section>
+    </section>
+    
+    <section>
+      <title>Statements</title>
+      <p>The statements available to a ManifoldCF programmer are designed to support interaction with the ManifoldCF API.  Thus, there is support for
+        all four HTTP verbs, as well as basic variable setting and control flow.  The table below describes each statement type:</p>
+      <table>
+        <caption>Statement types</caption>
+        <tr><th>Statement</th><th>Meaning</th><th>Example</th></tr>
+        <tr><td>'set' expression '=' expression ';'</td><td>Sets the variable described by the first expression with the value computed for the second</td><td>set myvar = 4 + 5;</td></tr>
+        <tr><td>'print' expression ';'</td><td>Prints the string value of the expression to stdout</td><td>print "hello world";</td></tr>
+        <tr><td>'if' expression 'then' statements ['else' statements] ';'</td><td>If the boolean value of the expression is 'true', executes the first set of statements, otherwise executes the (optional) second set</td><td>if true then print "hello"; else print "there"; ;</td></tr>
+        <tr><td>'while' expression 'do' statements ';'</td><td>While expression is true, execute the specified statements, and repeat</td><td>while count > 0 do set count = count - 1; ;</td></tr>
+        <tr><td>'break' ';'</td><td>Exits from the nearest enclosing while loop</td><td>while true do break; ;</td></tr>
+        <tr><td>'error' expression ';'</td><td>Aborts the script with a script exception based on the string value of the expression</td><td>error "bad stuff";</td></tr>
+        <tr><td>'insert' expression 'into' expression ['at' expression] ';'</td><td>Inserts the first expression into the second variable expression, either at the end or optionally at the position specified by the third expression</td><td>insert 4 into myarray at 0 ;</td></tr>
+        <tr><td>'delete' expression 'from' expression ';'</td><td>Deletes the element described by the first expression from the second expression</td><td>delete 0 from myarray ;</td></tr>
+        <tr><td>'GET' expression '=' expression ';'</td><td>Perform an HTTP GET from the URL specified in the second expression capturing the result in the first expression</td><td>GET result = new url "http://localhost:8345/mcf-api-service/json/repositoryconnections" ;</td></tr>
+        <tr><td>'DELETE' expression '=' expression ';'</td><td>Perform an HTTP DELETE on the URL specified in the second expression capturing the result in the first expression</td><td>DELETE result = myurl ;</td></tr>
+        <tr><td>'PUT' expression '=' expression 'to' expression ';'</td><td>Perform an HTTP PUT of the second expression to the URL specified in the third expression capturing the result in the first expression</td><td>PUT result = configurationObject to myurl ;</td></tr>
+        <tr><td>'POST' expression '=' expression 'to' expression ';'</td><td>Perform an HTTP POST of the second expression to the URL specified in the third expression capturing the result in the first expression</td><td>POST result = configurationObject to myurl ;</td></tr>
+      </table>
+    </section>
   </body>
 
 </document>