Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String match does not support ([^05+]) form #17

Open
robertcsakany opened this issue Feb 11, 2017 · 0 comments
Open

String match does not support ([^05+]) form #17

robertcsakany opened this issue Feb 11, 2017 · 0 comments

Comments

@robertcsakany
Copy link

The following code throws an exceotion on strmatch

local function updatedecpoint ()
    decpoint = strmatch(tostring(0.5), "([^05+])")
    -- build a filter that can be used to remove group separators
    numfilter = "[^0-9%-%+eE" .. gsub(decpoint, "[%^%$%(%)%%%.%[%]%*%+%-%?]", "%%%0") .. "]+"
end

This code is working fine with luac and luaj. Its the dkjson luarocks library.

The exception is:

net.sandius.rembulan.exec.CallException: java.lang.IllegalArgumentException: error at character 6: unexpected character '+'

	at net.sandius.rembulan.exec.DirectCallExecutor$Result.get(DirectCallExecutor.java:184)
	at net.sandius.rembulan.exec.DirectCallExecutor.execute(DirectCallExecutor.java:310)
	at net.sandius.rembulan.exec.DirectCallExecutor.resume(DirectCallExecutor.java:252)
	at net.sandius.rembulan.exec.DirectCallExecutor.call(DirectCallExecutor.java:228)
	at hu.blackbelt.judo.scripting.lua.TestScriptRun.testRembulanScriptLoading(TestScriptRun.java:67)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at com.intellij.junit4.JUnit4TestRunnerUtil$IgnoreIgnoredTestJUnit4ClassRunner.runChild(JUnit4TestRunnerUtil.java:365)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.IllegalArgumentException: error at character 6: unexpected character '+'
	at net.sandius.rembulan.lib.StringPattern$PatternBuilder.parseError(StringPattern.java:941)
	at net.sandius.rembulan.lib.StringPattern$PatternBuilder.CC_lit(StringPattern.java:1087)
	at net.sandius.rembulan.lib.StringPattern$PatternBuilder.characterSetElement(StringPattern.java:1017)
	at net.sandius.rembulan.lib.StringPattern$PatternBuilder.characterSetBody(StringPattern.java:1025)
	at net.sandius.rembulan.lib.StringPattern$PatternBuilder.cclass(StringPattern.java:1133)
	at net.sandius.rembulan.lib.StringPattern$PatternBuilder.PI_cc(StringPattern.java:1163)
	at net.sandius.rembulan.lib.StringPattern$PatternBuilder.PI(StringPattern.java:1186)
	at net.sandius.rembulan.lib.StringPattern$PatternBuilder.PI_capture(StringPattern.java:1196)
	at net.sandius.rembulan.lib.StringPattern$PatternBuilder.PI(StringPattern.java:1170)
	at net.sandius.rembulan.lib.StringPattern$PatternBuilder.parse(StringPattern.java:1218)
	at net.sandius.rembulan.lib.StringPattern$PatternBuilder.access$900(StringPattern.java:913)
	at net.sandius.rembulan.lib.StringPattern.fromString(StringPattern.java:1228)
	at net.sandius.rembulan.lib.StringPattern.fromString(StringPattern.java:1232)
	at net.sandius.rembulan.lib.StringLib$Match.invoke(StringLib.java:1699)
	at net.sandius.rembulan.lib.AbstractLibFunction.invoke(AbstractLibFunction.java:39)
	at net.sandius.rembulan.runtime.AbstractFunctionAnyArg.invoke(AbstractFunctionAnyArg.java:36)
	at net.sandius.rembulan.runtime.Dispatch.mt_invoke(Dispatch.java:70)
	at net.sandius.rembulan.runtime.Dispatch.call(Dispatch.java:236)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant