public void InvalidProgramFails(string program)
        {
            var parser = new PascalParser().TheParser;
            var scanner = new ScanStrings(missing_quote){SkipWhitespace = true};
            scanner.Transform = new TransformToLower();

            var result = parser.Parse(scanner);

            Assert.That(result.Success, Is.False);
        }
        public void BasicPascalProgramParsesOK()
        {
            var parser = new PascalParser().TheParser;
            var scanner = new ScanStrings(sample_program){SkipWhitespace = true};
            scanner.Transform = new TransformToLower();

            var result = parser.Parse(scanner);

            Assert.That(result.Success, Is.True, String.Join("\n\n", scanner.ListFailures()));
            Assert.That(result.Value.ToLower(), Is.EqualTo(sample_program.ToLower()));
        }