003 reject left recursion

✓ Passing This code compiles and runs correctly.

Code

input.k

Must contain:

left-recursive

Error Verification

Actual Compiler Output

🎯 Compiler coordination: Passes: 17 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:34:16: error: std/parser: rule `expr` is left-recursive (it can call itself before consuming input) — rewrite right-recursively: put a consuming element (a terminal) first
    comptime { @compileError("std/parser: rule `expr` is left-recursive (it can call itself before consuming input) — rewrite right-recursively: put a consuming element (a terminal) first"); }
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
    main_module: output_emitted.zig:29:25
    main: output_emitted.zig:477:5
    4 reference(s) hidden; use '-freference-trace=6' to see all references

Flows

flow ~grammar click a branch to expand · @labels scroll to their anchor
grammar (expr: math)
flow ~parse click a branch to expand · @labels scroll to their anchor
parse (expr: "1", grammar: math)

Test Configuration

MUST_FAIL