Issue#395

major parser code update:
- performed deep analysis on the parser's code and a full code audit
- fixes all known parser bugs
- parser is now code-complete, nearly finished (some further tests are required) and will be production-ready soon