Optimized cdcat parser.