else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} _ttype = _returnToken.getType(); _returnToken.setType(_ttype); return _returnToken; throw new TokenStreamRecognitionException(e); throw new TokenStreamIOException(((CharStreamIOException)cse).io); throw new TokenStreamException(cse.getMessage());
rootDoc.put(packagePath, packageDoc); } catch (RecognitionException e) { log.error("ignored due to RecognitionException: " + filename + " [" + e.getMessage() + "]"); log.debug("ignored due to RecognitionException: " + filename + " [" + e.getMessage() + "]", e); } catch (TokenStreamException e) { log.error("ignored due to TokenStreamException: " + filename + " [" + e.getMessage() + "]"); log.debug("ignored due to TokenStreamException: " + filename + " [" + e.getMessage() + "]", e);
throw new ParseException( I18n .err( I18n.ERR_07004_PARSER_FAILURE_ACI_ITEM, spec, e.getLocalizedMessage() ), 0 ); throw new ParseException( I18n .err( I18n.ERR_07004_PARSER_FAILURE_ACI_ITEM, spec, e.getLocalizedMessage() ), e.getColumn() );
throw new ParseException( "Null", 0 ); String msg = I18n.err( I18n.ERR_04246, matchingRuleUseDescription, re.getMessage(), re.getColumn() ); LOG.error( msg ); throw new ParseException( msg, re.getColumn() ); String msg = I18n.err( I18n.ERR_04247, matchingRuleUseDescription, tse.getMessage() ); LOG.error( msg ); throw new ParseException( msg, 0 );
message.append(token.toString()); } while (token.getType() != antlr.Token.EOF_TYPE); } catch (antlr.TokenStreamException e3) { IllegalArgumentException e2 = new IllegalArgumentException(e.getMessage() + ". Lexer stream: " + message.toString()); e2.initCause(e); antlr.DumpASTVisitor visitor = new antlr.DumpASTVisitor(); visitor.visit(ast); IllegalArgumentException e2 = new IllegalArgumentException(e.getMessage()); e2.initCause(e); throw e2;
m_log.debug(e.getMessage(), e); m_reporter.reportTokenStreamError(resourceLocation, e.getMessage()); } catch (RecognitionException e) { m_log.debug(e.getMessage(), e); m_reporter.reportParseError(new Location(resourceLocation, e.getLine(), e.getColumn()), e.getMessage()); } catch (IOException e) { m_log.debug(e.getMessage(), e);
public Message next() throws ParseException { try { return internalParser.next(); } catch (RecognitionException e) { throw new ParseException(e.getMessage(), e, e.getLine()); } catch (TokenStreamException e) { throw new ParseException(e.getMessage(), e, -1); } }
/** * Parses an ACIItem without exhausting the parser. * * @param spec * the specification to be parsed * @throws ParseException * if there are any recognition errors (bad syntax) */ public synchronized void parse( String spec ) throws ParseException { if ( spec == null || spec.trim().equals( "" ) ) { return; } reset( spec ); // reset and initialize the parser / lexer pair try { this.checker.wrapperEntryPoint(); } catch ( TokenStreamException e ) { throw new ParseException( I18n .err( I18n.ERR_04004_PARSER_FAILURE_ACI_ITEM, spec, e.getLocalizedMessage() ), 0 ); } catch ( RecognitionException e ) { throw new ParseException( I18n .err( I18n.ERR_04004_PARSER_FAILURE_ACI_ITEM, spec, e.getLocalizedMessage() ), e.getColumn() ); } }
throw new ParseException( "Null", 0 ); String msg = I18n.err( I18n.ERR_04249, nameFormDescription, re.getMessage(), re.getColumn() ); LOG.error( msg ); throw new ParseException( msg, re.getColumn() ); String msg = I18n.err( I18n.ERR_04250, nameFormDescription, tse.getMessage() ); LOG.error( msg ); throw new ParseException( msg, 0 );
message.append(token.toString()); } while (token.getType() != antlr.Token.EOF_TYPE); } catch (antlr.TokenStreamException e3) { IllegalArgumentException e2 = new IllegalArgumentException(e.getMessage() + ". Lexer stream: " + message.toString()); e2.initCause(e); antlr.DumpASTVisitor visitor = new antlr.DumpASTVisitor(); visitor.visit(ast); IllegalArgumentException e2 = new IllegalArgumentException(e.getMessage()); e2.initCause(e); throw e2;
private Catalog parseCatalog(ExtendedCatalogParser parser) throws ParseException { try { parser.catalog(); } catch (RecognitionException e) { throw new UnexpectedTokenException(e.getMessage(), e, e.getLine()); } catch (TokenStreamException e) { throw new ParseException(e.getMessage(), e, -1); } return parser.getCatalog(); }
else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} _ttype = _returnToken.getType(); _ttype = testLiteralsTable(_ttype); _returnToken.setType(_ttype); return _returnToken; throw new TokenStreamRecognitionException(e); throw new TokenStreamIOException(((CharStreamIOException)cse).io); throw new TokenStreamException(cse.getMessage());
throw new ParseException( I18n .err( I18n.ERR_04004_PARSER_FAILURE_ACI_ITEM, spec, e.getLocalizedMessage() ), 0 ); throw new ParseException( I18n .err( I18n.ERR_04004_PARSER_FAILURE_ACI_ITEM, spec, e.getLocalizedMessage(), e.getLine(), e.getColumn() ), e.getColumn() );
throw new ParseException( "Null", 0 ); String msg = I18n.err( I18n.ERR_04252, normalizerDescription, re.getMessage(), re.getColumn() ); LOG.error( msg ); throw new ParseException( msg, re.getColumn() ); String msg = I18n.err( I18n.ERR_04253, normalizerDescription, tse.getMessage() ); LOG.error( msg ); throw new ParseException( msg, 0 );
private void processFile(String filename, File srcFile) throws IOException { String src = DefaultGroovyMethods.getText(srcFile); String packagePath = tool.getPath(filename).replace('\\', FS); String file = tool.getFile(filename); SimpleGroovyPackageDoc packageDoc = (SimpleGroovyPackageDoc) rootDoc.packageNamed(packagePath); if (packageDoc == null) { packageDoc = new SimpleGroovyPackageDoc(packagePath); } if (filename.endsWith("package.html") || filename.endsWith("package-info.java") || filename.endsWith("package-info.groovy")) { processPackageInfo(src, filename, packageDoc); rootDoc.put(packagePath, packageDoc); return; } try { Map<String, GroovyClassDoc> classDocs = getClassDocsFromSingleSource(packagePath, file, src); rootDoc.putAllClasses(classDocs); packageDoc.putAll(classDocs); rootDoc.put(packagePath, packageDoc); } catch (RecognitionException e) { System.err.println("ignored due to RecognitionException: " + filename + " [" + e.getMessage() + "]"); } catch (TokenStreamException e) { System.err.println("ignored due to TokenStreamException: " + filename + " [" + e.getMessage() + "]"); } }
else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} _ttype = _returnToken.getType(); _returnToken.setType(_ttype); return _returnToken; throw new TokenStreamRecognitionException(e); throw new TokenStreamIOException(((CharStreamIOException)cse).io); throw new TokenStreamException(cse.getMessage());
/** * Parses an ACIItem without exhausting the parser. * * @param spec * the specification to be parsed * @return the specification bean * @throws ParseException * if there are any recognition errors (bad syntax) */ public synchronized void parse( String spec ) throws ParseException { if ( spec == null || spec.trim().equals( "" ) ) { return; } reset( spec ); // reset and initialize the parser / lexer pair try { this.checker.wrapperEntryPoint(); } catch ( TokenStreamException e ) { throw new ParseException( I18n.err( I18n.ERR_00004, spec, e.getLocalizedMessage() ), 0 ); } catch ( RecognitionException e ) { throw new ParseException( I18n.err( I18n.ERR_00004, spec, e.getLocalizedMessage() ), e.getColumn() ); } return; }
throw new ParseException( "Null", 0 ); String msg = I18n.err( I18n.ERR_04259, syntaxCheckerDescription, re.getMessage(), re.getColumn() ); LOG.error( msg ); throw new ParseException( msg, re.getColumn() ); String msg = I18n.err( I18n.ERR_04260, syntaxCheckerDescription, tse.getMessage() ); LOG.error( msg ); throw new ParseException( msg, 0 );
private void processFile(String filename, File srcFile) throws IOException { String src = DefaultGroovyMethods.getText(srcFile); String packagePath = tool.getPath(filename).replace('\\', FS); String file = tool.getFile(filename); SimpleGroovyPackageDoc packageDoc = (SimpleGroovyPackageDoc) rootDoc.packageNamed(packagePath); if (packageDoc == null) { packageDoc = new SimpleGroovyPackageDoc(packagePath); } if (filename.endsWith("package.html")) { processHtmlPackage(src, packageDoc); return; } try { Map<String, GroovyClassDoc> classDocs = getClassDocsFromSingleSource(packagePath, file, src); rootDoc.putAllClasses(classDocs); packageDoc.putAll(classDocs); rootDoc.put(packagePath, packageDoc); } catch (RecognitionException e) { System.err.println("ignored due to RecognitionException: " + filename + " [" + e.getMessage() + "]"); } catch (TokenStreamException e) { System.err.println("ignored due to TokenStreamException: " + filename + " [" + e.getMessage() + "]"); } }
else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} _ttype = _returnToken.getType(); _ttype = testLiteralsTable(_ttype); _returnToken.setType(_ttype); return _returnToken; throw new TokenStreamRecognitionException(e); throw new TokenStreamIOException(((CharStreamIOException)cse).io); throw new TokenStreamException(cse.getMessage());