Beispiel #1
0
        private Terminal Map(TerminalExpr terminal)
        {
            if (!Terminals.TryGetValue(terminal, out var mapped))
            {
                mapped = new Terminal(terminal.Provision);
                Terminals.Add(terminal, mapped);
            }

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