Exemple #1
0
        public void CompileFile(Stream file, string fileName)
        {
            // Create the lexer.
            Lexer lexer = new Lexer(fileName, file);

            // Create the parser.
            Parser parser = new Parser();
            parser.Lexer = lexer;

            // Parse the file.
            Benchmark.Begin();
            AstNode node = parser.Parse();
            Benchmark.End("Parse file " + fileName);

            // Prepare the file.
            PrepareFile(node, fileName);
        }
Exemple #2
0
	public Parser()
	{
		lexer = null;
	}