commit 39cbabf7122654345332127501a2b915cd76a674
parent e95187f534b20d9d6d10d2fe526fb434fd3382b8
Author: Adam M <[email protected]>
Date: Thu, 3 Jan 2019 23:16:59 -0600
Absolute and Laundry sequence inError state
Diffstat:
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/dtpulse.cpp b/src/dtpulse.cpp
@@ -401,13 +401,16 @@ LaundrySoupSequence::LaundrySoupSequence(std::string expr) {
p.setForLaundry();
if(p.inError || !p.tokenStack.size()) {
tokenStack = defaultStack;
+ inError=true;
}
else {
tokenStack = p.tokenStack;
+ inError=false;
}
}
else {
tokenStack = defaultStack;
+ inError=false;
}
pulseSequence = makePulseSequence(tokenStack);
workingPulseSequence = duplicateIntVector(pulseSequence);
@@ -471,13 +474,16 @@ AbsoluteSequence::AbsoluteSequence(std::string expr, std::string lookup) {
randomTokens=p.randomVector;
if(p.inError || !p.tokenStack.size()) {
tokenStack = defaultStack;
+ inError = true;
}
else {
tokenStack = p.tokenStack;
+ inError=false;
}
}
else {
tokenStack = defaultStack;
+ inError=false;
}
numTokens = tokenStack.size();
indexSequence = getIndicesFromTokenStack(tokenStack);
diff --git a/src/dtpulse.hpp b/src/dtpulse.hpp
@@ -83,6 +83,7 @@ class AbsoluteSequence {
int readHead;
int numTokens;
void print();
+ bool inError;
void skipStep();
int peekStep();
int peekWorkingStep();
@@ -102,6 +103,7 @@ class LaundrySoupSequence {
std::vector<int> makePulseSequence(std::vector<Token> tokens);
int readHead;
int numSteps;
+ bool inError;
void print();
int peekStep();
void skipStep();