public Operation(String operand1, String operand2, int operand1Column, int operand2Column, TipoTk currentOperator, OperationPrecedence precedence) { this.operand1 = operand1; this.operand1Column = operand1Column; this.operand2 = operand2; this.operand2Column = operand2Column; this.alreadyVerified = false; this.currentOperator = currentOperator; this.precedence = precedence; this.result = null; this.calculateNow = false; }
private TipoTk GetTipo(string s) { TipoTk t = TipoTk.TkId; if (reservadas.Where(item => item.Key == s).Select(item => item.Key).ToString() != String.Empty) { try { t = reservadas[s]; } catch { if ((s[0].ToString().Equals("\"") && s[s.Length - 1].ToString().Equals("\"") || (s[0].ToString().Equals("'") && s[s.Length - 1].ToString().Equals("'")))) { t = TipoTk.TkCharConst; } else { bool isNumber = true; for (int i = 0; i < s.Length; i++) { isNumber = istNum(s[i]); } if (isNumber) { t = TipoTk.TkNumconst; } else { t = TipoTk.TkId; } } } } return(t); }