[papert commit] r123 - trunk/static

0 views
Skip to first unread message

codesite...@google.com

unread,
Feb 14, 2009, 3:08:42 PM2/14/09
to paper...@googlegroups.com
Author: thomas.figg
Date: Sat Feb 14 12:07:50 2009
New Revision: 123

Modified:
trunk/static/speech.html

Log:
adding crappy tokenizing to speech interface

Modified: trunk/static/speech.html
==============================================================================
--- trunk/static/speech.html (original)
+++ trunk/static/speech.html Sat Feb 14 12:07:50 2009
@@ -80,7 +80,29 @@
}
function change(code) {
if (code.match(/\n$/)) {
- run(15,true);
+ tos = code.match(/\bto\b/gi);
+ if (tos) { tos = tos.length } else {tos = 0}
+ ends = code.match(/\bend\b/gi);
+ if (ends) { ends = ends.length } else {ends = 0}
+ if (tos == ends) {
+
+ tos = code.match(/\[/g);
+ if (tos) { tos = tos.length } else {tos = 0}
+ ends = code.match(/\]/g);
+ if (ends) { ends = ends.length } else {ends = 0}
+
+ if (tos == ends) {
+ tos = code.match(/\(/g);
+ if (tos) { tos = tos.length } else {tos = 0}
+ ends = code.match(/\)/g);
+ if (ends) { ends = ends.length } else {ends = 0}
+
+ if (tos == ends) {
+
+ run(15,true);
+ }
+ }
+ }
}
}
</script>

Reply all
Reply to author
Forward
0 new messages