parser improvement

* code refactoring
* gloss submodule update