public IEnumerable<StyledToken> Parse(string source) { if (String.IsNullOrEmpty(source)) return new List<StyledToken>(); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(source))) { var s = new Scanner(ms); var p = new Parser(s); p.Parse(); return p.Markers; } }
public Parser(Scanner scanner) { ErrorCount = 0; this.scanner = scanner; errors = new Errors(this); }