code: private Version parseVersion() {
          int major = intOf(consumeNextToken(NUMERIC).lexeme);
          int minor = 0;
          if (tokens.positiveLookahead(DOT)) {
              tokens.consume();
              minor = intOf(consumeNextToken(NUMERIC).lexeme);
          }
          int patch = 0;
          if (tokens.positiveLookahead(DOT)) {
              tokens.consume();
              patch = intOf(consumeNextToken(NUMERIC).lexeme);
          }
          return versionFor(major, minor, patch);
      }
docs: Parses the {@literal <version>} non-terminal.
  
  <pre>
  {@literal
  <version> ::= <major>
  | <major> "." <minor>
  | <major> "." <minor> "." <patch>
  }
  </pre>
  
  @return the parsed version