diff --git a/docs/RiveScript-WD.html b/docs/RiveScript-WD.html index 0729b25..5c9d1fb 100644 --- a/docs/RiveScript-WD.html +++ b/docs/RiveScript-WD.html @@ -117,7 +117,7 @@
RiveScript::WD - RiveScript 2.00 Working Draft (2009/07/30)
+RiveScript::WD - RiveScript 2.00 Working Draft (2014/11/30)
The <env>
tag allows assignment as well (which deprecates the old {!...}
tag.
The <env>
tag allows assignment as well (which deprecates the old {!...}
tag).
+ turn debug mode on
* <get master> == true => <env debug=1>Debug mode enabled.
@@ -1181,23 +1181,37 @@ Within Replies
\\ #
\# #
{random} # Random text insertion (which may contain other tags)
- <bot> # Insert bot variables
- <env> # Insert environment variables
<person> # String modifiers
<formal> #
<sentence> #
<uppercase> #
<lowercase> #
- <set> # User variable modifiers
- <add> #
- <sub> #
- <mult> #
- <div> #
- <get> # Get user variables
+ <bot>* # Insert bot variables
+ <env>* # Insert environment variables
+ <set>* # User variable modifiers
+ <add>* #
+ <sub>* #
+ <mult>* #
+ <div>* #
+ <get>* # Get user variables
{topic} # Set user topic
<@> # Inline redirection
<call> # Object macros.
+* The variable manipulation tags should all be processed "at the same time", not in any particular order. This will allow, for example, the following sort of trigger to work:
+ + + my name is *
+ * <get name> != undefined =>
+ ^ <set oldname=<get name>>I thought your name was <get oldname>?
+ ^ <set name=<formal>>
+ - <set name=<formal>>Nice to meet you.
+
+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.
+ +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:
+ + /<([^<]+?)>/
+
RiveScript 2.00 will have limited backwards compatibility with RiveScript 1.x documents. Here is a full breakdown of the differences:
@@ -1252,7 +1266,10 @@ Rev 11 - Jun 13, 2013
+ Rev 12 - Nov 30, 2014
+ - Added implementation guidelines for dealing with variable-setting tags.
+
+ Rev 11 - Jun 13, 2013
- Clarify the ability for the <bot> and <env> tags to be used for assignment.
Rev 10 - May 15, 2012
diff --git a/docs/RiveScript.html b/docs/RiveScript.html
index 1349c22..240c9dc 100644
--- a/docs/RiveScript.html
+++ b/docs/RiveScript.html
@@ -431,7 +431,11 @@ SEE ALSO
CHANGES
- 1.38 Jul 21 2015
+ 1.40 Oct 10 2015
+ - Fix the regexp used when matching optionals so that the triggers don't match
+ on inputs where they shouldn't. (RiveScript-JS issue #46)
+
+ 1.38 Jul 21 2015
- New algorithm for handling variable tags (<get>, <set>, <add>, <sub>,
<mult>, <div>, <bot> and <env>) that allows for iterative nesting of these
tags (for example, <set copy=<get orig>> will work now).