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>