public MainWindow() { InitializeComponent(); ContentParser cont = new ContentParser(); ScriptParser scriptPars = new ScriptParser(); if (cont.startParse(System.IO.Path.GetFullPath("characters/fate.txt"))) { scr = cont.script; scr.addContent(); } else { System.Windows.MessageBox.Show("Fail Characters"); } try { LexerParser lexpars = new LexerParser(); if (lexpars.startParse(System.IO.Path.GetFullPath("new_bidon.txt"))) { scr = lexpars.script; scr.addContent(); ev = new ScriptEval(gScreen); } else { System.Windows.MessageBox.Show("Fail"); } } catch (Exception e) { System.Windows.MessageBox.Show(e.ToString()); System.Windows.MessageBox.Show(e.StackTrace); } }
public bool startParse(string filepath) { script = new IrisScript(); //lexBuf.Clear(); lexBuf = new List<Token>(); lineNumber = 1; colNumber = 1; indiceToken = 0; try { fileStream = new StreamReader(filepath); codeToParse = fileStream.ReadLine(); } catch (Exception e) { return false; } return startParse(); }
public static void addScript(IrisScript scr) { scr.addContent(); }
public LexParsa() { script = new IrisScript(); }
public ContentParser() { script = new IrisScript(); }