// Expected BitSet / not BitSet
 public MismatchedCharException(char c, BitSet set_, boolean matchNot, CharScanner scanner_) {
   super("Mismatched char", scanner_.getFilename(), scanner_.getLine(), scanner_.getColumn());
   mismatchType = matchNot ? NOT_SET : SET;
   foundChar = c;
   set = set_;
   scanner = scanner_;
 }
 // Expected token / not token
 public MismatchedCharException(char c, char expecting_, boolean matchNot, CharScanner scanner_) {
   super("Mismatched char", scanner_.getFilename(), scanner_.getLine(), scanner_.getColumn());
   mismatchType = matchNot ? NOT_CHAR : CHAR;
   foundChar = c;
   expecting = expecting_;
   scanner = scanner_;
 }
 // Expected range / not range
 public MismatchedCharException(
     char c, char lower, char upper_, boolean matchNot, CharScanner scanner_) {
   super("Mismatched char", scanner_.getFilename(), scanner_.getLine(), scanner_.getColumn());
   mismatchType = matchNot ? NOT_RANGE : RANGE;
   foundChar = c;
   expecting = lower;
   upper = upper_;
   scanner = scanner_;
 }
Ejemplo n.º 4
0
 public Number toIntegerWrapper() {
   if (CharScanner.isInteger(buffer, 0, location)) {
     return intValue();
   } else {
     return longValue();
   }
 }
Ejemplo n.º 5
0
 public long longValue() {
   return CharScanner.parseLongFromTo(buffer, 0, location);
 }
Ejemplo n.º 6
0
 public int intValue() {
   return CharScanner.parseIntFromTo(buffer, 0, location);
 }
Ejemplo n.º 7
0
 public float floatValue() {
   return CharScanner.parseFloat(this.buffer, 0, location);
 }
Ejemplo n.º 8
0
 public double doubleValue() {
   return CharScanner.parseDouble(this.buffer, 0, location);
 }