Thanks, Ron.

I see how the Ruby Slippers can work if you know ahead of time what the 
text will be that we need to insert into the input, so we can "secret it 
away" before calling read. I guess I could get this to work by prescanning 
the input for all the text strings, then putting them all into "Ruby 
Slippers Shoeboxes" at the end of the input string and when hitting one of 
these tokens doing the Ruby Slipper thing, just like  you did in 
match.parentheses.02.pl

On Monday, February 9, 2015 at 8:54:25 PM UTC-6, Ron Savage wrote:
>
> On Tuesday, 10 February 2015 13:35:31 UTC+11, Thomas Weigert wrote:
>>
>> Ron,
>>
>> please see below....
>>
>> I guess in the end it comes back to what Jeff said earlier. He implied 
>> that one cannot simply change the content of the input string.
>>
>
> No, you can't change it, but using the Ruby Slippers concept, you can tell 
> Marpa to parse another part of the input string, in which you've secreted 
> the Ruby Slippers. That's what happens in the sample code I mentioned in my 
> email to you. It was MarpaX::Demo::SampleScripts and scripts/
> match.parentheses.02.pl. After that, you reset $pos back to the place you 
> want Marpa to continue from.
>  
>

-- 
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