[antlr-interest] HELP: translate javascript code to C#

Guoliang Cao cao at danucom.com
Mon Mar 27 08:41:00 PST 2006


I changed input to an embeded String but got the same error. Maybe I
should encode the input in unicode? how?

JavascriptLexer lexer = new JavascriptLexer(new StringReader("var table = remainingValue.substring(start + 1, end);"));
JavascriptParser parser = new JavascriptParser(lexer);
parser.program();

> Hi.  Failing so completely must mean a character encoding problem.   
> Make sure the main program that sends a stream of char to the lexer  
> is decoding the input file properly.  You might be trying to read a  
> file from one country using the encoding on your machine or the main  
> program does not use the proper reader.  OR, you are sending in RDF,  
> which is clearly wrong but thought I'd mention it ;)
> Ter






More information about the antlr-interest mailing list