Esempio n. 1
0
 public static CoreParser MB(CoreParser parser)
 {
     return(new ParserSerial(parser, 0, 1));
 }
Esempio n. 2
0
 public static CoreParser OI(CoreParser parser)
 {
     return(new ParserSerial(parser, 1, int.MaxValue));
 }
Esempio n. 3
0
 public static CoreParser SEQ(CoreParser parser, string delimiter)
 {
     return(MB(parser + T(delimiter) | parser));
 }
Esempio n. 4
0
 public static CoreParser S(CoreParser parser, int minTimes, int maxTimes)
 {
     return(new ParserSerial(parser, minTimes, maxTimes));
 }
Esempio n. 5
0
 /// <summary>
 /// This function does the same functional as MB.
 /// One tries parse rule 0 or 1 times and returns SyntaxTreeNode anyway.
 /// But there is default value here. (Default is null)
 /// </summary>
 /// <param name="parser">Internal rule for parsing</param>
 /// <returns>SyntaxTreeNode class object</returns>
 public static CoreParser OPT(CoreParser parser)
 {
     return(new ParserOptional(parser));
 }