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; }
public Parser(string pattern = null) { if (!string.IsNullOrEmpty(pattern)) this._scanner = new Scanner(pattern); }
private void InitializeScanner(string pattern) { this._scanner = new Scanner(pattern); this._currentToken = _scanner.Scan(); }