Exemplo n.º 1
0
        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())));
        }
Exemplo n.º 2
0
 override public void EnterNumericConst(NumericConstContext ctx)
 {
     base.EnterNumericConst(ctx);
 }