lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make several special characters with or without backslash "non-speci


From: k-ohara5a5a
Subject: Re: Make several special characters with or without backslash "non-special" (issue 12432043)
Date: Wed, 07 Aug 2013 02:44:07 +0000

On 2013/08/06 10:30:44, dak wrote:
I can't really work with "the comments are confusing"

Sorry, I meant the commit message and texidoc.

I don't really see
that the characterization of the commit messages is accurate.

It was the "make special characters 'non-special'" that confused me.
The first thing I saw was that these characters are newly matched by a
pattern called SPECIAL and act like \command, except that they don't
need a backslash, and if you do type a backslash that character is
treated as part of the command name, which all seems pretty special to
me.  I began to wonder if you reversed the arguments to 'diff' when
creating the patchfile.

The removal of these special characters as special-cases in the parser
is very nice, of course.

> It is not clear what functionality you are protecting from
regression.

Redefining ) in a manner that changes it from post-event to standalone
event:
previous to that patch, the syntax of ) was fixed.

Or redefining ) at all.  Probably a regression test is appropriate,
then, showing a couple cases to illustrate where the \s go.
 "\\!" = <>\!
 "\\@" = -\espressivo
 "|" = {\bar"|" \set Timing.measurePosition = #(ly:make-moment 0)}
 {c'4\< g'\@  f' \! | e'1}

It was only the "changing the syntax class of articulations" that
confused me.  I thought 'syntax' referred to the language structure that
the parser uses.
  trill = <>\trill  {<>\prall c2 \trill c}
doesn't change syntax of articulations, it changes semantics of \trill.
Originally \trill was defined to be the trill articulation, but can be
redefined to mean a chord with a trill, waiting for notes.


https://codereview.appspot.com/12432043/diff/6001/lily/lexer.ll#newcode153
lily/lexer.ll:153: SPECIAL              \\.|[][|()~]
On 2013/08/05 19:21:45, Keith wrote:
> 'special' is vague.

I can dig into TeX terminology and call this "active", but I thought
"special"
fit rather well.

Yes SPECIAL is probably fine.  It was mostly the conflict with my
interpretation of the commit message caused me confusion.

Maybe separate the escaped form into its own pattern, for the sake of
human readers.
It is challenging to follow in the code where all \-characters go
  \command  produces a STRING-token "command"
  )         produces a STRING-token ")"
  \)        produces a STRING-token "\)"


https://codereview.appspot.com/12432043/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]