Skip to content

More lalrpop#65

Merged
wackywendell merged 7 commits intowendell/lalrpopfrom
wendell/lalrpop-more
Feb 26, 2026
Merged

More lalrpop#65
wackywendell merged 7 commits intowendell/lalrpopfrom
wendell/lalrpop-more

Conversation

@wackywendell
Copy link
Copy Markdown
Collaborator

This builds on #64:

  • Migrate extension declaration parsing to LALRPOP — replace hand-written parsers with grammar rules and structured AST types, consistent with how relations are already parsed
  • Extract extension lowering into its own module — separate extension-specific lowering from relation lowering, with shared validation helpers
  • Idiomatic trait usage — add FromStr and From impls for extension types to clean up conversion boundaries
  • Documentation — add module-level docs across the codebase, document the extension parsing pipeline, and add a CI step for docs compilation
  • Visibility cleanup — tighten Lower trait to pub(crate) and simplify imports

@wackywendell wackywendell marked this pull request as ready for review February 26, 2026 18:27
@wackywendell wackywendell requested a review from a team as a code owner February 26, 2026 18:27
@wackywendell wackywendell merged commit d99d1f5 into wendell/lalrpop Feb 26, 2026
2 checks passed
@wackywendell wackywendell deleted the wendell/lalrpop-more branch February 26, 2026 18:27
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c33589909

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

};

pub ExtensionUrnDecl: ExtensionUrnDeclaration = {
<anchor:UrnAnchor> ":" <urn:UrnValue> => ExtensionUrnDeclaration::new(anchor, urn),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reject oversized extension anchors without panicking

The new ExtensionUrnDecl/ExtensionDecl grammar routes extension anchors through Anchor/UrnAnchor, which currently convert with parse::<u32>().expect(...); inputs like @4294967296: ... or #1 @4294967296: fn will now panic the parser process instead of returning a structured parse error. Before this migration these declaration lines used fallible parsing (map_err) and surfaced normal MessageParseErrors, so this introduces a crash-on-malformed-input regression.

Useful? React with 👍 / 👎.

r"\s*" => { },
r"-?[0-9]+\.[0-9]+" => FLOAT,
r"-?[0-9]+" => INT,
r"([A-Za-z][A-Za-z0-9+.\-]*://[^\s]+)|(/[^\s]+)" => URN_VALUE,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Broaden URN tokenization for extension declarations

The new URN_VALUE lexer rule only accepts URL-like scheme://..., absolute /..., identifiers, or quoted names, so URNs such as urn:substrait:functions_arithmetic (previously accepted because everything after : was treated as URN text) now fail to parse. This is a behavioral regression in extension parsing and can break parse/textify round-trips for plans containing non-URL URN formats.

Useful? React with 👍 / 👎.

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