예제 #1
0
        static void Main(string[] args)
        {
            string code = File.ReadAllText("in.txt");

            // strip windows line endings out
            code = code.Replace("\r", "");

            Lexer  lexer  = new Lexer();
            string tokens = lexer.MakeAnalyze(code);

            Syntaxer syntaxer = new Syntaxer();
            string   result   = syntaxer.MakeAnalyze(tokens);

            File.WriteAllText("out.txt", result);
        }