protected void registerLangHandler(CreateSimpleLexer handler,List<String> fileExtensions) throws Exception {
  for (int i=fileExtensions.size(); --i >= 0; ) {
    String ext=fileExtensions.get(i);
    if (langHandlerRegistry.get(ext) == null) {
      langHandlerRegistry.put(ext,handler);
    }
 else {
      throw new Exception("cannot override language handler " + ext);
    }
  }
}

protected void registerLangHandler ( CreateSimpleLexer handler , List < String > fileExtensions ) throws Exception { for ( int i = fileExtensions . size ( ) ; -- i >= 0 ; ) { String ext = fileExtensions . get ( i ) ; if ( langHandlerRegistry . get ( ext ) == null ) { langHandlerRegistry . put ( ext , handler ) ; } else { throw new Exception ( "cannot override language handler " + ext ) ; } } }
register a language handler for the given file extensions .
