public static int Main(string[] args) { AntlrTool antlr = new AntlrTool(args); if (args.Length == 0) { antlr.Help(); return(0); } try { antlr.ProcessGrammarsOnCommandLine(); } finally { if (antlr.log) { try { string logname = antlr.logMgr.Save(); System.Console.WriteLine("wrote " + logname); } catch (IOException ioe) { antlr.errMgr.ToolError(ErrorType.INTERNAL_ERROR, ioe); } } } if (antlr.errMgr.GetNumErrors() > 0) { return(1); } return(0); }
public UndefChecker(AntlrTool tool, Grammar g, IDictionary <string, RuleAST> ruleToAST) { this.tool = tool; this.g = g; this.ruleToAST = ruleToAST; }
public UndefChecker(AntlrTool tool, Grammar g, IDictionary<string, RuleAST> ruleToAST) { this.tool = tool; this.g = g; this.ruleToAST = ruleToAST; }
private static void Main(string[] args) { Environment.ExitCode = AntlrTool.Main(args); }
public static int Main(string[] args) { AntlrTool antlr = new AntlrTool(args); if (args.Length == 0) { antlr.Help(); return 0; } try { antlr.ProcessGrammarsOnCommandLine(); } finally { if (antlr.log) { try { string logname = antlr.logMgr.Save(); System.Console.WriteLine("wrote " + logname); } catch (IOException ioe) { antlr.errMgr.ToolError(ErrorType.INTERNAL_ERROR, ioe); } } } if (antlr.errMgr.GetNumErrors() > 0) { return 1; } return 0; }