Repository navigation
Phase 1a: சீர்.g4 — positional ஐ scansion, ஔ fix, காய்/கனி ordering, EOF - #11
Merged
Merged
Conversation
Grammar (pytamil/தமிழ்/resources/சீர்.g4, rewritten with a header that states the ambiguity policy): - ஐ with a consonant (கை மை லை ...) moves out of நெடில் into a new ஐகாரக்குறுக்கம் rule. A foot-initial நிரை (முதல்நிரை) must start with a true குறில்; a later நிரை may start with a shortened ஐ. So தண்/மையும் = நேர் நிரை = கூவிளம் while கை/யினை stays கூவிளம் and கை/யும் தேமா. Word-initial bare ஐ remains நெடில். Decision: positional rule (specs/2026-09-20-revival-and-roadmap.md, Phase 1a). - 'ஒள' (two code points) -> 'ஔ' (U+0B94). ஔவை could not be lexed; ஒளியும் scanned as தேமா, now புளிமா. - மூவசை/நாலசை alternatives reordered so every காய் precedes any கனி: வழிபடுக was புளிமாங்கனி, now கருவிளங்காய். - Start rule ends with EOF; I and NL are real lexer rules shared with the importing grammars. வெண்பா.g4: drop the local copies of தேமா..கூவிளங்காய் that shadowed the import (the fix would not have applied to venba otherwise); மலர்/பிறப்பு use முதல்நிரை; NL instead of '\n'; EOF on the start rule; delete ~50 lines of commented-out duplicate token tables. ஆசிரியப்பா.g4: NL and EOF. Regenerated சீர், வெண்பா, ஆசிரியப்பா (codegen.sh, ANTLR 4.13.2). Tests: the two xfails (தண்மையும், இணைக்குறள் ஆசிரியப்பா) are removed and pass; new சீர் cases for தேமா, புளிமா, கூவிளம், கருவிளங்காய் covering each fix. pytest: 116 passed, 9 xfailed (all சொல்.g4 gaps). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
இலக்கணக் கருத்துகள் (அசை, சீர், ஐகாரக்குறுக்கம், மாற்றுத் தேர்வு நெறி) தமிழிலே விளக்கப்பட வேண்டும்; ANTLR நுட்பம் மட்டும் ஆங்கிலம். Generated code unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
.github/workflows/test.yml - pytest job, matrix 3.10 / 3.12, pip install -r requirements.txt. - codegen-drift job: installs Java, runs codegen.sh and fails if anything under pytamil/தமிழ்/codegen differs, so the committed parsers can never fall out of sync with the .g4 grammars. requirements.txt: PyYAML 6.0 -> 6.0.2. 6.0 fails to build on Python 3.12 (Cython 3 build_ext incompatibility); 6.0.2 supports 3.8-3.13. Verified locally: 116 passed, 9 xfailed on both 3.10 and 3.12. Roadmap Phase 1d (specs/2026-09-20-revival-and-roadmap.md). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…up-java v5) The first run warned that v4/v5 of these target the deprecated Node 20 runtime. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… structured errors
…னி ordering, EOF
This branch was successfully deployed
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.
Roadmap Phase 1a from
specs/2026-09-20-revival-and-roadmap.md. Stacked on #10 (basephase1/parser-helper).Closes the two long-standing xfails (தண்மையும் → கூவிளம்; இணைக்குறள் ஆசிரியப்பா) and fixes three more defects found while diagnosing them:
'ஒள'typo for'ஔ'தண்மையும்xx"parsed"Also:
வெண்பா.g4no longer shadows the imported foot rules (it silently overrode them), and both importing grammars use the sharedNLtoken and end withEOF, so trailing garbage after a poem is now reported.Hand-checked:
கையினைstays கூவிளம் (foot-initial ஐ must not flip to புளிமா),கிறைstays மலர், Kural 467 and நளவெண்பா 1 scan unchanged.Suite: 116 passed, 9 xfailed (all known
சொல்.g4gaps).Review the grammar only:
git diff origin/phase1/parser-helper origin/phase1/seer-grammar -- 'pytamil/தமிழ்/resources/*.g4' pytamil/tests🤖 Generated with Claude Code