cmCommandArgumentParserHelper: rework input handling
- Remove usage of
YY_INPUT
macro because it results in 16 KB being allocated for each variable parsing. Also oldLexInput()
routine provides input to Flex byte-by-byte which is far from the good. Replacing all the above withyy_scan_string()
call eliminates both problems, no more huge heap allocations and byte-by-byte scanning. - Fix error position tracking. Currently it reports the 0-based position after the erroneous token, not always correct one. With this fix it reports much common 1-based column position of erroneous token.
Details and benchmarks are here.