# HG changeset patch
# User Mario de Sousa <msousa@fe.up.pt>
# Date 1491322902 -3600
# Node ID 292b7dcf14f6743d1bcd225aff8b9766483abebe
# Parent  428e0748b5cdc2b575033d7db180246e0d012a69
fix bug in symbol_c::find_element()

diff -r 428e0748b5cd -r 292b7dcf14f6 absyntax/absyntax.cc
--- a/absyntax/absyntax.cc	Tue Apr 04 15:28:49 2017 +0100
+++ b/absyntax/absyntax.cc	Tue Apr 04 17:21:42 2017 +0100
@@ -122,8 +122,9 @@
   // method of string comparison throughout matiec
   nocasecmp_c ncc; 
   for (int i = 0; i < n; i++) 
-    if (ncc(elements[i].token_value, token_value))
+    if (!ncc(elements[i].token_value, token_value))
       return elements[i].symbol;
+
   return NULL; // not found
 }