public ParserResult Parse(SourceBuffer buffer) { var p = new Parser(new Scanner(buffer)); p.Parse(); return(new ParserResult(p.Program, p.errors.ErrorList.Count == 0, p.errors.ErrorList)); }
public Scanner(Stream s) { using (var sr = new StreamReader(s)) buffer = new Buffer(sr.ReadToEnd()); Init(); }
public Scanner(SourceBuffer buffer) { this.buffer = buffer; Init(); }