public Combined(TokenList.Token start, TokenList.Token end) { TokenList.Token t = start; do { if (t.getVariable().getType() == VariableType.SCALAR) { sequences.Add(new Explicit(t)); } else if (t.getVariable().getType() == VariableType.INTEGER_SEQUENCE) { sequences.Add(((VariableIntegerSequence)t.getVariable()).sequence); } else { throw new InvalidOperationException("Unexpected token type"); } t = t.next; } while (t != null && t.previous != end); }
public Explicit(TokenList.Token start, TokenList.Token end) { TokenList.Token t = start; while (true) { sequence.Add((VariableInteger)t.getVariable()); if (t == end) { break; } else { t = t.next; } } }
public For(TokenList.Token start, TokenList.Token step, TokenList.Token end) { this.start = (VariableInteger)start.getVariable(); this.step = step == null ? null : (VariableInteger)step.getVariable(); this.end = (VariableInteger)end.getVariable(); }
public Range(TokenList.Token start, TokenList.Token step) { this.start = start == null ? null : (VariableInteger)start.getVariable(); this.step = step == null ? null : (VariableInteger)step.getVariable(); }
public Explicit(TokenList.Token single) { sequence.Add((VariableInteger)single.getVariable()); }