Package org.lilypondbeans.jccparser.reparse

Examples of org.lilypondbeans.jccparser.reparse.ReparseException


                nd.reparse(env); // reparseChilds(node.jjtGetChild(x));
            }
        }
      
        if(parsedScore==null){
            ReparseException ex=new ReparseException("Score Nr "+String.valueOf(scoreNr)+(midi?" for \\midi ": " for \\layout ")+" not found",null,jjtGetLastToken(),this);
            ex.isHint=true;
            throw ex;
        }
        parsedScore.reparse(env);
        env.currentContext = parsedScore;
View Full Code Here


            parser.syntaxErrors.add(ex);
            //  Logger.getLogger(LyParser.class.getName()).log(Level.INFO, null, ex);
        } catch (Exception ex) {
            Exceptions.printStackTrace(ex);

            ReparseException pe = new ReparseException(ex.getMessage(), ex, null, null);

            parser.syntaxErrors.add(pe);
            // ex.printStackTrace();
            //   Logger.getLogger(LyParser.class.getName()).log(Level.INFO, null, ex);
        }
View Full Code Here

                Token token = syntaxError.currentToken;
                String msg = syntaxError.getMessage();
                boolean isHint = false;
                if (syntaxError instanceof ReparseException) {
                    ReparseException pex = (ReparseException) syntaxError;
                    pex = pex.expandIncludedFile();
                    isHint = pex.isHint;
                    msg = pex.getMessage();
                    if (pex.syntaxErrors != null && pex.syntaxErrors.size() > 0) {
                        msg = msg + "\n\t" + pex.syntaxErrors.get(0).getMessage();
                    }
                    token = pex.currentToken;
                    syntaxError = pex;
View Full Code Here

                try {
                    jjtGetChild(x).reparse(enc);
                } catch (ParseException ex) {
                    throw ex;
                } catch (Exception ex) {
                    ReparseException pe = new ReparseException(ex.getMessage(),ex,jjtGetChild(x).firstToken,jjtGetChild(x));
                    throw pe;
                }
                env.currentScore = enc.currentScore;//global
                env.unfoldRepeats=enc.unfoldRepeats;//global
                if (env.currentScore == null) {
View Full Code Here

    }
    public static long MAX_LINE_LEN = 850;

    public void calcPositions() throws Exception{
        if(score.getAllStaff()==null||score.getAllStaff().size()==0){
            ReparseException ex=new ReparseException("score doesn't contain staffs",null, score.jjtGetLastToken(), score);
            throw ex;
        }
        LayoutEnv env = new LayoutEnv();

        env.lastSignature = ASTKey.getPitchSignature(0);//c-major
View Full Code Here

            } catch (ParseException ex) {
                throw ex;
            } catch (Exception ex) {
               
                // Object test=jjtGetChild(x);jjtGetChild(x).reparse(env);
                ReparseException pe = new ReparseException(ex.getMessage(), ex,jjtGetChild(x).firstToken,jjtGetChild(x));
                throw pe;
            }

        }
    }
View Full Code Here

        if (text != null) {
            try {
                Parser childParser =  root.parser.getMultiParser().createParser(name);
                ASTDocument doc = childParser.Document();
                if (childParser.syntaxErrors.size() > 0) {
                    ReparseException ex = new ReparseException("errors in file " + name, null, jjtGetFirstToken(), this);
                    ex.syntaxErrors = childParser.syntaxErrors;
                    throw ex;
                }
                children = doc.children;
                if(children==null)
                    children=children;
                for (Node ch : children) {
                    ch.jjtSetParent(this);
                }
                super.reparse(env);
            } catch (ReparseException ex1) {
                throw ex1;
            } catch (Exception ex) {
                ReparseException pe = new ReparseException("errors in file " + name, ex, jjtGetFirstToken(), this);

              //  pe.initCause(ex);
                ex.printStackTrace();
                throw pe;
            }
View Full Code Here

TOP

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

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.