Skip to content

REPL: SET key = value listed in HELP but not implemented (scaffolding only) #471

@retran

Description

@retran

Description

The HELP output documents set key = value; under "Other" commands. The full execution path exists:

  • ast.SetStmt (ast_query.go:434-440)
  • execSet() handler (cmd_misc.go:41-48) stores key=value in ctx.Settings
  • register_stubs.go:390-392 registers the handler
  • repl.go:338 recognizes set prefix as complete statement
  • repl.go:800 provides tab completion for SET

However, no grammar production creates ast.SetStmt. The grammar's setStatement only handles microflow-level SET $Variable = expression. The utilityStatement rule has no SET alternative.

Steps to Reproduce

mxcli -c "SET format = json"
# Parse error: mismatched input 'SET'

Expected

SET format = json should store the setting and print confirmation as documented.

Root Cause

Grammar gap — utilityStatement in MDLParser.g4 needs a session-level SET rule (distinct from microflow setStatement).

Affected Files

  • mdl/grammar/MDLParser.g4 — needs session-level SET rule in utilityStatement
  • mdl/visitor/visitor_query.go — needs visitor to construct ast.SetStmt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions