Beispiel #1
0
 public CreateExpressionRule(
     IParseRule Rule,
     IEnumerable <CreateExprFunc> CreateFunctions
     )
 {
     m_Rule             = Rule;
     m_CreateExpression = CreateFunctions;
 }
Beispiel #2
0
        protected virtual Either <IParseState> _MatchRule(IParseRule Rule, IParseState State)
        {
            var t_NewState = Rule
                             .Match(State);

            return(!t_NewState.HasError() ?
                   t_NewState :
                   new Exception($"Match not found for rule: {Rule}"));
        }
Beispiel #3
0
 public CreateExpressionRule(
     IParseRule Rule,
     CreateExprFunc CreateExpression)
 {
     m_Rule             = Rule;
     m_CreateExpression = new List <CreateExprFunc> {
         CreateExpression
     };
 }
Beispiel #4
0
 public RepeatRule(IParseRule Rule)
     : base(new List <IParseRule> {
     Rule
 })
 {
 }