Hi Robin,
it seems you are quite well-versed in this. It would be great if you
could upload a patch for review yourself: the process is explained in
the Contributor’s Guide; if you create a sourceforge account and send
your username to the devel list, we can give you write access to the
issue tracker as well.
Please let us know if you’d be willing to do this.
Best, Simon
On 07.01.2018 22:04, Robin Bannister wrote:
Hallo,
The Contributor Guide appendix 'LilyPond grammar' displays a summary
(ly-grammar.txt) which is derived from a summary produced by bison.
In the first section a production rule has a label on the left which
introduces the alternatives listed on the right. Or rather, _most_
rules are like that, but for a few of them the label occurs twice. So
if you are looking for a rule and find it, you may overlook some of
its alternatives.
This is OK by bison (and maybe a practised eye) but not by me.
So I propose a readability enhancement where there is only one label
per rule and submit a revised yyout2grammar.py which caters for this.
While testing it I noticed and corrected several errors:
- the elimination of @-items in the alternatives is inaccurate
- in the second section, continuation lines pile up at the top
- in the third section, more than 30 nonterminals are missing and
@-rules are included
In the script, the production rule part is completely rewritten and the
rest is extensively refactored. See yyout2g_robin_A.py
I worked with bison-2.4.1 (GnuWin32) and obtained parser.yy and
yyout2grammar.py from git a few days ago, i.e post 2.19.80.
The following summaries are generated from that snapshot:
- before: ly-grammar.txt
- after: ly-g_robin_A.txt
Cheers,
Robin
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond