Exemple #1
0
        // combines the regexes (their internal NFA-like structure)
        public static TokenAutomaton CombinedAutomaton(params TokenType[] ts)
        {
            Regex[] rs = new Regex[ts.Length];
            for (int i = 0; i < ts.Length; i++)
            {
                rs[i] = ts[i].regex;
            }
            Regex combined = Regex.Union(rs);

            return(combined.ConstructAutomaton());
        }