opened
thautwarm
username_0
Grammar:
```
Mul  ::= !lhs=<Mul> "*" !rhs=<Atom> -> add(lhs, rhs);
Mul  ::= <Atom> -> zero;
Atom ::= "(" !a=<Mul> ")" -> a;
Atom ::= number -> zero;
```

Lookahead trees and ID3 decision trees:

```
==== Rule Mul ============
-- LA trees
case number
    case quote *
        case number
            end: [14]

        case quote (
            end: [14]



case quote (
    case number
        case quote *
            end: [18]


    case quote (
        case number
            end: [18]

        case quote (
            end: [18]


-- flatten LA trees
["number","quote *","number"] -> 14
["number","quote *","quote ("] -> 14
["quote (","number","quote *"] -> 18
["quote (","quote (","number"] -> 18
["quote (","quote (","quote ("] -> 18

-- ID3 decision trees
case elts[1]
    "number" => [18]
    "quote (" => [18]
    "quote *" => [14]

==== Rule Atom ============
-- LA trees
case number
    end: [4]

case quote (
    case number
        case quote *
            end: [7]


    case quote (
        case number
            end: [7]

        case quote (
            end: [7]



-- flatten LA Trees

["number"] -> 4
["quote (","number","quote *"] -> 7
["quote (","quote (","number"] -> 7
["quote (","quote (","quote ("] -> 7

-- ID3 decision trees
case elts[0]
    "number" => [4]
    "quote (" => [7]

```

Above noinline case is still wrong. For rule `Mul` can produce a single terminal.
lookahead tree bug
issue
closed
thautwarm
username_0
issue