override public void ExitNumericConst(NumericConstContext ctx) { //DecimalFormatSymbols symbols = new DecimalFormatSymbols(); //symbols.setDecimalSeparator('.'); //String pattern = "#0.0#"; //DecimalFormat decimalFormat = new DecimalFormat(pattern, symbols); //decimalFormat.setParseBigDecimal(true); //BigDecimal value; //try //{ // value = (BigDecimal)decimalFormat.parse(ctx.GetText()); //} //catch (ParseException e) //{ // throw new RuntimeException(e); //} this.arithmeticExpressions.Push(new NumericConstant(Decimal.Parse(ctx.GetText()))); }
override public void EnterNumericConst(NumericConstContext ctx) { base.EnterNumericConst(ctx); }