grammar-debugger icon indicating copy to clipboard operation
grammar-debugger copied to clipboard

Constant string matches are not reported

Open vlmarek opened this issue 8 years ago • 0 comments

grammar G {
        token TOP { <a> b <c> }
        token a { a }
        token c { c }
}

say so G.parse('abc');
TOP
|  a
|  * MATCH "a"
|  c
|  * MATCH "c"
* MATCH "abc"
True

There is no mention of 'b' being matched until whole TOP matched. In complex grammars it's difficult to spot what last thing was matched before failure.

vlmarek avatar Aug 25 '16 06:08 vlmarek