コード例 #1
0
        public INfaVM Visit(CharSetNode node, INfaVM code)
        {
            code.Fetch();
            if (node.Characters.Count != 1)
            {
                throw new NotImplementedException("TODO: ISreVM Compilation of multiple charact csets.");
            }

            code.IsA(node.Characters.First());
            return(code);
        }
コード例 #2
0
        public NfaFragment Visit(CharSetNode node)
        {
            var s = new NfaState(node.Characters);

            return(new NfaFragment
            {
                Start = s,
                Outs = new List <List <NfaState> > {
                    s.Out
                }
            });
        }
コード例 #3
0
 public TextWriter Visit(CharSetNode node)
 {
     NewLine();
     WriteIntSet(node.Characters);
     return(writer);
 }