示例#1
0
        public DeclarationList parseMString(String code)
        {
            context = Context.newGlobalsContext();
            MCleverParser parser = new MCleverParser(code);

            parser.ErrorHandler = new FatalErrorStrategy();
            return(parser.parse_declaration_list());
        }
示例#2
0
        public DeclarationList parseMResource(String resourceName)
        {
            context = Context.newGlobalsContext();
            Stream input = OpenResource(resourceName);

            try {
                MCleverParser parser = new MCleverParser(input);
                return(parser.parse_declaration_list());
            } finally {
                input.Close();
            }
        }