X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftext%2FParser.java;h=2a7700af390646e037dc3eb99e64351a54f73392;hb=cb0161bb413434c393ae09d46001dba66b876875;hp=ccec36a74e37e6f73c6d1b7698b56cdc226a46a8;hpb=31b4f988a9c7cc2b36006e3249e3ba644beb99f6;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/text/Parser.java b/src/main/java/net/pterodactylus/sone/text/Parser.java index ccec36a..2a7700a 100644 --- a/src/main/java/net/pterodactylus/sone/text/Parser.java +++ b/src/main/java/net/pterodactylus/sone/text/Parser.java @@ -1,5 +1,5 @@ /* - * Sone - Parser.java - Copyright © 2010 David Roden + * Sone - Parser.java - Copyright © 2010–2013 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,19 +24,23 @@ import java.io.Reader; * Interface for parsers that can create {@link Part}s from a text source * (usually a {@link Reader}). * + * @param + * The type of the parser context * @author David ‘Bombe’ Roden */ -public interface Parser { +public interface Parser { /** - * Create a {@link Part} from the given text source. + * Create one or more {@link Part}s from the given text source. * + * @param context + * The parser context (may be {@code null}) * @param source * The text source - * @return The parsed part + * @return The parsed parts * @throws IOException * if an I/O error occurs */ - public Part parse(Reader source) throws IOException; + public Iterable parse(C context, Reader source) throws IOException; }