code: private boolean isVersionFollowedBy(ElementType<Token> type) {
          EnumSet<Token.Type> expected = EnumSet.of(NUMERIC, DOT);
          Iterator<Token> it = tokens.iterator();
          Token lookahead = null;
          while (it.hasNext()) {
              lookahead = it.next();
              if (!expected.contains(lookahead.type)) {
                  break;
              }
          }
          return type.isMatchedBy(lookahead);
      }
docs: Determines if the version terminals are
  followed by the specified token type.
  
  This method is essentially a {@code lookahead(k)} method
  which allows to solve the grammar's ambiguities.
  
  @param type the token type to check
  @return {@code true} if the version terminals are followed by
  the specified token type or {@code false} otherwise