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 .