Hey,
Thank you both for the quick and insightful answers :D
I think I'll go with a simple substitution then :)
But really cool to see how reasonably easy it is to get such a functionality ^^

Cheers,
Jan
On Aug 26, 2011, at 3:09 PM, Kaspar Schiess wrote:

> Hei Melissa,
> 
>> That would be the technically correct way to do it using parslet,
>> however that seems a little overkill for your case. I might honestly
>> just write a transform rule that does the unescaping rather than
>> getting fancy with the parser. Either way, you'd be using transform to
>> do something.
> 
> As usual solid advice. The only one thing I would add:
> The technically correct way to do it using parslet is as simple as 
> possible using parslet & Ruby. Replacing "\"" in a string with '"' is 
> best done with
> 
>   .gsub(/\\"/, '"')
> 
> whether parslet is required(loaded) or not.
> 
> And to completely undermine what points we've just may have made, here's 
> how .ignore would be implemented:
> 
> https://github.com/kschiess/parslet/blob/master/example/ignore.rb
> 
> Thanks for answering all these questions!
> kaspar
> 

Reply via email to