fix some bugs in parser and developed the simple comparison logic
fix some bugs in parser and developed the simple comparison logic