public static function tokenName($tokenType)
    {
        switch ($tokenType) {
            case self::T_UNDEFINED:
                return 'T_UNDEFINED';
            case self::T_OPEN_PARENS:
                return 'T_OPEN_PARENS';
            case self::T_CLOSE_PARENS:
                return 'T_CLOSE_PARENS';
            case self::T_OR:
                return 'T_OR';
            case self::T_AND:
                return 'T_AND';
            case self::T_QUERY:
                return 'T_QUERY';
            case self::T_SPACE:
                return 'T_SPACE';
            case self::T_TRUE:
                return 'T_TRUE';
            case self::T_FALSE:
                return 'T_FALSE';
            default:
                return '"' . (string) $tokenType . '"';
        }
    }