Пример #1
0
        private Terminal Map(TerminalExpr terminalExpr)
        {
            if (!Terminals.TryGetValue(terminalExpr, out var mapped))
            {
                mapped = terminalExpr.Provision.Terminal;
                Terminals.Add(terminalExpr, mapped);
            }

            return(mapped);
        }
Пример #2
0
 public static ChainExpr operator +(char @char, ChainExpr chain)
 {
     return(new ChainExpr(Enumerable.Repeat(TerminalExpr.From(DfaProvision.From(@char.ToString(), @char)), 1).Concat(chain)));
 }