示例#1
0
 private ParseContext(IEnumerable <TToken> tokens, TokenTable <TToken> table) : this(table)
 {
     if (tokens == null)
     {
         throw new ArgumentNullException(nameof(tokens));
     }
     _tokens = new List <TToken>(tokens);
 }
示例#2
0
        private ParseContext(TokenTable <TToken> table)
        {
            if (table == null)
            {
                throw new ArgumentNullException(nameof(table));
            }

            TokenTable      = table;
            _sequenceChecks = new List <ParseBranch <TToken> >();

            Environment = new ParseEnvironment();
        }
示例#3
0
 private ParseContext(List <TToken> tokens, int offset, TokenTable <TToken> table) : this(table)
 {
     _tokens = tokens;
     _offset = offset;
 }
示例#4
0
 public static ParseContext <TToken> Parse(IEnumerable <TToken> tokens, TokenTable <TToken> table)
 {
     return(new ParseContext <TToken>(tokens, table));
 }