コード例 #1
0
ファイル: Program.cs プロジェクト: lallouslab/RegexEngine
 public object VisitAlternationList(AlternationListNode alt)
 {
     tabWrite("Alt");
     level++;
     alt.Nodes.Select(n => n.Visit(this)).ToList();
     level--;
     return(null);
 }
コード例 #2
0
ファイル: NFA.cs プロジェクト: lallouslab/RegexEngine
            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));
 }