示例#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);
        }
示例#2
0
文件: Parser.cs 项目: ronsaldo/chela
	public Parser()
	{
		lexer = null;
	}