-
-
Notifications
You must be signed in to change notification settings - Fork 939
Open
Description
When running with the Prism parser and our compiler for it, a complex sequence of lonely-operator calls appears to be handled improperly.
def foo
re = /\G((?-mix:(?-mix:(?-mix:[[\x01-\x7f]&&[^[\r\n]]])|(?-mix:[\xC2-\xDF](?-mix:[\x80-\xBF]))|(?-mix:(?-mix:\xE0[\xA0-\xBF](?-mix:[\x80-\xBF]))|(?-mix:\xED[\x80-\x9F](?-mix:[\x80-\xBF]))|(?-mix:[\xE1-\xEC][\x80-\xBF][\x80-\xBF])|(?-mix:[\xEE-\xEF][\x80-\xBF][\x80-\xBF]))|(?-mix:(?-mix:[\xF1-\xF3][\x80-\xBF][\x80-\xBF][\x80-\xBF])|(?-mix:\xF0[\x90-\xBF][\x80-\xBF][\x80-\xBF])|(?-mix:\xF4[\x80-\x8F][\x80-\xBF][\x80-\xBF])))+))/n
str = "A004 OK [copyUID 9999 20:19,500:495 92:97,101:100] Done\r\n"
pos = 51
re.match(str, pos)
end
def bar
foo&.[](0)&.force_encoding("UTF-8")
end
p barThis should print "Done" but when running on the Prism parser it does not:
[] jruby $ jruby blah2.rb
"Done"
[] jruby $ JRUBY_OPTS="-Xparser.prism" jruby blah2.rb
nil
nevans
Metadata
Metadata
Assignees
Labels
No labels