StreamReader sr = new StreamReader(filePath);
AntlrInputStream input = new AntlrInputStream(sr);
StreamReader sr = new StreamReader(source);
AntlrInputStream input = new AntlrInputStream(sr.ReadToEnd());
ANTLRFileStream
input = new ANTLRFileStream(filePath);
Hi Ghislain,
The second constructor you used is implemented with the following assignment:
this.data = input.ToCharArray();
The first constructor you used is implemented with the following assignment:
data = r.ReadToEnd().ToCharArray();
Since they are clearly the same, the difference in your program must have to do with the “filePath” vs. the “source” variables in your code.
Thanks,
Sam
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
StreamReader sr = new StreamReader(source);
UnbufferedCharStream input = new UnbufferedCharStream(sr);
qbridgeLexer lexer = new qbridgeLexer(input);
CommonTokenStream tokens = new CommonTokenStream(lexer);
qbridgeParser parser = new qbridgeParser(tokens);
IParseTree tree = parser.qbridge();
ParseTreeWalker walker = new ParseTreeWalker();
QbridgeLoader loader = new QbridgeLoader(_document);
walker.Walk(loader, tree);
StreamReader sr = new StreamReader(source);
UnbufferedCharStream input = new UnbufferedCharStream(sr);
qbridgeLexer lexer = new qbridgeLexer(input);
UnbufferedTokenStream tokens = new UnbufferedTokenStream(lexer);
qbridgeParser parser = new qbridgeParser(tokens);
parser.BuildParseTree = false;
IParseTree tree = parser.qbridge();
ParseTreeWalker walker = new ParseTreeWalker();
QbridgeLoader loader = new QbridgeLoader(_document);
walker.Walk(loader, tree);