@Override public void setFileName(final String fileName) { AbstractTokenManager.setFileName(fileName); }
/** * Returns a detailed message for the Error when it is thrown by the * token manager to indicate a lexical error. * Parameters : * EOFSeen : indicates if EOF caused the lexical error * curLexState : lexical state in which this error occurred * errorLine : line number when the error occurred * errorColumn : column number when the error occurred * errorAfter : prefix that was seen before this error occurred * curchar : the offending character * Note: You can customize the lexical error message by modifying this method. */ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { return("Lexical error in file " + AbstractTokenManager.getFileName() + " at line " + errorLine + ", column " + errorColumn + ". Encountered: " + (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + "after : \"" + addEscapes(errorAfter) + "\""); }
/** * Returns a detailed message for the Error when it is thrown by the * token manager to indicate a lexical error. * Parameters : * EOFSeen : indicates if EOF caused the lexical error * curLexState : lexical state in which this error occurred * errorLine : line number when the error occurred * errorColumn : column number when the error occurred * errorAfter : prefix that was seen before this error occurred * curchar : the offending character * Note: You can customize the lexical error message by modifying this method. */ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { return("Lexical error in file " + AbstractTokenManager.getFileName() + " at line " + errorLine + ", column " + errorColumn + ". Encountered: " + (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + "after : \"" + addEscapes(errorAfter) + "\""); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); throw new UnsupportedOperationException("parse(Reader) is not supported for Python"); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); throw new UnsupportedOperationException("parse(Reader) is not supported for Matlab"); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); throw new UnsupportedOperationException("parse(Reader) is not supported for C++"); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); throw new UnsupportedOperationException("parse(Reader) is not supported for Objective-C"); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); return createJavaParser(source).CompilationUnit(); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); return createPLSQLParser(source).Input(); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); return new net.sourceforge.pmd.lang.jsp.ast.JspParser(new SimpleCharStream(source)).CompilationUnit(); }
@Override public Node parse(final String fileName, final Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); return new net.sourceforge.pmd.lang.vm.ast.VmParser(new VelocityCharStream(source, 1, 1)).process(); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); return new net.sourceforge.pmd.lang.vf.ast.VfParser(new VfSimpleCharStream(source)).CompilationUnit(); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); throw new UnsupportedOperationException("parse(Reader) is not supported for Matlab"); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); throw new UnsupportedOperationException("parse(Reader) is not supported for Objective-C"); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); throw new UnsupportedOperationException("parse(Reader) is not supported for C++"); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); throw new UnsupportedOperationException("parse(Reader) is not supported for Python"); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); return createJavaParser(source).CompilationUnit(); }
@Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); return new net.sourceforge.pmd.lang.vf.ast.VfParser(new VfSimpleCharStream(source)).CompilationUnit(); }