public override void Visit(IRBracketToken t) { // Get operators of subexpression List <IToken> subExpOperators = Utills.MoveUntil(m_operators, m_lbracketPr); // Add operators to the result(RPN) list m_resultTokens.AddRange(subExpOperators); // Remove left bracket m_operators.Pop(); // Function check if (m_operators.Count != 0 && Utills.Check(m_operators, m_funcNamePr)) { m_resultTokens.Add(m_operators.Pop()); } }
private bool CheckUnaryOp(Position pos) { Position prevPos = pos - 1; // If <UnaryOp> is a first character if (prevPos.IsBegin) { return(true); } // If <UnaryOp> located after the left bracket ')' if (Utills.Check(pos - 1, lbracketPr) && Tables.UnaryOperatorsPriorityTable.ContainsKey(pos.Current)) { return(true); } else { return(false); } }
public override bool Check(Position pos) { return(Utills.Check(pos, rbracketPr)); }
public override bool Check(Position pos) { return(Utills.Check(pos, digitPr)); }
public override bool Check(Position pos) { return(!(Utills.Check(pos, notErrorPr))); }
public override bool Check(Position pos) { return(Utills.Check(pos, beginVarPr)); }
public override bool Check(Position pos) { return(Utills.Check(pos, semicolonPr)); }