void pass(Prgm prgm) { Program.programName = ((Token)prgm.getTokensList()[0]).value; Block block = (Block)prgm.getTokensList()[1]; processVaribleDeclaration((VaribleDeclarationPart)block.getTokensList()[0]); processStamentPart((StatmentPart)block.getTokensList()[1]); }
static void Main(string[] args) { TokensList tokensList = new TokensList("Output.txt"); try { Prgm prgm = new Prgm(tokensList); TreePass treePass = new TreePass(prgm); } catch (Exception e) { Console.Write(e); } }
public Program() { TokensList tokensList = new TokensList("Output.txt"); try { Prgm prgm = new Prgm(tokensList); TreePass treePass = new TreePass(prgm); } catch (Exception e) { Console.Write(e); isCorrect = false; } }
static public string visit(Prgm prgm) { return(Constants.PROGRAM_STATMENT); }
public TreePass(Prgm prgm) { pass(prgm); }