Hi Adrian, Thanks a lot for your feedback!
Hi all, The following commits replace my previous proposal and implement choice 2a: when %yacc, nothing changes, when !%yacc, then yydebug is a bit field and bit 1 controls the new parse stats (bit 0 controls the traditional traces). I still need help... 1. First, I am uneasy with "parse stats". These are not statistics. I also plan to embed things such as the nunber of states, number of gotos, etc. in other words, any kinds of numbers. "parse summary" is better, but still incorrect, as "number of states" is not really part of the parse summary. Any idea? "parse numbers"? "parse facts"? It should also read nicely as an identifier: yy_parse_numbers, yy_parse_facts, etc. 2. Still about names, what do you think of the identifiers I chose (in the output): num_reductions, num_shifts, num_states, etc. Is that ok? 3. I'm never felt I was a good writer for the documentation, but I think I have set here a new record: I very strongly dislike the piece of documentation I wrote, and I would be extremely happy if someone suggested some documentation (and I don't claim either that I have put it at the right place). Or, if noone steps forward with the perfect piece of doc, then at least a little guidance on how to improve my draft of a draft. Cheers! Akim Demaille (4): parse stats: new feature of yacc.c parse stats: add --trace=parse-stats regen parse stats: documentation NEWS | 20 +++++++++++ TODO | 4 ++- data/skeletons/c.m4 | 14 ++++++-- data/skeletons/yacc.c | 51 +++++++++++++++++++++------- doc/bison.texi | 78 +++++++++++++++++++++++++++++++++++++------ src/getargs.c | 72 ++++++++++++++++++++------------------- src/getargs.h | 35 +++++++++---------- src/parse-gram.c | 41 +++++++++++++++++++---- src/parse-gram.h | 10 +++++- src/reader.c | 4 ++- 10 files changed, 243 insertions(+), 86 deletions(-) PS/ These patches were generated with -w, to focus on genuine chances. But indentation was properly maintained. -- 2.22.0
