Well, David has pointed out some shortcomings, but I am not sure if they
are practical problems.
The strings in
"violin1" = c2 { "\violin1" }
must be literal strings, whereas most other places we can
build strings in Scheme. So the instrumentName setting here works, but
the corresponding variable names do not
$(format #f "violin~a" 2) = {c' d' e' f'}
\new Staff \with {
instrumentName = $(format #f "Violin ~a" (+ 1 1))
} \$(format #f "violin~a" (+ 1 1))
So the superficial similarity with strings breaks down as soon as you
try putting it to the test.
The valid names for identifiers are no longer a simple lexer pattern,
but anything that can be put between quotes, making syntax highlighting
more difficult.
"\\" = c''1 { \"\\" }
There is apparently a more powerful array implementation in the works,
that will allow simply \violin1
And finally, we have the choice discussed above between code-duplication
and abuse of the Flex start-condition system.
By comparison, a simple change to the scan patterns
http://codereview.appspot.com/6493072/diff/19001/lily/lexer.ll
would be much cheaper and better-confined.
http://codereview.appspot.com/6778055/
_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel