8000 Grammar: document or drop line comments and non-ASCII identifiers · Issue #650 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

Grammar: document or drop line comments and non-ASCII identifiers #650

Closed

Description

@adityamukho

Summary

The parser accepts two things the grammar (tests/grammar/grammar.pest, and so the EBNF) does not describe:

  • Line comments. ; to the end of the line is skipped (added in 19d0991). 1; parses as 1.
  • Non-ASCII letters and digits in symbols and keywords: the tokenizer uses char::is_alphanumeric, so :person/名前, ?ñ and F٣ are accepted. The grammar uses ASCII_ALPHANUMERIC.

Both are useful and likely used, so this is a documentation decision first: either document them in the grammar (add COMMENT to grammar.pest, widen word_cont and plain_sym), or restrict the parser.

Found by the grammar verifier (#643): the Comment and UnicodeLetter entries of KNOWN_DRIFT in src/query/datalog/parser/verifier.rs. The fix removes them.

Activity

  1. added this to the v3.0.0 milestone on Oct 20, 2026
  2. added a commit that references this issue on Oct 20, 2026
  3. adityamukho commented on Oct 20, 2026

    @adityamukho
    CollaboratorAuthor

    Fixed on v3 by #658: the grammar now documents line comments and Unicode identifiers.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0