You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following error when trying to parse this regex:
/" ((?:[^\x0-\x1f"\\] | # escaped special characters:\\["\\\/bfnrt] |\\u[0-9a-fA-F]{4} | # match all but escaped special characters:\\[\x20-\x21\x23-\x2e\x30-\x5b\x5d-\x61\x63-\x65\x67-\x6d\x6f-\x71\x73\x75-\xff])*) "/nx
Error output
Truffle internal error: java.lang.NumberFormatException: For input string: "0-"
java.lang.NumberFormatException: For input string: "0-"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:492)
at org.jruby.truffle.translator.BodyTranslator.all7Bit(BodyTranslator.java:2426)
at org.jruby.truffle.translator.BodyTranslator.visitRegexpNode(BodyTranslator.java:2398)
at org.jruby.truffle.translator.BodyTranslator.visitRegexpNode(BodyTranslator.java:78)
at org.jruby.ast.RegexpNode.accept(RegexpNode.java:66)
at org.jruby.truffle.translator.BodyTranslator.visitNewlineNode(BodyTranslator.java:2143)
at org.jruby.truffle.translator.BodyTranslator.visitNewlineNode(BodyTranslator.java:78)
at org.jruby.ast.NewlineNode.accept(NewlineNode.java:71)
at org.jruby.truffle.translator.TranslatorDriver.parse(TranslatorDriver.java:159)
at org.jruby.truffle.translator.TranslatorDriver.parse(TranslatorDriver.java:119)
at org.jruby.truffle.runtime.RubyContext.execute(RubyContext.java:242)
at org.jruby.truffle.runtime.RubyContext.execute(RubyContext.java:237)
at org.jruby.truffle.runtime.RubyContext.load(RubyContext.java:188)
at org.jruby.truffle.TruffleBridgeImpl.execute(TruffleBridgeImpl.java:177)
at org.jruby.truffle.TruffleBridgeImpl.execute(TruffleBridgeImpl.java:154)
at org.jruby.Ruby.runInterpreter(Ruby.java:866)
at org.jruby.Ruby.runInterpreter(Ruby.java:880)
at org.jruby.Ruby.runNormally(Ruby.java:755)
at org.jruby.Ruby.runFromMain(Ruby.java:572)
at org.jruby.Main.doRunFromMain(Main.java:404)
at org.jruby.Main.internalRun(Main.java:299)
at org.jruby.Main.run(Main.java:226)
at org.jruby.Main.main(Main.java:198)
The text was updated successfully, but these errors were encountered:
This is due to bad code in BodyTranslator#all7Bit which tries to parse the escapes in the regex and gets it wrong. We're probably doing this all wrong - not sure how to approach fixing it at the moment.
I get the following error when trying to parse this regex:
Error output
The text was updated successfully, but these errors were encountered: