Example #1
0
        public GlobNode Parse(string text = null)
        {
            if (text != null)
                this._scanner = new Scanner(text);

            this.AcceptIt();
            var path = this.ParseTree();
            if (this._currentToken.Kind != TokenKind.EOT)
            {
                throw new Exception("Expected EOT");
            }

            return path;
        }
Example #2
0
 public Parser(string pattern = null)
 {
     if (!string.IsNullOrEmpty(pattern))
         this._scanner = new Scanner(pattern);
 }
Example #3
0
 private void InitializeScanner(string pattern)
 {
     this._scanner = new Scanner(pattern);
     this._currentToken = _scanner.Scan();
 }