[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LilyPond strings and \markup
From: |
Joe Neeman |
Subject: |
Re: LilyPond strings and \markup |
Date: |
Mon, 17 Aug 2009 09:30:19 +1000 |
On Sun, 2009-08-16 at 14:05 -0700, Mark Polesky wrote:
> \version "2.13.4"
>
> %%%%%%%%%%%%
> % QUESTION 1
>
> % "quoted string" is STRING
> strA = "quoted string"
>
> % #"hash-quoted string" is SCM_TOKEN
> strB = #"hash-quoted string"
>
> % these are both 'unexpected STRING_IDENTIFIER's:
> % \strA \strB
>
> % Why isn't \strB an 'unexpected SCM_IDENTIFIER'?
>
>
> %%%%%%%%%%%%
> % QUESTION 2
>
> % A valid LilyPond unquoted 'STRING':
> % 1) must be entirely alphabetic, and
> % 2) cannot be interpreted as a number, pitch, rest, or operator.
>
> % So, without quotes, these are all invalid LilyPond 'STRING's:
> % 3 f r + big-pr0bl3m!
>
> % but \markup accepts all of these seamlessly:
> \markup { 3 f r + n0-pr0bl3m! }
>
> % It's as if, behind the scenes, the parser silently adds quotes.
> % So how exactly does that happen? And does the parser read
> % them as LilyPond 'STRING's or as a Scheme strings?
Markups are parsed in a different lexer state. See lexer.ll:515, which
only takes effect inside a \markup (and grep parser.yy for
push_markup_state).
Cheers,
Joe
- LilyPond strings and \markup, Mark Polesky, 2009/08/16
- Re: LilyPond strings and \markup, Patrick McCarty, 2009/08/16
- Re: LilyPond strings and \markup,
Joe Neeman <=
- Re: LilyPond strings and \markup, Carl Sorensen, 2009/08/17
- Re: LilyPond strings and \markup, Mark Polesky, 2009/08/17
- Re: LilyPond strings and \markup, Trevor Daniels, 2009/08/17
- Re: LilyPond strings and \markup, Joe Neeman, 2009/08/17
- Re: LilyPond strings and \markup, Graham Percival, 2009/08/17
- Re: LilyPond strings and \markup, Neil Puttock, 2009/08/17
- Re: LilyPond strings and \markup, Graham Percival, 2009/08/17
- Re: LilyPond strings and \markup, John Mandereau, 2009/08/18
- Re: LilyPond strings and \markup, Nicolas Sceaux, 2009/08/18