Metadata-Version: 2.1
Name: chessql
Version: 3.0.1
Summary: Chess Query Language (cql) parser.
Author-email: Roger Marsh <roger.marsh@solentware.co.uk>
License: Licence for cql package
        Copyright (c) 2017, Roger Marsh
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        
        
        Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        
        Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
        
        Neither the name of the owner nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
        
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Homepage, http://www.solentware.co.uk
Project-URL: Repository, https://github.com/RogerMarsh/chessql.git
Project-URL: Bug Tracker, https://github.com/RogerMarsh/chessql/issues
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Topic :: Games/Entertainment :: Board Games
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 3 - Alpha
License-File: LICENCE

=================================
Chess Query Language (CQL) parser
=================================

.. contents::


Description
===========

This package provides a parser for Chess Query Language (`CQL`_).

The documentation for `CQL version 6.0.4`_ as found in first half of 2020, plus `CQL version 6.1`_ and `CQL version 6.2`_ as found in mid-2024, was used as a reference.

`CQLi`_ provides an alternative implementation of CQL-6.1 and a '-parse' option which gives output more easily compared with ChessQL output.

This package does not implement an evaluator to find games in a `PGN`_ file which match a query.


Installation Instructions
=========================

This package is available on PyPI so can be installed by typing

   python -m pip install --user chessql

at the command prompt.

See `Python`_ and `pip`_ documentation for alternatives and platform-specific points.


Use
===

Function core.parser.parse(<string>) returns a QueryContainer instance with the result of parsing a string usually read from a <*>.cql file.

Function core.parser.parse_command_line_query() returns a QueryContainer instance with the result of parsing a command line usually passed to the CQL executable.


Notes
=====

Version 3.0 of Chessql is incompatible with earlier versions.

An evaluator for some CQL constructs is implemented in `ChessTab`_.


.. _Python: https://python.org
.. _pip: https://packaging.python.org/installing
.. _CQL: http://www.gadycosteff.com
.. _PGN: http://www6.chessclub/help/PGN-spec
.. _CQL version 6.0.4: http://www.gadycosteff.com/cql-0-4
.. _CQL version 6.1: http://www.gadycosteff.com/cql-6.1
.. _CQL version 6.2: http://www.gadycosteff.com/cql
.. _CQLi: https://cql64.com
.. _ChessTab: http://www.solentware.co.uk/download.html
