[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 0/4] RFC: add stats about parsing
From: |
Akim Demaille |
Subject: |
[RFC PATCH 0/4] RFC: add stats about parsing |
Date: |
Sun, 7 Jul 2019 20:20:32 +0200 |
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
- [PATCH 0/4] RFC: add stats about parsing, Akim Demaille, 2019/07/03
- [PATCH 2/4] parse.stats: add --trace=parse-stats, Akim Demaille, 2019/07/03
- [PATCH 1/4] parse.stats: new feature of yacc.c, Akim Demaille, 2019/07/03
- [PATCH 4/4] parse.stats: documentation, Akim Demaille, 2019/07/03
- [PATCH 3/4] regen, Akim Demaille, 2019/07/03
- Re: [PATCH 0/4] RFC: add stats about parsing, Adrian Vogelsgesang, 2019/07/03
- Re: [PATCH 0/4] RFC: add stats about parsing, Akim Demaille, 2019/07/03
- Re: [PATCH 0/4] RFC: add stats about parsing, Adrian Vogelsgesang, 2019/07/04
- [RFC PATCH 0/4] RFC: add stats about parsing,
Akim Demaille <=
- [RFC PATCH 1/4] parse stats: new feature of yacc.c, Akim Demaille, 2019/07/07
- [RFC PATCH 2/4] parse stats: add --trace=parse-stats, Akim Demaille, 2019/07/07
- [RFC PATCH 3/4] regen, Akim Demaille, 2019/07/07
- [RFC PATCH 4/4] parse stats: documentation, Akim Demaille, 2019/07/07