private Operator getOperator(Postfix token) { int operatorLen = operators.Count; for (int i = 0; i < operatorLen; i++) { if (token.item == operators[i].Name) return operators[i]; } return null; }
private Operator getOperator(Postfix postfixItem) { String token = postfixItem.item; int operatorLen = operators.Count; for (int i = 0; i < operatorLen; i++) { if (token == operators[i].Name) return operators[i]; } return null; }
private Operator getOperator(Postfix token) { int operatorLen = operators.Count; for (int i = 0; i < operatorLen; i++) { if (token.item == operators[i].Name) { return(operators[i]); } } return(null); }
private Operator getOperator(Postfix postfixItem) { String token = postfixItem.item; int operatorLen = operators.Count; for (int i = 0; i < operatorLen; i++) { if (token == operators[i].Name) { return(operators[i]); } } return(null); }
private bool processPostfix() { try { preProcess(1); List <List <String> > output = new Postfix().process(postfix); tacText = output[0]; quadText = output[1]; saveFileDialog1.FileName = "quadruple.txt"; saveFileDialog1.ShowDialog(); saveFileDialog2.FileName = "three addess code.txt"; saveFileDialog2.ShowDialog(); } catch (Exception) { MessageBox.Show("Error occured. Invalid input might be the cause of this.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error); throw; } return(true); }
private bool processPostfix() { try { preProcess(1); List<List<String>> output = new Postfix().process(postfix); tacText = output[0]; quadText = output[1]; saveFileDialog1.FileName = "quadruple.txt"; saveFileDialog1.ShowDialog(); saveFileDialog2.FileName = "three addess code.txt"; saveFileDialog2.ShowDialog(); } catch (Exception) { MessageBox.Show("Error occured. Invalid input might be the cause of this.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error); throw; } return true; }