public bool MovePostfixDown() { if (OldString.Count == 0) { return(false); } var temp = OldString[OldString.Count - 1]; if (temp.IsText) { return(false); } Postfix.Insert(0, temp); OldString.RemoveAt(OldString.Count - 1); return(true); }
public void MovePostfixDown() { if (OldString.Count == 0) { return; } var temp = OldString[OldString.Count - 1]; if (temp.IsText) { return; } Postfix.Insert(0, temp); Notify("Postfix"); OldString.RemoveAt(OldString.Count - 1); Notify("OldString"); }
//E2 -> O1 E1 | e bool E2() { if (now.word == "+" || now.word == "-" || now.word == "*" || now.word == "/") { b = O1(); if (b == false) { return(b); } b = E1(); return(b); } else if (now.word == ";" || now.word == "in") { InfixToPostfix(Infix); Postfix.Add(ee); Postfix.Insert(0, rr); PostfixTo_4_tuple(Postfix); Postfix = new ArrayList(); return(true); } else if (now.word == ">" || now.word == ">=" || now.word == "=") { InfixToPostfix(Infix); Postfix.Add(ee); Postfix.Insert(0, rr); PostfixTo_4_tuple(Postfix); Postfix = new ArrayList(); Infix = new ArrayList(); return(true); } else { return(false); } }