Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using pseudo_c;
- using Hime.Redist.Parsers;
- namespace parser
- {
- class Program
- {
- public static void Main(string[] args)
- {
- pseudo_cLexer lexer = null;
- pseudo_cParser parser = null;
- ParserActions actions = new ParserActions();
- Console.Write("Input filename: ");
- String filename = Console.ReadLine();
- if(!File.Exists(filename)) {
- Console.WriteLine("{0} does not exist.",filename);
- Console.Read();
- return;
- }
- TextReader reader = new StreamReader(filename);
- try {
- lexer = new pseudo_cLexer(reader);
- Console.WriteLine("----- Lexer Integrity Test -----");
- Console.WriteLine("Complete");
- Console.WriteLine("----- Parser -----");
- parser = new pseudo_cParser(lexer, actions);
- //parser.Analyse();
- }
- catch (Exception ex) {
- Console.WriteLine(ex.ToString());
- }
- reader.Close();
- Console.Read();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment