Hi all,

Consider the following example REPL session using PEG parsing:

scheme@(guile-user)> (define-peg-pattern example body "example")
scheme@(guile-user)> (define-peg-pattern ignore-example all (ignore example))
scheme@(guile-user)> (match-pattern ignore-example "example")
$13 = #<prec start: 0 end: 7 string: "example" tree: (ignore-example "example")>

OK, I figure `ignore` is not able to cancel the effect of `body` on the
earlier line, or something like that.

scheme@(guile-user)> (define-peg-pattern ignore-some-example all (ignore (+ 
example)))
scheme@(guile-user)> (match-pattern ignore-some-example "example")
$14 = #<prec start: 0 end: 7 string: "example" tree: ignore-some-example>

Hm... but when `+` enters the picture, that changes?

Is this the expected behavior?  What is the general rule here?

Thanks,
Jade

Reply via email to