public void RecordDef() { lexer.CharStream = new ANTLRStringStream("type A = record a : integer; b,c : L end;"); tokens.TokenSource = lexer; parser = new PascalParser(tokens); var res = parser.recordDef(); Assert.AreEqual(res.GetChildren().Count, 3); }