예제 #1
0
 public object VisitAlternationList(AlternationListNode alt)
 {
     tabWrite("Alt");
     level++;
     alt.Nodes.Select(n => n.Visit(this)).ToList();
     level--;
     return(null);
 }
예제 #2
0
            public Tuple <State, State> VisitAlternationList(AlternationListNode alt)
            {
                if (alt.Nodes.Count == 0)
                {
                    throw new Exception("This should never happen, but if it did the start and stop starts would not get added to the list.");
                }

                var start = new State();
                var stop  = new State();

                foreach (var ch in alt.Nodes.Select(n => n.Visit(this)))
                {
                    addLambda(start, ch.Item1);
                    addLambda(ch.Item2, stop);
                }
                return(new Tuple <State, State>(start, stop));
            }
예제 #3
0
 public AstNode VisitAlternationList(AlternationListNode alt)
 {
     return(new AlternationListNode(alt.Nodes.Select(n => n.Visit(this))));
 }
예제 #4
0
 public T VisitAlternationList(AlternationListNode alt)
 {
     return(default(T));
 }