Skip to content

Examples needed #1

Open
Open

Description

@JRemolar

Hello, I want to use it on my python script but I don't know how to. Can you add a readme or examples of use?

Activity

  1. RogerMarsh commented on Jul 24, 2024

    @RogerMarsh
    Owner

    Did not notice this last time I did major work back in Nov 2022.

    Briefly it should accept queries as defined in version 6.0.4 of CQL. Home page is http://gadycosteff.com/cql/ but that has moved on to version 6.2 with a back-link as far as version 6.1.

    At 6.2 the source code is available for download by default, no need to ask the authors, and because I see it build and run on OpenBSD, FreeBSD, and Debian (the sample Linux) it seems the command 'cql -parse -cql "statement"' run in a subprocess is a reasonable way to get a repr-like definition of the tokens and AST. (Binary downloads are available only for Windows and MAC.)

    Version 6.1 http://www.gadycosteff.com/cql-6-1/ (I did not know this existed) mentions CQLi which has documentation in manual.pdf which looks worth having.

    Plan is to see if chessql can be made to provide useful stuff with tokens supplied by the -parse option rather than 'tokens invented here', reverting to adding to existing stuff if forced. In practice that means 'will it do for chesstab'.

  2. self-assigned this
    on Jul 24, 2024
  3. RogerMarsh commented on Feb 1, 2025

    @RogerMarsh
    Owner

    Commit ca33b23 parses the examples supplied with CQL 6.0.4 and CQL 6.1 but fails to parse the following examples supplied with CQL 6.2 in the examples and examples-ascii directories:

    babson3, checkcheckcheckstalemate, clearance-delayed, consecutive-checks-by-one-color, consecutive-checks, forced-moves-either-side, greek-gift, indian, lacny, likeinterference, rookleapcorners, and rundlaufe.

    All but lacny are made to parse successfully by appending a newline to the example. However it is thought clearance-delayed would fail to parse except for incorrectly parsing the final '///' filter.

    The 'path' and '///' filters, added at CQL 6.2, are terminated by '\n\n' and '\n' respectively assuming all filters following 'path' or '///' on the line are ok. Simple tests with the 'cql -parse' option suggest filter sequences such as 'path ... path ... /// ... path ... \n\n' or 'path ... /// ... \n ... path ... /// ... \n\n' or '/// "comment" \n' are allowed. '/// ... /// ... \n' is not allowed. Prior to CQL 6.2 '\n' was whitespace except for terminating a single line comment: now it is a terminator of filters where 'path' and '///' are involved.

  4. RogerMarsh commented on Feb 5, 2025

    @RogerMarsh
    Owner

    Commit d33c52f parses the examples supplied with CQL 6.0.4, CQL 6.1 and CQL 6.2, but does not handle the '--' (utf8 '―') filter, introduced at CQL 6.2, correctly.

    The initial question is why are six '--' filters found in the babson1 example when only two are in the text.

    The second question is why adjusting the babson1 example so the '--' filters are not in the body of a function causes the correct number of '--' filters to be seen (two not six).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions