-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Take this grammar:
require 'rattler'
parser DynagramParser < Rattler::Runtime::ExtendedPackratParser
%whitespace SPACE+
script <- string EOF
string <- @('"' . '"')
Feed it the file
"x"
and you get:
[~/.p/d/ruby] ruby lib/dynagram/bug.rb samples/boxes.dyna
"\"x\""
(which is correct).
Change the input to:
"∆"
and when you run it, you get:
[~/.p/d/ruby] ruby lib/dynagram/bug.rb samples/boxes.dyna
"\"∆\"\n"
It looks as if somewhere the parser is using the byte length of the match, not the character length. I spent an hour or so poking around, but couldn't see where.
Thanks for a great tool.
Metadata
Metadata
Assignees
Labels
No labels