absyntax/absyntax.cc
changeset 1046 292b7dcf14f6
parent 1043 4165b7189c32
equal deleted inserted replaced
1045:428e0748b5cd 1046:292b7dcf14f6
   120 symbol_c *list_c::find_element(const char *token_value) {
   120 symbol_c *list_c::find_element(const char *token_value) {
   121   // We could use strcasecmp(), but it's best to always use the same 
   121   // We could use strcasecmp(), but it's best to always use the same 
   122   // method of string comparison throughout matiec
   122   // method of string comparison throughout matiec
   123   nocasecmp_c ncc; 
   123   nocasecmp_c ncc; 
   124   for (int i = 0; i < n; i++) 
   124   for (int i = 0; i < n; i++) 
   125     if (ncc(elements[i].token_value, token_value))
   125     if (!ncc(elements[i].token_value, token_value))
   126       return elements[i].symbol;
   126       return elements[i].symbol;
       
   127 
   127   return NULL; // not found
   128   return NULL; // not found
   128 }
   129 }
   129 
   130 
   130     
   131     
   131 /***********************************************/    
   132 /***********************************************/