//public void EnterEveryRule(Antlr4.Runtime.ParserRuleContext ctx) //{ // throw new NotImplementedException(); //} //public void ExitEveryRule(Antlr4.Runtime.ParserRuleContext ctx) //{ // throw new NotImplementedException(); //} //public void VisitErrorNode(Antlr4.Runtime.Tree.IErrorNode node) //{ // throw new NotImplementedException(); //} //public void VisitTerminal(Antlr4.Runtime.Tree.ITerminalNode node) //{ // throw new NotImplementedException(); //} public override void EnterOpdef(slpParser.OpdefContext context) { Operator op = new Operator(); op.Name = context.OP().GetText(); op.Precedence = int.Parse(context.INT().GetText()); op.Associativity = (Associativity)Enum.Parse(typeof(Associativity), context.assoc().GetText()); operators.Add(op.Name, op); base.EnterOpdef(context); }
/// <summary> /// Exit a parse tree produced by <see cref="slpParser.opdef"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitOpdef([NotNull] slpParser.OpdefContext context) { }