Skip to content

extraction: vendored COBOL grammar never terminates on a bare unterminated token #1104

Description

@ScriptedAlchemy

Found while proving #1062's end_line equivalence over line-ending shapes: the vendored COBOL tree-sitter grammar (tokensave-large-treesitters, lang-cobol) never terminates when parsing the bare input "x" with no trailing newline. The #1062 shape test therefore targets representative grammars rather than every bundled one.

Reproduce: in crates/tracedecay-code-extraction, parse "x" through the COBOL language (e.g. via ts_provider + CobolExtractor::extract_source, or a scratch test that calls Parser::parse with the COBOL language) — the parse does not return. Establish whether this is a grammar bug (external scanner loop on EOF without newline) in the upstream tree-sitter-cobol revision we vendor, and either bump to a fixed revision or guard at our boundary (the extraction path already has a parse deadline via CorpusParseDeadline; confirm that deadline actually fires for a scanner stuck in a loop — if it does not, that is the real defect, because a hung scanner would pin an indexer worker). Add the COBOL shape to the #1062 equivalence test once it terminates.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions