Skip to content

ctags_reader.py: CTAGS_FUNC_KINDS["yacc"] is empty -- ctags DOES tag every grammar rule (kind 'l'), comment claiming otherwise is wrong #2352

Closed

Description

@squid-protocol

Summary

tests/tools/ctags_reader.py's CTAGS_FUNC_KINDS["yacc"] was set(), with a comment claiming "ctags' YACC parser only tracks label/token, not grammar rule definitions -- ctags structurally cannot see them." That is factually wrong. ctags' YACC parser tags every grammar-rule LHS non-terminal with its own l (label) kind:

$ ctags -f - --fields=+K --sort=no language-crucible/data/yacc/freebsd/config.y
Configuration  config.y  /^Configuration:$/;"  label  line:116  language:YACC
Spec           config.y  /^Spec:$/;"           label  line:126  language:YACC
...  (20 total, one per rule)

ctags --list-kinds-full=YACC confirms l (labels) is the parser's only kind. The empty set meant every yacc rule was dropped before reconciliation ever saw it, so the tri-comparison chart showed GitGalaxy alone on 18 occurrences (yacc/function/existence/agree[gitgalaxy]_vs[ctags]) when ctags in fact agreed on all of them.

This is the same bug shape as several already-fixed kind-map gaps

  • cpp g (enum) — cpp/class/existence sweep
  • csharp g (enum)
  • fortran m,i,S,b (module/interface/submodule/block-data)
  • kotlin o (object)

In every case ctags parsed the construct fine; this map was just not forwarding the kind.

Fix

"yacc": {"l"} — same function-analog mapping precedent as makefile: {"t"} (targets) and assembly: {"l"} (labels). After the fix, GitGalaxy and ctags agree exactly on all 27 rules across the yacc corpus (config.y 20/20, jailparse.y 7/7).

Surfaced by the tri-comparison-ledger-sweep skill (2026-08-27).

Activity

  1. added
    bug
    testing
    core-engine
    on Aug 27, 2026
  2. added this to the v2.4.9 milestone on Aug 31, 2026
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

    bugcore-enginetesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions