Skip to content

Fix Podlang parsing and validation edge cases - #542

Open
robknight wants to merge 7 commits into
mainfrom
stack/podlang-parse-validation
Open

Fix Podlang parsing and validation edge cases#542
robknight wants to merge 7 commits into
mainfrom
stack/podlang-parse-validation

Conversation

@robknight

Copy link
Copy Markdown
Collaborator

This tightens Podlang parsing and validation around several ambiguous or lossy cases.

  • Treat reserved words and boolean literals as complete tokens, so identifiers such as record_count, true_flag, and falsehood parse correctly.
  • Format REQUEST blocks as whitespace-separated statements so pretty-printed requests can be parsed again.
  • Reject duplicate dictionary keys, including duplicates in nested literals, before lowering can discard a value.
  • Reject empty REQUEST blocks.
  • Reject custom and intro predicate names that collide with native or syntactic-sugar predicates.
  • Reject duplicate module aliases before their predicates and records can be mixed in the symbol table.
  • Correct container statement argument documentation.

This also removes the unused validation-diagnostics path now that invalid constructs such as empty requests are reported as validation errors, and adds targeted parser, round-trip, validation, and diagnostic coverage.


Stack created with GitHub Stacks CLIGive Feedback 💬

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