Beispiel #1
0
 public ActionSniffer(Grammar g, Rule r, Alternative alt, ActionAST node, IToken actionToken)
 {
     this.g = g;
     this.r = r;
     this.alt = alt;
     this.node = node;
     this.actionToken = actionToken;
     this.errMgr = g.tool.errMgr;
 }
Beispiel #2
0
        public SymbolChecks(Grammar g, SymbolCollector collector)
        {
            this.g = g;
            this.collector = collector;
            this.errMgr = g.tool.errMgr;

            foreach (GrammarAST tokenId in collector.tokenIDRefs)
            {
                tokenIDs.Add(tokenId.Text);
            }

            //System.Console.WriteLine("rules="+collector.rules);
            //System.Console.WriteLine("rulerefs="+collector.rulerefs);
            //System.Console.WriteLine("tokenIDRefs="+collector.tokenIDRefs);
            //System.Console.WriteLine("terminals="+collector.terminals);
            //System.Console.WriteLine("strings="+collector.strings);
            //System.Console.WriteLine("tokensDef="+collector.tokensDefs);
            //System.Console.WriteLine("actions="+collector.actions);
            //System.Console.WriteLine("scopes="+collector.scopes);
        }
Beispiel #3
0
 public SymbolCollector(Grammar g)
 {
     this.g = g;
     this.errMgr = g.tool.errMgr;
 }
 public BasicSemanticChecks(Grammar g, RuleCollector ruleCollector)
 {
     this.g = g;
     this.ruleCollector = ruleCollector;
     this.errMgr = g.tool.errMgr;
 }
Beispiel #5
0
 public AntlrTool(string[] args)
 {
     this.args = args;
     defaultListener = new DefaultToolListener(this);
     errMgr = new ErrorManager(this);
     errMgr.SetFormat(msgFormat);
     HandleArgs();
 }
Beispiel #6
0
 public RuleCollector(Grammar g)
 {
     this.g = g;
     this.errMgr = g.tool.errMgr;
 }