Various fixes

- Ported to ANTLR 3.5.x
- Many tests cases addded
- Several minor bugfixes