Skip to content

codex: add partial c parser declarations and functions - #15

Merged
saidctb merged 1 commit into
c-parser/mainfrom
c-parser/partial-declarations-functions
May 22, 2026
Merged

codex: add partial c parser declarations and functions#15
saidctb merged 1 commit into
c-parser/mainfrom
c-parser/partial-declarations-functions

Conversation

@saidctb

@saidctb saidctb commented May 22, 2026

Copy link
Copy Markdown
Contributor

• Summary

  • Added partial C parser support for simple globals, primitive typedefs, function prototypes, and function-definition signatures.
  • Added top-level C source splitting that tracks braces, parentheses, brackets, strings, chars, and skips function bodies.
  • Refactored c_parser/parser.py so parser internals live on CParser, matching the Fortran parser structure.
  • Updated parser status from skeleton to partial across models, CLI output, tests, and docs.
  • Updated C parser docs and checklist, including progress tracking: 415/848 checked (48.9%).
  • Expanded focused C parser tests for declarations, functions, top-level splitting, raw conditional behavior, and macro-generated declaration deferral.

Tests

  • PYTHONPATH=. pytest -q tests/parser/test_cli.py tests/parser/c
  • Result: 74 passed, 62 skipped

@codecov

codecov Bot commented May 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.05263% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
c_parser/parser.py 94.91% 1 Missing and 8 partials ⚠️
Flag Coverage Δ
py312 92.56% <96.05%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
c_parser/lexer.py 100.00% <100.00%> (ø)
c_parser/models.py 98.75% <100.00%> (ø)
x2py/cli.py 93.41% <ø> (ø)
c_parser/parser.py 90.83% <94.91%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@saidctb
saidctb merged commit a35b87c into c-parser/main May 22, 2026
5 of 6 checks passed
@saidctb
saidctb deleted the c-parser/partial-declarations-functions branch May 22, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant