Package ptolemy.moml

Examples of ptolemy.moml.MoMLParser.reset()


                //URL modelURL = new File(modelName).toURL();
                try {
                    URL modelURL = FileUtilities.nameToURL(modelName, null,
                            null);
                    System.out.println("Parsing: " + modelURL);
                    parser.reset();
                    parser.parse(null, modelURL);
                } catch (Exception ex) {
                    System.err.println("Warning, failed to parse " + modelName);
                    ex.printStackTrace();
                }
View Full Code Here


                    MoMLParser momlParser = null;

                    // Check to see whether there is a parser...
                    if (context != null) {
                        momlParser = ParserAttribute.getParser(context);
                        momlParser.reset();
                    }

                    if (momlParser == null) {
                        // There is no previously associated parser
                        // (can only happen if context is null).
View Full Code Here

                        // Reset the parser and reload so that if
                        // we run the model and then generate code,
                        // we get the same results when generating code.
                        // If we don't do this, then the nightly tests
                        // fail because the results don't match.
                        parser.reset();
                        MoMLParser.purgeModelRecord(modelURL);
                        toplevel = (CompositeActor) parser
                                .parse(null, modelURL);
                    } catch (Exception ex) {
                        throw new Exception("Failed to parse \"" + args[i]
View Full Code Here

                // Make sure that the MoMLParser._modified flag is reset
                // If we don't call reset here, then the second time
                // the code generator is run, we will be prompted to
                // save the model because the first time we ran
                // the code generator the model was marked as modified.
                parser.reset();

                NamedObj toplevel = null;

                try {
                    try {
View Full Code Here

            throws Exception {
        if (_initialSpecificationURL == null) {
            _initialSpecificationURL = specificationURL;
        }
        MoMLParser parser = new MoMLParser();
        parser.reset();

        Configuration configuration = (Configuration) parser.parse(
                specificationURL, specificationURL);

        // If the toplevel model is a configuration containing a directory,
View Full Code Here

    public static GraphMatcher match(String ruleXMLFile, String hostXMLFile,
            MatchCallback callback) throws Exception {
        MoMLParser parser = new MoMLParser();
        TransformationRule rule = (TransformationRule) parser.parse(null,
                new File(ruleXMLFile).toURI().toURL());
        parser.reset();
        CompositeEntity host = (CompositeEntity) parser.parse(null, new File(
                hostXMLFile).toURI().toURL());

        GraphMatcher matcher = new GraphMatcher();
        if (callback != null) {
View Full Code Here

                    // Make sure that the MoMLParser._modified flag is reset
                    // If we don't call reset here, then the second time
                    // the code generator is run, we will be prompted to
                    // save the model because the first time we ran
                    // the code generator the model was marked as modified.
                    parser.reset();

                    parserAttribute.setParser(parser);
                }

                // The name might be "blank" which is confusing.
View Full Code Here

                    // Make sure that the MoMLParser._modified flag is reset
                    // If we don't call reset here, then the second time
                    // the code generator is run, we will be prompted to
                    // save the model because the first time we ran
                    // the code generator the model was marked as modified.
                    parser.reset();

                    NamedObj toplevel = null;

                    try {
                        try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.