From 755e8de1624bfea9a8aaebe9cc63b2ecc93122ff Mon Sep 17 00:00:00 2001 From: Zafar Khaja Date: Sat, 23 Nov 2013 15:20:26 +0400 Subject: [PATCH] Make minor Javadoc corrections --- .../zafarkhaja/semver/expr/ExpressionParser.java | 16 +++++++++------- .../semver/expr/UnexpectedTokenException.java | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/github/zafarkhaja/semver/expr/ExpressionParser.java b/src/main/java/com/github/zafarkhaja/semver/expr/ExpressionParser.java index ac9dfac..9599e9d 100644 --- a/src/main/java/com/github/zafarkhaja/semver/expr/ExpressionParser.java +++ b/src/main/java/com/github/zafarkhaja/semver/expr/ExpressionParser.java @@ -28,6 +28,7 @@ import com.github.zafarkhaja.semver.Version; import com.github.zafarkhaja.semver.expr.Lexer.Token; import com.github.zafarkhaja.semver.util.Stream; import com.github.zafarkhaja.semver.util.Stream.ElementType; +import com.github.zafarkhaja.semver.util.UnexpectedElementTypeException; import java.util.EnumSet; import java.util.Iterator; import static com.github.zafarkhaja.semver.expr.Lexer.Token.Type.*; @@ -77,7 +78,8 @@ public class ExpressionParser implements Parser { * @param input a string representing the SemVer Expression * @return the AST for the SemVer Expressions * @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 public Expression parse(String input) { @@ -90,8 +92,8 @@ public class ExpressionParser implements Parser { * *
      * {@literal
-     *  ::= "!" "("  ")"
-     *                 | "("  ")"
+     *  ::= "("  ")"
+     *                 | "!" "("  ")"
      *                 |  
      *                 | 
      * }
@@ -246,10 +248,10 @@ public class ExpressionParser implements Parser {
 
     /**
      * Determines if the following version terminals are part
-     * of the {@literal } not-terminal.
+     * of the {@literal } non-terminal.
      *
      * @return {@code true} if the following version terminals are
-     *         part of the {@literal } not-terminal or
+     *         part of the {@literal } non-terminal or
      *         {@code false} otherwise
      */
     private boolean isVersionExpression() {
@@ -289,10 +291,10 @@ public class ExpressionParser implements Parser {
 
     /**
      * Determines if the following version terminals are
-     * part of the {@literal } not-terminal.
+     * part of the {@literal } non-terminal.
      *
      * @return {@code true} if the following version terminals are
-     *         part of the {@literal } not-terminal or
+     *         part of the {@literal } non-terminal or
      *         {@code false} otherwise
      */
     private boolean isRangeExpression() {
diff --git a/src/main/java/com/github/zafarkhaja/semver/expr/UnexpectedTokenException.java b/src/main/java/com/github/zafarkhaja/semver/expr/UnexpectedTokenException.java
index cc10185..f5c4383 100644
--- a/src/main/java/com/github/zafarkhaja/semver/expr/UnexpectedTokenException.java
+++ b/src/main/java/com/github/zafarkhaja/semver/expr/UnexpectedTokenException.java
@@ -49,7 +49,7 @@ public class UnexpectedTokenException extends ParserException {
      * Constructs a {@code UnexpectedTokenException} instance
      * 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
      */
     UnexpectedTokenException(Token token, Token.Type... expected) {