upgraded parsergen.ts to latest source fixes from parsergen.cs