示例#1
0
        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]);
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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;
            }
        }
示例#4
0
文件: Visitor.cs 项目: licar/syntax
 static public string visit(Prgm prgm)
 {
     return(Constants.PROGRAM_STATMENT);
 }
示例#5
0
 public TreePass(Prgm prgm)
 {
     pass(prgm);
 }