Skip to content

Replace parser surface with a Parsec compatibility layer#9

Open
falgon wants to merge 77 commits into
masterfrom
monadic
Open

Replace parser surface with a Parsec compatibility layer#9
falgon wants to merge 77 commits into
masterfrom
monadic

Conversation

@falgon
Copy link
Copy Markdown
Owner

@falgon falgon commented Mar 26, 2026

Summary

  • replace the Megaparsec dependency with parsec and provide local Text.Megaparsec* compatibility modules
  • adapt parser combinators and CLI error handling to the compatibility layer without changing existing tests
  • preserve diagnostic formatting by restoring trailing newlines in errorBundlePretty and avoiding bogus source-line fallback at EOF-after-newline

Verification

  • STACK_ROOT=/tmp/htcc-stack3-root stack --docker --docker-image htcc-stack-bullseye:latest --docker-run-args='--platform linux/amd64' --docker-stack-exe download build --test --no-run-tests
  • STACK_ROOT=/tmp/htcc-stack3-root stack --docker --docker-image htcc-stack-bullseye:latest --docker-run-args='--platform linux/amd64' --docker-stack-exe download test --test-arguments 'components'
  • STACK_ROOT=/tmp/htcc-stack3-root stack --docker --docker-image htcc-stack-bullseye:latest --docker-run-args='--platform linux/amd64' --docker-stack-exe download test --test-arguments 'subp'
  • STACK_ROOT=/tmp/htcc-stack3-root stack --docker --docker-image htcc-stack-bullseye:latest --docker-run-args='--platform linux/amd64' --docker-stack-exe download test --test-arguments 'self'
  • docker-path verification via linux/amd64-pinned docker compose up --build --abort-on-container-exit --exit-code-from htcc against the generated /tmp/htcc/asm/*.s

Closes #2.

@falgon
Copy link
Copy Markdown
Owner Author

falgon commented Apr 17, 2026

CodeFactor found an issue: Use tuple-section

It's currently on:
test\Tests\SubProcTests\AsmOutput.hs:4396
Commit c2e3ed0

falgon and others added 23 commits April 17, 2026 17:06
benchmark target が現行の monadic parser/tokenizer API を使うようにし、作業メタデータを Git 管理対象外にします。

Co-authored-by: Claude <noreply@anthropic.com>
omitted-bound 配列の初期化子探索でも構造体コピーを扱い、投機的な解析失敗時に ConstructionData を巻き戻してリテラル状態の漏れを防ぎます。

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
# Conflicts:
#	.github/workflows/main.yml
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.

Make parser monadic

1 participant