(3) yes to distinquish the two discard events you give them different names
-- that is the only way to do it.

(4) the reason for the new mechanism is that, previously, there was no way
to turn off an event intially, so that it was always active at location 0.
This could be worked around, but it's a coding nuisance, and that's why I
created all this initialization apparatus.  The activate() method still
works, and is what you'll use after location 0.

(5) It would make sense for all events, but for now it will only be
available for discard events.

(1) revisited -- there is no action for discard events -- you catch discard
events coming out of read() or resume(), the same way you catch the others,
and at that point do what you like with it.  It may seem weird, because
discard events aren't associated with real parse locations, and there could
be a lot of them for every undiscarded token.  But tracing already works
much like this and I expect it to work fine.

On Sun, Jan 11, 2015 at 9:23 PM, Ron Savage <[email protected]> wrote:

> Yes, thanx. That's good.
>
> From this part of your doc:
> :discard ~ ws event => 'wsdiscard'=off
> :discard ~ <ws> event => wsdiscard=on
> :discard ~ ws event => 'wsdiscard'
> Can I assume:
> (3) If I wanted to discard 2 different tokens (say: #-style comments and
> //-style comments), I could attach 2 events with different names to these 2
> cases?
> (4) Since (pre-existing) events can already be turned on and off with
> activate(), will this new type of event be controllable likewise?
> (5) And thus: Is the '=on', '=off', syntax an extension proposed for all
> events?
>
> Lastly, my original point (1) makes me think an action needs to be
> attachable to discards. Is that true, or have I missed the equivalent
> mechanism in your doc?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "marpa parser" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to