/** * Parses the next sentence from the current token source. * * @return The fully parsed syntax tree for the next sentence. * * @throws SourceCodeException If the source being parsed does not match the grammar. */ public Sentence<Clause> parse() throws SourceCodeException { return new SentenceImpl<Clause>(parser.clause()); } }
/** * Parses the next sentence from the current token source. * * @return The fully parsed syntax tree for the next sentence. * * @throws SourceCodeException If the source being parsed does not match the grammar. */ public Sentence<Clause> parse() throws SourceCodeException { return new SentenceImpl<Clause>(parser.clause()); } }
/** * Parses the next sentence from the current token source. * * @return The fully parsed syntax tree for the next sentence, or null if no more sentences are available, for * example, because an end of file has been reached. * * @throws SourceCodeException If the source being parsed does not match the grammar. */ public Sentence<Clause> parse() throws SourceCodeException { return new SentenceImpl<Clause>(parser.sentence()); }
/** * Parses the next sentence from the current token source. * * @return The fully parsed syntax tree for the next sentence. * * @throws SourceCodeException If the source being parsed does not match the grammar. */ public Sentence<Term> parse() throws SourceCodeException { try { return new SentenceImpl<Term>(parser.termSentence()); } catch (SourceCodeException e) { throw new RuntimeException(e); } } }
/** * Parses the next sentence from the current token source. * * @return The fully parsed syntax tree for the next sentence. * * @throws SourceCodeException If the source being parsed does not match the grammar. */ public Sentence<Term> parse() throws SourceCodeException { try { return new SentenceImpl<Term>(parser.termSentence()); } catch (SourceCodeException e) { throw new IllegalStateException(e); } } }
/** * Parses the next sentence from the current token source. * * @return The fully parsed syntax tree for the next sentence, or null if no more sentences are available, for * example, because an end of file has been reached. * * @throws SourceCodeException If the source being parsed does not match the grammar. */ public Sentence<Clause> parse() throws SourceCodeException { if (parser.peekAndConsumeEof()) { return null; } else { return new SentenceImpl<Clause>(parser.sentence()); } } }
/** * Parses the next sentence from the current token source. * * @return The fully parsed syntax tree for the next sentence, or null if no more sentences are available, for * example, because an end of file has been reached. * * @throws SourceCodeException If the source being parsed does not match the grammar. */ public Sentence<Clause> parse() throws SourceCodeException { if (parser.peekAndConsumeEof()) { return null; } else { return new SentenceImpl<Clause>(parser.sentence()); } } }