Closed sethboyles closed 6 years ago
What stops you from handling this in Ruby before using parslet?
Nothing, just wondering if Parslet provided anything for this.
There would be no good place to do this in the parsing pipeline; it would risk making everything slower. If string.tr or a string.replace can work, I would suggest using that.
I would like to preprocess a string before the parser parses everything. For instance, I would like to replace all left and right quote characters
“
”
with normal quotes"
rather than having to write the extra cases into all of my rules. Is there an easy way to handle that in Parslet?Thanks