Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1-rc-2
-
None
-
None
-
OS X Tiger 10.4.11
Description
This simple test is failing (I have groovy-all on classpath):
import groovyjarjarantlr.*; import java.io.*; import org.codehaus.groovy.antlr.parser.GroovyLexer; public class Main { public static void main(String[] args) throws TokenStreamException { String exp = "println 4 / 2 + 3"; InputStream inputStream = new ByteArrayInputStream(exp.getBytes()); GroovyLexer lexer = new GroovyLexer(inputStream); while (true) { Token token = lexer.nextToken(); if (token.getType() == Token.EOF_TYPE) return; System.out.println("token = " + token); } } }
with error:
token = ["println",<84>,line=1,col=1] token = ["4",<194>,line=1,col=9] Exception in thread "main" line 1:18: unexpected char: 0xFFFF at org.codehaus.groovy.antlr.parser.GroovyLexer.nextToken(GroovyLexer.java:687) at Main.main(Main.java:14) Java Result: 1
If I replace '/' character with '*' or something else it works fine.