Files
intellijai/build.gradle.kts
hgranthorner dc53033898 Build: regenerate the parser on every build, and always from scratch
Two staleness traps cost real debugging time, and both made grammar edits look
like they had no effect:

- compileJava/compileKotlin read src/main/gen with no task dependency, so an
  edit to Jai.bnf could be compiled against the previous generated parser. The
  compiled JaiParser.class was three minutes older than its source while the
  tests reported green. They now depend on generateParser.
- purgeOldFiles is not enough. Grammar-Kit rewrites only the files whose rule
  changed, so JaiDeclaration kept a getArgumentList() its regenerated Impl no
  longer had and the build failed inside generated code. generateParser now
  deletes src/main/gen first.

Grammar: named return defaults use a private rule rather than 'initializer'.
Giving the default its own PSI element made the enclosing procLiteralExpr end
early, so '-> a: int = 1 { }' silently lost its body.

Corpus parse 90.9% (649/714), ratchet at 645.
2026-08-04 12:37:46 -04:00

2.2 KiB