static int decimalFromHex(char c)
    {
        switch (c)
        {
            case '0':
                return 0;
            case '1':
                return 1;
            case '2':
                return 2;
            case '3':
                return 3;
            case '4':
                return 4;
            case '5':
                return 5;
            case '6':
                return 6;
            case '7':
                return 7;
            case '8':
                return 8;
            case '9':
                return 9;
            case 'a':
            case 'A':
                return 10;
            case 'b':
            case 'B':
                return 11;
            case 'c':
            case 'C':
                return 12;
            case 'd':
            case 'D':
                return 13;
            case 'e':
            case 'E':
                return 14;
            case 'f':
            case 'F':
                return 15;
            default:
                throw new IllegalArgumentException("Not a hex character: " + c);
        }
    }
Creates the error/warning message that we need to show users/IDEs when ANTLR has found a parsing error, has
recovered from it and is now telling us that a parsing exception occurred.

@param tokenNames
           token names as known by ANTLR (which we ignore)
@param e
           The exception that was thrown
protostuff-parser/src/main/java/io/protostuff/parser/AbstractParser.java