예제 #1
0
 public Matcher(
     string pattern,
     SymbolBase outcome            = null,
     ForeignContextRef context     = null,
     Condition nextCondition       = null,
     Disambiguation disambiguation = Disambiguation.Undefined)
     : this(
         ScanPattern.CreateRegular(pattern),
         outcome,
         context,
         nextCondition,
         disambiguation)
 {
 }
예제 #2
0
        public Matcher(
            ScanPattern pattern,
            SymbolBase outcome            = null,
            ForeignContextRef context     = null,
            Condition nextCondition       = null,
            Disambiguation disambiguation = Disambiguation.Undefined)
        {
            this.Pattern       = pattern;
            this.Outcome       = outcome;
            this.Context       = context;
            this.NextCondition = nextCondition;

            if (disambiguation == Disambiguation.Undefined)
            {
                this.Disambiguation = pattern.DefaultDisambiguation;
            }
            else
            {
                this.Disambiguation = disambiguation;
            }

            this.Joint = new Joint();
        }