Example #1
0
        public static bool IsNullable(this LexMatchType matchType)
        {
            switch (matchType)
            {
            case LexMatchType.Null:
                return(true);

            default:
                return(false);
            }
        }
Example #2
0
 public SequenceLexRule(LexMatchType matchType)
     : this(matchType, new List <ILexRule>())
 {
     return;
 }
Example #3
0
 public SequenceLexRule(LexMatchType matchType, IList <ILexRule> rules)
 {
     MatchType = matchType;
     _rules    = rules;
 }
Example #4
0
 public bool Matches(LexMatchType matchType)
 {
     return(MatchType == matchType);
 }
Example #5
0
 public LexNode(LexMatchType matchType, int start, string text)
 {
     MatchType = matchType;
     Text      = text;
     Start     = start;
 }
Example #6
0
 public FunctionalLexRule(LexMatchType matchType, LexMatcher lexFunction)
 {
     LexFunction = lexFunction;
     MatchType   = matchType;
 }
Example #7
0
 public ContainerParseRule(ParseMatchType matchType, LexMatchType lexMatchType)
     : this(matchType, l => l.MatchType == lexMatchType, new List <IParseRule>())
 {
     return;
 }