Skip to content

Commit

Permalink
Rebuild documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kirsle committed Oct 11, 2015
1 parent 9624e7d commit 545b901
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
39 changes: 28 additions & 11 deletions docs/RiveScript-WD.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@

<h1 id="NAME">NAME</h1>

<p>RiveScript::WD - RiveScript 2.00 Working Draft (2009/07/30)</p>
<p>RiveScript::WD - RiveScript 2.00 Working Draft (2014/11/30)</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

Expand Down Expand Up @@ -924,7 +924,7 @@ <h2 id="env">&lt;env&gt;</h2>
* &lt;env debug&gt; == 1 =&gt; Yes, debug mode is active.
- No, debug mode is set to &quot;&lt;env debug&gt;&quot;</code></pre>

<p>The <code>&lt;env&gt;</code> tag allows assignment as well (which deprecates the old <code>{!...}</code> tag.</p>
<p>The <code>&lt;env&gt;</code> tag allows assignment as well (which deprecates the old <code>{!...}</code> tag).</p>

<pre><code> + turn debug mode on
* &lt;get master&gt; == true =&gt; &lt;env debug=1&gt;Debug mode enabled.
Expand Down Expand Up @@ -1181,23 +1181,37 @@ <h3 id="Within-Replies">Within Replies</h3>
\\ #
\# #
{random} # Random text insertion (which may contain other tags)
&lt;bot&gt; # Insert bot variables
&lt;env&gt; # Insert environment variables
&lt;person&gt; # String modifiers
&lt;formal&gt; #
&lt;sentence&gt; #
&lt;uppercase&gt; #
&lt;lowercase&gt; #
&lt;set&gt; # User variable modifiers
&lt;add&gt; #
&lt;sub&gt; #
&lt;mult&gt; #
&lt;div&gt; #
&lt;get&gt; # Get user variables
&lt;bot&gt;* # Insert bot variables
&lt;env&gt;* # Insert environment variables
&lt;set&gt;* # User variable modifiers
&lt;add&gt;* #
&lt;sub&gt;* #
&lt;mult&gt;* #
&lt;div&gt;* #
&lt;get&gt;* # Get user variables
{topic} # Set user topic
&lt;@&gt; # Inline redirection
&lt;call&gt; # Object macros.</code></pre>

<p>* The variable manipulation tags should all be processed &quot;at the same time&quot;, not in any particular order. This will allow, for example, the following sort of trigger to work:</p>

<pre><code> + my name is *
* &lt;get name&gt; != undefined =&gt;
^ &lt;set oldname=&lt;get name&gt;&gt;I thought your name was &lt;get oldname&gt;?
^ &lt;set name=&lt;formal&gt;&gt;
- &lt;set name=&lt;formal&gt;&gt;Nice to meet you.</code></pre>

<p>In older implementations of RiveScript, `set` tags were processed earlier than `get` making it impossible to copy variables. Implementations should process this group of tags from the most-embedded outward.</p>

<p>An easy way to do this is with a regular expression that matches a tag that contains no other tag, and make multiple passes until no tags remain that match the regexp:</p>

<pre><code> /&lt;([^&lt;]+?)&gt;/</code></pre>

<h1 id="REVERSE-COMPATIBILITY">REVERSE COMPATIBILITY</h1>

<p>RiveScript 2.00 will have limited backwards compatibility with RiveScript 1.x documents. Here is a full breakdown of the differences:</p>
Expand Down Expand Up @@ -1252,7 +1266,10 @@ <h1 id="REVERSE-COMPATIBILITY">REVERSE COMPATIBILITY</h1>

<h1 id="REVISIONS">REVISIONS</h1>

<pre><code> Rev 11 - Jun 13, 2013
<pre><code> Rev 12 - Nov 30, 2014
- Added implementation guidelines for dealing with variable-setting tags.

Rev 11 - Jun 13, 2013
- Clarify the ability for the &lt;bot&gt; and &lt;env&gt; tags to be used for assignment.

Rev 10 - May 15, 2012
Expand Down
6 changes: 5 additions & 1 deletion docs/RiveScript.html
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,11 @@ <h1 id="SEE-ALSO">SEE ALSO</h1>

<h1 id="CHANGES">CHANGES</h1>

<pre><code> 1.38 Jul 21 2015
<pre><code> 1.40 Oct 10 2015
- Fix the regexp used when matching optionals so that the triggers don&#39;t match
on inputs where they shouldn&#39;t. (RiveScript-JS issue #46)

1.38 Jul 21 2015
- New algorithm for handling variable tags (&lt;get&gt;, &lt;set&gt;, &lt;add&gt;, &lt;sub&gt;,
&lt;mult&gt;, &lt;div&gt;, &lt;bot&gt; and &lt;env&gt;) that allows for iterative nesting of these
tags (for example, &lt;set copy=&lt;get orig&gt;&gt; will work now).
Expand Down

0 comments on commit 545b901

Please sign in to comment.