Make minor Javadoc corrections

This commit is contained in:
Zafar Khaja 2013-11-23 15:20:26 +04:00
parent d39c3f439a
commit 755e8de162
2 changed files with 10 additions and 8 deletions

View File

@ -28,6 +28,7 @@ import com.github.zafarkhaja.semver.Version;
import com.github.zafarkhaja.semver.expr.Lexer.Token; import com.github.zafarkhaja.semver.expr.Lexer.Token;
import com.github.zafarkhaja.semver.util.Stream; import com.github.zafarkhaja.semver.util.Stream;
import com.github.zafarkhaja.semver.util.Stream.ElementType; import com.github.zafarkhaja.semver.util.Stream.ElementType;
import com.github.zafarkhaja.semver.util.UnexpectedElementTypeException;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.Iterator; import java.util.Iterator;
import static com.github.zafarkhaja.semver.expr.Lexer.Token.Type.*; import static com.github.zafarkhaja.semver.expr.Lexer.Token.Type.*;
@ -77,7 +78,8 @@ public class ExpressionParser implements Parser<Expression> {
* @param input a string representing the SemVer Expression * @param input a string representing the SemVer Expression
* @return the AST for the SemVer Expressions * @return the AST for the SemVer Expressions
* @throws LexerException when encounters an illegal character * @throws LexerException when encounters an illegal character
* @throws UnexpectedTokenException when encounters an unexpected token type * @throws UnexpectedElementTypeException when consumes a token of an
* unexpected type
*/ */
@Override @Override
public Expression parse(String input) { public Expression parse(String input) {
@ -90,8 +92,8 @@ public class ExpressionParser implements Parser<Expression> {
* *
* <pre> * <pre>
* {@literal * {@literal
* <semver-expr> ::= "!" "(" <semver-expr> ")" * <semver-expr> ::= "(" <semver-expr> ")"
* | "(" <semver-expr> ")" * | "!" "(" <semver-expr> ")"
* | <semver-expr> <boolean-expr> * | <semver-expr> <boolean-expr>
* | <expr> * | <expr>
* } * }
@ -246,10 +248,10 @@ public class ExpressionParser implements Parser<Expression> {
/** /**
* Determines if the following version terminals are part * Determines if the following version terminals are part
* of the {@literal <version-expr>} not-terminal. * of the {@literal <version-expr>} non-terminal.
* *
* @return {@code true} if the following version terminals are * @return {@code true} if the following version terminals are
* part of the {@literal <version-expr>} not-terminal or * part of the {@literal <version-expr>} non-terminal or
* {@code false} otherwise * {@code false} otherwise
*/ */
private boolean isVersionExpression() { private boolean isVersionExpression() {
@ -289,10 +291,10 @@ public class ExpressionParser implements Parser<Expression> {
/** /**
* Determines if the following version terminals are * Determines if the following version terminals are
* part of the {@literal <range-expr>} not-terminal. * part of the {@literal <range-expr>} non-terminal.
* *
* @return {@code true} if the following version terminals are * @return {@code true} if the following version terminals are
* part of the {@literal <range-expr>} not-terminal or * part of the {@literal <range-expr>} non-terminal or
* {@code false} otherwise * {@code false} otherwise
*/ */
private boolean isRangeExpression() { private boolean isRangeExpression() {

View File

@ -49,7 +49,7 @@ public class UnexpectedTokenException extends ParserException {
* Constructs a {@code UnexpectedTokenException} instance * Constructs a {@code UnexpectedTokenException} instance
* with the unexpected token and the expected types. * with the unexpected token and the expected types.
* *
* @param element the unexpected token * @param token the unexpected token
* @param expected an array of the expected token types * @param expected an array of the expected token types
*/ */
UnexpectedTokenException(Token token, Token.Type... expected) { UnexpectedTokenException(Token token, Token.Type... expected) {