ravikumar10 / genyris

Automatically exported from code.google.com/p/genyris
Other
0 stars 0 forks source link

java.util.regex.PatternSyntaxException causes fatal. #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
> "foo.bar"(.match '.*\.(...))')

Exception in thread "main" java.util.regex.PatternSyntaxException: Unmatched 
closing ')' near index 7
.*.(...))
       ^
        at java.util.regex.Pattern.error(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at java.util.regex.Pattern.<init>(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at java.util.regex.Pattern.matches(Unknown Source)
        at java.lang.String.matches(Unknown Source)
        at org.genyris.core.StrinG.match(Unknown Source)
        at org.genyris.string.MatchMethod.bindAndExecute(Unknown Source)
        at org.genyris.interp.ApplicableFunction.bindAndExecuteAux(Unknown Source)
        at org.genyris.interp.AbstractClosure.applyFunction(Unknown Source)
        at org.genyris.core.Pair.eval(Unknown Source)
        at org.genyris.core.Pair.evalSequence(Unknown Source)
        at org.genyris.core.Exp.applyFunction(Unknown Source)
        at org.genyris.core.Pair.eval(Unknown Source)
        at org.genyris.interp.builtin.EvalFunction.bindAndExecute(Unknown Source)
        at org.genyris.interp.ApplicableFunction.bindAndExecuteAux(Unknown Source)

Original issue reported on code.google.com by birchb1...@gmail.com on 30 Nov 2010 at 12:36

GoogleCodeExporter commented 9 years ago
Fix in 728:16d173508f58
un-declared exceptions by java.util.regex :-( now caught:

> "foo.bar"(.match '.*\.(...))')

*** Error - 'Unmatched closing \')\' near index 7\r\n.*.(...))\r\n       ^'
~ '<EagerProc: eval>'
~ '<LazyProcedure: <define>>'
~ '<LazyProcedure: catch>'
~ '<LazyProcedure: while>'
~ '<EagerProc: <|http://www.genyris.org/lang/system#read-eval-print-loop|>>'

Original comment by birchb1...@gmail.com on 8 Dec 2010 at 9:03