public Computer(Stack inStk) { InStack=inStk; tk=new NumberToken(InStack,OutStack); tk.Next = new AddToken(InStack,OutStack); tk.Next.Next = new SubtractionToken(InStack,OutStack); tk.Next.Next.Next = new MultipToken(InStack,OutStack); tk.Next.Next.Next.Next = new DivisionToken(InStack,OutStack); }
public CompToken (Stack st,Stack stOut):base(st,stOut) { }
public DivisionToken(Stack st,Stack stOut):base(st,stOut) { token="/"; }
public MultipToken(Stack st,Stack stOut):base(st,stOut) { token="*"; }
public SubtractionToken(Stack st,Stack stOut):base(st,stOut) { token="-"; }
public AddToken(Stack st,Stack stOut):base(st,stOut) { token="+"; }
public OperatorToken(Stack st,Stack stOut,myOperator op):base(st,stOut) { this.ope = op; }
public TreatToken(Stack st,Stack stOut) { this.st=st; this.stOutput=stOut; }
public NumberToken(Stack st,Stack stOut):base(st,stOut) { }