Multi lang#79
Draft
StoneyJackson wants to merge 222 commits intomainfrom
Draft
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Addresses all 6 blockers and 10 concerns from the independent review
(docs/reviews/2026-04-13-phase-1-plan-review.md).
B1: fix _extract_fields to use isCapturing/isTerminal flags (not kind);
add discovery step to confirm actual plcc-spec JSON shape first
B2: fix tree_cli_test --spec to pass spec JSON, not a grammar file
B3: remove dead `with open(model_json) as model_f:` block in plcc-make
B4: add sed step to update --cov=plccng → --cov=plcc in pyproject.toml
B5: new Task 7a — retire scan_cli.py, json_formatter.py, text_formatter.py
B6: new Task 7b — delete plcc_cli.py and spec_cli.py (decision: remove)
C1: fix trivial grammar in design doc §3 (plantuml → diagram)
C2: fix capitalize() → [:1].upper()+[1:] to preserve camelCase names
C3: add discovery step for spec_loader LexicalRule duplication decision
C4: add Phase 1 comment to tree_cli.py explaining --spec is unused
C5: document one-file-per-class design choice in plantuml emit.py
C6: add try/except ValueError around validate_tool_name in plcc-make
C7: resolved by B6 decision (plcc_cli.py removed in Task 7b)
C8: add explicit test inventory step to Task 4
C9: add --semantics deferral comment in lang-emit and plcc-make
C10: simplify packaging.bash entry-point check to test -x
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Renames src/plccng → src/plcc, updates all internal imports, renames plccng_cli.py → plcc_cli.py and PlccngCli → PlccCli, updates pyproject.toml (project name, console scripts entry point, coverage module), and confirms 323 tests pass (stale .pyc cache cleared to resolve EOFError on collection). Test file classification: - Keep as-is (import-only updates, already applied): 37 files lines/parse_from_string_test.py scan/json_formatter_test.py scan/matcher_test.py scan/scan_cli_test.py scan/scanner_test.py scan/sink_test.py scan/source_test.py scan/text_formatter_test.py spec/SpecError_test.py spec/lexical/parse_lexical_test.py spec/parseSpec_test.py spec/rough/parseRough_test.py spec/rough/parse_blocks_test.py spec/rough/parse_dividers_test.py spec/rough/parse_from_lines_test.py spec/rough/parse_includes_test.py spec/rough/resolve_includes_test.py spec/semantics/parse_code_fragments_test.py spec/semantics/parse_semantic_spec_test.py spec/semantics/parse_target_locator_test.py spec/semantics/validation_test.py spec/spec_cli_test.py spec/syntax/parse_syntactic_spec_test.py spec/syntax/validations/ll1/Grammar_test.py spec/syntax/validations/ll1/LL1Wrapper_test.py spec/syntax/validations/ll1/build_first_sets_test.py spec/syntax/validations/ll1/build_follow_sets_test.py spec/syntax/validations/ll1/build_parsing_table_test.py spec/syntax/validations/ll1/build_spec_grammar_test.py spec/syntax/validations/ll1/check_left_recursion_test.py spec/syntax/validations/ll1/check_ll1_test.py spec/syntax/validations/ll1/check_parsing_table_for_ll1_test.py spec/syntax/validations/replace_repeating_with_standard_rules_test.py spec/syntax/validations/validate_lhs_test.py spec/syntax/validations/validate_rhs_test.py spec/syntax/validations/validate_syntactic_spec_test.py spec/syntax/validations/validate_terminals_defined_test.py - Migrated (content changes beyond imports): 1 file plcc_cli_test.py (run() call arg updated plccng→plcc, PlccngCli→PlccCli) - Delete later (Task 7b): plcc_cli_test.py covers plcc_cli.py which is scheduled for deletion in Task 7b; tests still pass for now Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds the plcc-spec command that parses and outputs a PLCC grammar file as JSON, wires it as an entry point in pyproject.toml, and fixes the trivial.plcc fixture to use valid parser format (% dividers instead of %% section headers).
Implements plcc-tokens CLI that reads a spec JSON file and tokenizes stdin, emitting token records as JSONL with lex errors in-band. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements Task 10: plcc-model CLI that reads spec JSON and outputs a language-neutral code model JSON with classes, fields, and semantic sections. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…through Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Creates 10 BATS test files covering plcc-spec, plcc-tokens, plcc-model, plcc-tree, plcc-lang-list, plcc-lang-emit, plcc-lang-build, plcc-plantuml-emit, plcc-make, and plcc-skeletons. Also adds a plantuml_only.plcc fixture to enable plcc-make tests without requiring the Java emitter. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nterpolation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…erated Main.java Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
System python (3.11.2) fails to install the wheel because pyproject.toml requires Python >=3.12. Use the PDM-managed .venv/bin/python (3.14.2) instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Phase 4 design: visualizer polish (location-aware, human-first errors), package rename to plcc-ng, license fix to AGPL-3.0-or-later, PR-triggered CI with full test suite (incl. languages corpus pinned via tests/fixtures/languages-pin.txt and twine check), and a release workflow built around python-semantic-release in tag-only mode plus Trusted Publishing to TestPyPI then PyPI. Versioning starts at 0.0.0 — plcc-ng is a separate, experimental identity from the original plcc; the 9.0.0a* prerelease scheme is abandoned. Release decisions about whether plcc-ng becomes the successor to PLCC are deferred to Phase 5 and beyond.
bin/install/java.bash installs default-jdk via apt if javac is not already present, following the same idempotent pattern as bats.bash and pdm.bash. e2e.bash calls it when LANGUAGES_REPO_PATH is set so the Java corpus tests run in any environment without manual JDK setup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tokens now print with {line}:{col} prefix; lex errors in source are
treated as non-fatal (exit 0), reserving non-zero exit for grammar failures.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nd semantic-release config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The authors of this PR...