core/src/main/java/com/orientechnologies/common/parser/OBaseParser.java
protected boolean parserOptionalKeyword(final String... iWords) {
    parserNextWord(true, " \r\n,");
    if (parserLastWord.length() == 0)
      return false;

    // FOUND: CHECK IF IT'S IN RANGE
    boolean found = iWords.length == 0;
    for (String w : iWords) {
      if (parserLastWord.toString().equals(w)) {
        found = true;
        break;
      }
    }

    if (!found)
      throwSyntaxErrorException("Found unexpected keyword '" + parserLastWord + "' while it was expected '"
          + Arrays.toString(iWords) + "'");

    return true;
  }
protected boolean parserOptionalKeyword(final String... iWords) {
    parserNextWord(true, " \r\n,");
    if (parserLastWord.length() == 0)
      return false;

    // FOUND: CHECK IF IT'S IN RANGE
    boolean found = iWords.length == 0;
    for (String w : iWords) {
      if (parserLastWord.toString().equals(w)) {
        found = true;
        break;
      }
    }

    if (!found)
      throwSyntaxErrorException("Found unexpected keyword '" + parserLastWord + "' while it was expected '"
          + Arrays.toString(iWords) + "'");

    return true;
  }
protected boolean parserOptionalKeyword ( final String ... iWords ) { parserNextWord ( true , " \r\n," ) ; if ( parserLastWord . length ( ) == 0 ) return false ; // FOUND: CHECK IF IT'S IN RANGE boolean found = iWords . length == 0 ; for ( String w : iWords ) { if ( parserLastWord . toString ( ) . equals ( w ) ) { found = true ; break ; } } if ( ! found ) throwSyntaxErrorException ( "Found unexpected keyword '" + parserLastWord + "' while it was expected '" + Arrays . toString ( iWords ) + "'" ) ; return true ; }
Parses optional keywords between the iWords. If a keyword is found but doesn't match with iWords then a SyntaxError is raised.

@param iWords
Optional words to match as keyword. If at least one is passed, then the check is made
@return true if a keyword was found, otherwise false
Parses optional keywords between the iWords . If a keyword is found but doesn t match with iWords then a SyntaxError is raised .