Package org.lilypondbeans.jccparser.reparse

Examples of org.lilypondbeans.jccparser.reparse.Env


            if (nd.id == ParserTreeConstants.JJTSCORE) {
                bookOrScoreFound = true;
                ASTScore sc = (ASTScore) nd;
                sc.root = this;
                if (this.childContexts.size() == 0) {
                    Env env=new Env();
                    env.currentScore=sc;
                    this.createVirtualContextIfNeeded(env, ASTContext.TYPE_BOOK, sc);
                } else {
                    ASTBook book = (ASTBook) this.childContexts.get(0);
                    sc.setParentContext(book);
                }
            }
        }
        parsedScore = null;
        if (bookOrScoreFound) {
            parsedScore = findScore(scoreNr, midi);
        } else {
            //if nothing found->took first Block and create Score manuell
            for (int x = 0; x < jjtGetNumChildren(); x++) {
                SimpleNode nd = jjtGetChild(x);
                if (nd.id == ParserTreeConstants.JJTBLOCK) {
                    ASTBlock sc = (ASTBlock) nd;
                    sc.root = this;
                    sc.root.createVirtualContextIfNeeded(new Env(), ASTContext.TYPE_SCORE, nd);
                    parsedScore = (ASTScore) nd.getParentContext();
                    break;
                }
            }
        }

        Env env = new Env();
        env.currentContext = this;
        for (int x = 0; x < jjtGetNumChildren(); x++) {
            SimpleNode nd = jjtGetChild(x);
            if (nd.id == ParserTreeConstants.JJTSCORE || nd.id == ParserTreeConstants.JJTBOOK
                    || (nd.id == ParserTreeConstants.JJTBLOCK && ((ASTBlock) nd).getParentContext() == parsedScore))
View Full Code Here


                }
            }

            for (int r = 1; r < repeats; r++) {
                SimpleNode cloneBlock =  (SimpleNode)block.cloneMeWithChilds();//new ASTBlock(block.parser,ParserTreeConstants.JJTBLOCK);
                Env nEnv = env.cloneMe();
                cloneBlock.reparse(nEnv);
                env.beattime = nEnv.beattime;//beattime goes on
                if (alternative == null) {
                    children[r - 1] = cloneBlock;
                } else {
                    SimpleNode nalt = allAlt.get(r - 1);//new ASTBlock(block.parser,ParserTreeConstants.JJTBLOCK);
                    Env aEnv = env.cloneMe();
                    nalt.jjtSetParent(this);
                    nalt.reparse(aEnv);
                    env.beattime = aEnv.beattime;//beattime goes on
                    children[2 * r - 2] = cloneBlock;
                    children[2 * r - 1] = nalt;
View Full Code Here

                    if (env.voiceDirection == 0) {
                        env.voiceDirection = 1;
                    }
                }

                Env enc = env.cloneMe();
                if (env.currentScore != null) {
                    enc.currentScore.highestBeattime = -1;
                }
                try {
                    jjtGetChild(x).reparse(enc);
View Full Code Here

TOP

Related Classes of org.lilypondbeans.jccparser.reparse.Env

Copyright © 2018 www.massapicom. 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.