Skip to content

Using .parse twice on the same Grammar does not work when using Tracer #32

@rogbro

Description

@rogbro

Example :

use v6.c;
use Grammar::Tracer;

grammar MyGr {
    token TOP { 'A' | 'B' }
}

my $mo = MyGr.parse('A');
say $mo;

my $mo2 = MyGr.parse('B');
say $mo2;

gives this output

TOP
* MATCH "A"
「A」
TOP
* MATCH "A"
「A」

When commenting the "use Grammar::Tracer" line, I get the expected output with B match.

「A」
「B」

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