예제 #1
0
        public SreExpr NOrMoreMatches(Num n, OpenSreExpr inner)
        {
            int count = int.Parse(n.Text);

            return(new SreExpr {
                Node = new RepeatNode(inner.Node, count, int.MaxValue)
            });
        }
예제 #2
0
        public SreExpr NToMMatches(Num n, Num m, OpenSreExpr inner)
        {
            int from = int.Parse(n.Text);
            int to   = int.Parse(m.Text);

            return(new SreExpr {
                Node = new RepeatNode(inner.Node, from, to)
            });
        }
예제 #3
0
 public SreExpr ZeroOrOne(OpenSreExpr inner)
 {
     return(new SreExpr {
         Node = RepeatNode.Optional(inner.Node)
     });
 }
예제 #4
0
 public SreExpr OneOrMore(OpenSreExpr items)
 {
     return(new SreExpr {
         Node = RepeatNode.OneOrMore(items.Node)
     });
 }
예제 #5
0
 public SreExpr Seq2(OpenSreExpr inner)
 {
     return(Seq1(inner));
 }
예제 #6
0
 public SreExpr Seq1(OpenSreExpr inner)
 {
     return(new SreExpr {
         Node = inner.Node
     });
 }
예제 #7
0
 public SreExpr ZeroOrOne(OpenSreExpr inner)
 {
     return new SreExpr { Node = RepeatNode.Optional(inner.Node) };
 }
예제 #8
0
 public SreExpr ZeroOrMore(OpenSreExpr items)
 {
     return new SreExpr { Node = RepeatNode.ZeroOrMore(items.Node) };
 }
예제 #9
0
 public SreExpr Seq2(OpenSreExpr inner)
 {
     return Seq1(inner);
 }
예제 #10
0
 public SreExpr Seq1(OpenSreExpr inner)
 {
     return new SreExpr { Node = inner.Node };
 }
예제 #11
0
 public SreExpr NToMMatches(Num n, Num m, OpenSreExpr inner)
 {
     int from = int.Parse(n.Text);
     int to = int.Parse(m.Text);
     return new SreExpr { Node = new RepeatNode(inner.Node, from, to) };
 }
예제 #12
0
 public SreExpr NOrMoreMatches(Num n, OpenSreExpr inner)
 {
     int count = int.Parse(n.Text);
     return new SreExpr { Node = new RepeatNode(inner.Node, count, int.MaxValue) };
 }