public static boolean isValidIdentifier(String id){
  if (id.length() == 0 || !isIdentifierFirstChar(id.charAt(0))) {
    return false;
  }
  for (int i=1; i < id.length(); i++) {
    if (!isIdentifierChar(id.charAt(i))) {
      return false;
    }
  }
  if (StandardDefs.isReservedWord(id)) {
    return false;
  }
  return true;
}

public static boolean isValidIdentifier ( String id ) { if ( id . length ( ) == 0 || ! isIdentifierFirstChar ( id . charAt ( 0 ) ) ) { return false ; } for ( int i = 1 ; i < id . length ( ) ; i ++ ) { if ( ! isIdentifierChar ( id . charAt ( i ) ) ) { return false ; } } if ( StandardDefs . isReservedWord ( id ) ) { return false ; } return true ; }
test if this is a valid identifier , and is not an actionscript keyword .
