Beispiel #1
0
        public override dynamic VisitFile([NotNull] FuzzyParser.FileContext context)
        {
            tnorm   = GetFunction(context.ID(1).GetText().ToLower());
            tconorm = GetFunction(context.ID(2).GetText().ToLower());

            string defuzzy = null;

            if (!(context.ID(3) is null))
            {
                defuzzy = context.ID(3).GetText();
            }

            return(context.ID(0).GetText(), defuzzy, from x in context.fuzzy_rule() select Visit(x));
        }
Beispiel #2
0
 /// <summary>
 /// Visit a parse tree produced by the <c>File</c>
 /// labeled alternative in <see cref="FuzzyParser.compileUnit"/>.
 /// <para>
 /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/>
 /// on <paramref name="context"/>.
 /// </para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 /// <return>The visitor result.</return>
 public virtual Result VisitFile([NotNull] FuzzyParser.FileContext context)
 {
     return(VisitChildren(context));
 }