003 reject left recursion

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.k

Actual compiler output

error[KORU163]: std/parser: rule `expr` is left-recursive (it can call itself before consuming input) — rewrite right-recursively: put a consuming element (a terminal) first
  --> tests/regression/600_STDLIB/641_PARSER/641_003_reject_left_recursion/input.k:15:0

Must contain:

left-recursive

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_ERROR