add support for parser.doc = "main doc"