We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hello im Using class tool for g4 to java im using #addListener and not work me help me plz my java code here
public void main(String[] args) { Tool antlr = new Tool(args); StringBuilder b = new StringBuilder(); if (args.length == 0) { antlr.help(); binding.et.setText(String.valueOf(antlr.errMgr.getNumErrors())); } try { antlr.processGrammarsOnCommandLine(); antlr.addListener( new ANTLRToolListener() { @Override public void info(String info) { b.append(info).append("\n"); binding.et.setText(b.toString()); } @Override public void error(ANTLRMessage error) { b.append(error.fileName).append("\n"); binding.et.setText(b.toString()); } @Override public void warning(ANTLRMessage war) { b.append(war.fileName).append("\n"); binding.et.setText(b.toString()); } }); } finally { if (antlr.log) { try { String logname = antlr.logMgr.save(); System.out.println("wrote " + logname); binding.et.setText("wrote " + logname); } catch (IOException ioe) { antlr.errMgr.toolError(ErrorType.INTERNAL_ERROR, ioe); } } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hello im Using class tool for g4 to java im using #addListener and not work me help me plz my java code here
The text was updated successfully, but these errors were encountered: