示例#1
0
  public void parse() {
    digits = digit_expr.pos_int_const();
    scale = scale_expr.pos_int_const();

    if ((scale < 0) || (digits <= 0) || (scale > digits)) {
      parser.error(
          "Error in fixed point type "
              + typeName()
              + ", invalid format: <"
              + digits
              + ","
              + scale
              + ">");
    }
  }
示例#2
0
 int pos_int_const() {
   if (!int_const_set) {
     pos_int_const = const_expr.pos_int_const();
     int_const_set = true;
   }
   return pos_int_const;
 }