Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
48a6fae
codex: add c parser roadmap docs
saidctb May 20, 2026
4950ad7
codex: merge c parser roadmap
saidctb May 20, 2026
923a992
codex: mark c parser roadmap setup complete
saidctb May 20, 2026
4e40993
codex: merge c parser roadmap completion
saidctb May 20, 2026
b612cb0
codex: clarify c parser preprocessing and callbacks
saidctb May 20, 2026
239e372
codex: merge c parser preprocessing and callback policy
saidctb May 20, 2026
f48a2b1
codex: add c parser main merge guard
saidctb May 20, 2026
f744891
codex: merge c parser main merge guard
saidctb May 20, 2026
8ad5437
codex: add skipped c parser test roadmap
saidctb May 20, 2026
dc77b23
codex: merge skipped c parser test roadmap
saidctb May 20, 2026
ca9f385
Merge pull request #12 from PyNumLab/main
saidctb May 21, 2026
dc3b76c
codex: align c parser roadmap with semantic readiness
saidctb May 21, 2026
47e390d
codex: add C parser skeleton CLI
saidctb May 21, 2026
d314b80
Merge pull request #13 from PyNumLab/codex/c-parser-skeleton-cli
saidctb May 21, 2026
524ee52
codex: add C parser raw metadata foundation
saidctb May 22, 2026
583be8e
Merge pull request #14 from PyNumLab/c-parser/preprocessing
saidctb May 22, 2026
c103249
codex: add partial c parser declarations and functions
saidctb May 22, 2026
a35b87c
Merge pull request #15 from PyNumLab/c-parser/partial-declarations-fu…
saidctb May 22, 2026
48c14c3
codex: add C fixture scaffolding and raw metadata coverage
saidctb May 22, 2026
99b51a2
Merge pull request #16 from PyNumLab/c-parser/general-fixtures-and-me…
saidctb May 22, 2026
7e81f52
codex: add C function definition start and end locations
saidctb May 22, 2026
2050c08
Merge pull request #17 from PyNumLab/c-parser/function-start-end-loca…
saidctb May 22, 2026
19706a4
codex: add forward struct declarations
saidctb May 22, 2026
2e61202
declarations
saidctb May 23, 2026
99e701d
Merge pull request #18 from PyNumLab/c-parser/forward-struct-declarat…
saidctb May 23, 2026
3b2b493
add pyi specification
saidctb May 24, 2026
35d9024
codex: reject invalid C primitive specifier sequences
saidctb May 24, 2026
9afdcba
Merge pull request #19 from PyNumLab/codex/c-parser-invalid-specifier…
saidctb May 24, 2026
44c06f9
codex: harden C aggregate member parsing
saidctb May 24, 2026
7d4d360
Merge pull request #20 from PyNumLab/codex/c-parser-aggregate-member-…
saidctb May 24, 2026
8bcf362
codex: implement C parameter adjustment
saidctb May 24, 2026
e643654
Merge pull request #21 from PyNumLab/codex/c-parser-parameter-adjustment
saidctb May 24, 2026
9aa8feb
codex: add C project resolution and redeclaration handling
saidctb May 24, 2026
55f50f2
Merge pull request #22 from PyNumLab/c-parser/project-resolution-rede…
saidctb May 24, 2026
b792818
codex: cleanup unsupported declaration diagnostics
saidctb May 24, 2026
e95c515
codex: update c parser diagnostics checklist
saidctb May 24, 2026
b1d392e
codex: update c parser checklist progress
saidctb May 24, 2026
4dae02f
Merge pull request #23 from PyNumLab/codex/c-declaration-diagnostics-…
saidctb May 24, 2026
2ecb3f1
add json data c files
saidctb May 24, 2026
9594c96
codex: add grouped C parser golden workflow
saidctb May 24, 2026
3a295fe
Merge pull request #24 from PyNumLab/c-parser/project-golden-workflow
saidctb May 24, 2026
7a43577
codex: clean up stale C parser skipped tests
saidctb May 24, 2026
187494e
Merge pull request #25 from PyNumLab/c-parser/skipped-test-cleanup
saidctb May 24, 2026
9a0cd59
codex: remove C parser golden update path from tests
saidctb May 24, 2026
1720815
Merge pull request #27 from PyNumLab/tests
saidctb May 24, 2026
291a0d2
codex: restore c golden update mode
saidctb May 24, 2026
f31bf6d
Merge pull request #28 from PyNumLab/codex-c-golden-update-mode
saidctb May 24, 2026
2d23d1d
codex: advance c parser diagnostics checklist
saidctb May 24, 2026
9f926bc
Merge pull request #29 from PyNumLab/codex-c-parser-checklist-diagnos…
saidctb May 24, 2026
0ad7658
codex: prepare parser probes and merge docs
saidctb May 25, 2026
74a4ea4
codex: refresh c parser docs backlog
saidctb May 25, 2026
76a970a
Merge pull request #30 from PyNumLab/codex-c-parser-probe-cleanup
saidctb May 25, 2026
8adf587
reorganize the docs
saidctb May 25, 2026
98320f6
update the pyi_format
saidctb May 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env sh
set -eu

branch=$(git branch --show-current)

if [ "$branch" != "main" ]; then
exit 0
fi

changed=$(git diff --cached --name-only)

if printf '%s\n' "$changed" | grep -Eq '^(\.github/workflows/c-parser-main-guard\.yml|\.githooks/|docs/c_parser/|c_parser/|tests/(c_parser|parser/c|data/c)/|semantics/c2ir\.py)'; then
cat >&2 <<'MSG'
Blocked: C parser files are staged on main.

Work on c-parser/main or a c-parser/* branch instead. The final main merge
requires the C parser readiness checklist to be complete and explicit approval.
MSG
exit 1
fi
24 changes: 24 additions & 0 deletions .githooks/pre-merge-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env sh
set -eu

branch=$(git branch --show-current)

if [ "$branch" != "main" ]; then
exit 0
fi

if ! git rev-parse -q --verify MERGE_HEAD >/dev/null; then
exit 0
fi

merge_head=$(git rev-parse MERGE_HEAD)

if git branch --all --contains "$merge_head" | grep -Eq '(^|[[:space:]])(remotes/origin/)?c-parser/'; then
cat >&2 <<'MSG'
Blocked: attempting to merge a c-parser/* branch into main.

Merge C parser work into c-parser/main only. The final main merge requires the
C parser readiness checklist to be complete and explicit approval.
MSG
exit 1
fi
42 changes: 42 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env sh
set -eu

current_branch=$(git branch --show-current)

while read -r local_ref local_sha remote_ref remote_sha
do
case "$remote_ref" in
refs/heads/main)
;;
*)
continue
;;
esac

if printf '%s\n' "$current_branch" | grep -Eq '^c-parser/'; then
cat >&2 <<'MSG'
Blocked: refusing to push a c-parser/* branch to remote main.

Push C parser work to c-parser/main or another c-parser/* branch only.
MSG
exit 1
fi

if [ "$remote_sha" = "0000000000000000000000000000000000000000" ]; then
range="$local_sha"
else
range="$remote_sha..$local_sha"
fi

changed=$(git diff --name-only "$range")

if printf '%s\n' "$changed" | grep -Eq '^(\.github/workflows/c-parser-main-guard\.yml|\.githooks/|docs/c_parser/|c_parser/|tests/(c_parser|parser/c|data/c)/|semantics/c2ir\.py)'; then
cat >&2 <<'MSG'
Blocked: refusing to push C parser files to remote main.

Push C parser work to c-parser/main. The final main merge requires the C parser
readiness checklist to be complete and explicit approval.
MSG
exit 1
fi
done
59 changes: 59 additions & 0 deletions .github/workflows/c-parser-main-guard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: C Parser Main Guard

on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]

jobs:
c-parser-main-guard:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Reject premature C parser work targeting main
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_REF: ${{ github.event.pull_request.head.ref }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ',') }}
run: |
set -euo pipefail

if [ "$BASE_REF" != "main" ]; then
echo "PR does not target main; C parser main guard does not apply."
exit 0
fi

ALLOW_LABEL="c-parser-ready-for-main"

if echo ",${PR_LABELS}," | grep -Fq ",${ALLOW_LABEL},"; then
echo "${ALLOW_LABEL} label present; allowing C parser merge candidate."
exit 0
fi

CHANGED_FILES=$(git diff --name-only "$BASE_SHA" "$HEAD_SHA")

echo "Base branch: $BASE_REF"
echo "Head branch: $HEAD_REF"
echo "Changed files:"
echo "$CHANGED_FILES"

C_PARSER_PATH_PATTERN='^(\.github/workflows/c-parser-main-guard\.yml|\.githooks/|docs/c_parser/|c_parser/|tests/(c_parser|parser/c|data/c)/|semantics/c2ir\.py)'

if echo "$HEAD_REF" | grep -Eq '^c-parser/'; then
echo "C parser branches must not target main before the C parser is ready."
echo "Target c-parser/main instead, or add ${ALLOW_LABEL} only for the final approved merge."
exit 1
fi

if echo "$CHANGED_FILES" | grep -Eq "$C_PARSER_PATH_PATTERN"; then
echo "C parser files changed in a PR targeting main."
echo "Target c-parser/main instead, or add ${ALLOW_LABEL} only for the final approved merge."
exit 1
fi

echo "No C parser branch or C parser paths detected in a PR targeting main."
6 changes: 3 additions & 3 deletions .github/workflows/parser-reference-guard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
fi

DOC_CHANGED=false
if echo "$CHANGED_FILES" | grep -Fxq "parser_implementation_reference.md"; then
if echo "$CHANGED_FILES" | grep -Fxq "docs/fortran/parser_implementation_reference.md"; then
DOC_CHANGED=true
fi

Expand All @@ -60,12 +60,12 @@ jobs:
fi

if [ "$DOC_CHANGED" = true ]; then
echo "parser_implementation_reference.md changed."
echo "docs/fortran/parser_implementation_reference.md changed."
exit 0
fi

if echo "$CHANGED_FILES" | grep -Eq "^(fortran_parser/|tests/parser/|tests/data/fortran/)"; then
echo "Parser-related files changed without updating parser_implementation_reference.md."
echo "Parser-related files changed without updating docs/fortran/parser_implementation_reference.md."
exit 1
fi

Expand Down
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Ignore:
- *.f90
- *.f95
- *.for
- *.c
- *.h
- *.json

Do not spend context window or analysis on those files unless explicitly requested.
Expand Down
99 changes: 0 additions & 99 deletions CLAUDE.md

This file was deleted.

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

### Parser reference guard

This repo includes a CI guard that may require updating `parser_implementation_reference.md` when parser-related files change.
This repo includes a CI guard that may require updating `docs/fortran/parser_implementation_reference.md` when parser-related files change.

- **Default behavior**: if you change `fortran_parser/` or `tests/data/fortran/`, update `parser_implementation_reference.md` when the change affects the documented feature inventory or behavior.
- **Default behavior**: if you change `fortran_parser/` or `tests/data/fortran/`, update `docs/fortran/parser_implementation_reference.md` when the change affects the documented feature inventory or behavior.
- **Bypass (use sparingly)**: add the PR label `ignore-parser-reference-guard` to skip that guard for changes that do not meaningfully affect the reference.
Loading
Loading