Memory leak test case
Fix some memory leaks in test cases
Lexer grammar using synpreds