Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4394)

Issue 290560043: Let the parser interpret alist variables

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 1 month ago by dak
Modified:
8 years, 1 month ago
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Let the parser interpret alist variables After x.y = { c d e f } this allows using \x.y instead of #(assoc-ref x 'y) in most places where the latter would work. Also contains commit: Create nested_property function

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -1 line) Patch
M lily/include/context.hh View 1 chunk +1 line, -0 lines 0 comments Download
M lily/nested-property.cc View 1 chunk +13 lines, -0 lines 2 comments Download
M lily/parser.yy View 7 chunks +19 lines, -1 line 0 comments Download

Messages

Total messages: 4
thomasmorley651
Even from description the consequences are not clear to me. Can you give a little ...
8 years, 1 month ago (2016-03-13 23:39:29 UTC) #1
lemzwerg
LGTM. https://codereview.appspot.com/290560043/diff/1/lily/nested-property.cc File lily/nested-property.cc (right): https://codereview.appspot.com/290560043/diff/1/lily/nested-property.cc#newcode137 lily/nested-property.cc:137: for (;scm_is_pair (prop_path); prop_path = scm_cdr (prop_path)) s/;scm/; ...
8 years, 1 month ago (2016-03-14 06:46:51 UTC) #2
dak
https://codereview.appspot.com/290560043/diff/1/lily/nested-property.cc File lily/nested-property.cc (right): https://codereview.appspot.com/290560043/diff/1/lily/nested-property.cc#newcode137 lily/nested-property.cc:137: for (;scm_is_pair (prop_path); prop_path = scm_cdr (prop_path)) On 2016/03/14 ...
8 years, 1 month ago (2016-03-14 08:32:05 UTC) #3
dak
8 years, 1 month ago (2016-03-14 08:49:43 UTC) #4
On 2016/03/13 23:39:29, thomasmorley651 wrote:
> Even from description the consequences are not clear to me.
> Can you give a little verbose example?

Basically, you can now use x.y for defining and \x.y for using a variable like
you could previously use x_y and \x_y but the value is really stored in an
alist.

That's not all that exciting, except that in connection with issue 4798 this
will also permit violin.1 or violin.#x which some people might consider almost
what they want.

However, the slightly nicer looking assignment

    violin1 = ...

is going to be ruled out by issue 4800 since I could not make the corresponding
\violin1 work.

It's sort of funny why \violin1 could not be made to work: I first let an alist
like \violin always grab the next expression and use it as an index.  This
caused \key c \major to stop working since \major has _exactly_ the form of an
alist indexed by a number.  So the indexing operation must be made explicit (dot
or comma), and in order to make it explicit for the assignment as well, issue
4800.

As a corollary, \minor.2 is equivalent to #-1/2 after this issue and issue 4798.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b