summaryrefslogtreecommitdiff
path: root/javascripts/State.js
diff options
context:
space:
mode:
Diffstat (limited to 'javascripts/State.js')
-rw-r--r--javascripts/State.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/javascripts/State.js b/javascripts/State.js
new file mode 100644
index 0000000..75258e7
--- /dev/null
+++ b/javascripts/State.js
@@ -0,0 +1,20 @@
+/*
+ * State
+ *
+ */
+function State(symbol) {
+ if(!symbol) {
+ symbol = EPSILON;
+ }
+ this.symbol = symbol;
+ this.followUps = [];
+ this.marked = false;
+}
+
+State.prototype.mark = function(mark) { this.marked = mark }
+State.prototype.getFollowUp = function(index) { return this.followUps[index] }
+State.prototype.setFollowUp = function(index, state) {
+ if (!((index == 0) || (index==1)) ) return;
+ this.followUps[index] = state;
+}
+