示例#1
0
 public SimpleSpace()
     :
     base(
         inp => Prim.Many(Prim.Character(' '))
         .Parse(inp)
         )
 {
 }
示例#2
0
        public static Parser <ImmutableList <A> > SepBy1 <A, B>(Parser <A> parser, Parser <B> sepParser)
        {
            if (parser == null)
            {
                throw new ArgumentNullException("parser");
            }
            if (sepParser == null)
            {
                throw new ArgumentNullException("sepParser");
            }

            return(from x in parser
                   from xs in Prim.Many <A>(sepParser.And(parser))
                   select x.Cons(xs));
        }