// 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 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 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_; }