src/function.c
bool reservedJS(char* str)
{
    int key = hashfunction(str);                            // finding the key of string
    
    /**
     * COLLISION SOLUTION
     * Added initial shift value
     * 
     * float -- 210
     **/
    if(strcmp(str,"float")==0)
    {
        key++;
    }

    if(key<0 || key>HASHSIZE)                               // if key is not valid
    {
        return false;
    }
    else if(HASH[key]!=NULL && strcmp(str,HASH[key])==0)    // if key found
    {
        return true;
    }
    else
    {
        return false;
    }
}
/**
 * This function will search a string in the collection of JavaScript reserved words
 * 
 * @param search string
 * 
 * @return bool
 **/
This function will search a string in the collection of JavaScript reserved words

@param search string

@return bool
This function will search a string in the collection of JavaScript reserved words @param search string @return bool
bool reservedJS(char* str)
{
    int key = hashfunction(str);                            
    if(strcmp(str,"float")==0)
    {
        key++;
    }
    if(key<0 || key>HASHSIZE)                               
    {
        return false;
    }
    else if(HASH[key]!=NULL && strcmp(str,HASH[key])==0)    
    {
        return true;
    }
    else
    {
        return false;
    }
}
bool reservedJS ( char * str ) { int key = hashfunction ( str ) ; if ( strcmp ( str , " " ) == 0 ) { key ++ ; } if ( key < 0 || key > HASHSIZE ) { return false ; } else if ( HASH [ key ] != NULL && strcmp ( str , HASH [ key ] ) == 0 ) { return true ; } else { return false ; } }
This function will search a string in the collection of JavaScript reserved words
This function will search a string in the collection of JavaScript reserved words
// finding the key of string /**
     * COLLISION SOLUTION
     * Added initial shift value
     * 
     * float -- 210
     **/ // if key is not valid // if key found