[kaffe] Regexs should be perl style rather than POSIX style.

John C. McCabe-Dansted gmatht at gmail.com
Wed Dec 14 02:26:09 PST 2005


JLanguageTool-0.7.2 runs correctly under the official Sun 1.4 jre. However, 
under Kaffe 1.1.5 we get the error below. This is clearly caused by Kaffe 
using POSIX style regexs, where as Sun allows us to use Perl style regexs. In 
Perl the modifiers "//i", "//m", "//s", and "//x" can be embedded in a regexp 
using "(?i)", "(?m)", "(?s)", and "(?x)".  BTW, the libboost.regex library 
provides perl style regexs to C++ programs.

java.util.regex.PatternSyntaxException: At position 1 in regular expression 
pattern:
quantifier (?*+{}) without preceding token
        (?s)<!--.*?-->
         ^
   at java.util.regex.Pattern.<init> (Pattern.java:107)
   at java.util.regex.Pattern.compile (Pattern.java:144)
   at java.util.regex.Pattern.compile (Pattern.java:126)
   at java.lang.String.replaceAll (String.java:832)
   at de.danielnaber.languagetool.Main.filterXML (source file unknown)
   at de.danielnaber.languagetool.Main.getFilteredText (source file unknown)
   at de.danielnaber.languagetool.Main.main (source file unknown)
   at java.lang.reflect.Method.invoke0 (Method.java)
   at java.lang.reflect.Method.invoke (Method.java:255)
   at kaffe.jar.ExecJarName.main (ExecJarName.java:67)
   at kaffe.jar.ExecJar.main (ExecJar.java:75)

-- 
John C. McCabe-Dansted
Masters Student




More information about the kaffe mailing list