A. LilyPond grammar

This appendix contains a description of the LilyPond grammar, as output from the parser.

Grammar

    1 start_symbol: lilypond

    3 start_symbol: "#{"  embedded_lilypond

    4 lilypond: /* empty */
    5         | lilypond toplevel_expression
    6         | lilypond assignment
    7         | lilypond error
    8         | lilypond "\version-error"

   10 toplevel_expression:  lilypond_header
   11                    | book_block
   12                    | bookpart_block
   13                    | BOOK_IDENTIFIER
   14                    | score_block
   15                    | composite_music
   16                    | full_markup
   17                    | full_markup_list
   18                    | SCM_TOKEN
   19                    | embedded_scm_active
   20                    | output_def

   21 embedded_scm_bare: SCM_TOKEN
   22                  | SCM_IDENTIFIER

   23 embedded_scm_active: SCM_IDENTIFIER
   24                    | scm_function_call

   25 embedded_scm_bare_arg: SCM_ARG
   26                      | SCM_TOKEN
   27                      | FRACTION
   28                      | full_markup_list
   29                      | context_modification
   30                      | score_block
   31                      | context_def_spec_block
   32                      | book_block
   33                      | bookpart_block
   34                      | output_def

   35 embedded_scm: embedded_scm_bare
   36             | scm_function_call

   37 embedded_scm_arg: embedded_scm_bare_arg
   38                 | scm_function_call
   39                 | music_assign

   40 scm_function_call: SCM_FUNCTION function_arglist

   41 embedded_lilypond_number: '-' embedded_lilypond_number
   42                         | bare_number_common
   43                         | UNSIGNED NUMBER_IDENTIFIER

   44 embedded_lilypond: /* empty */
   45                  | identifier_init_nonumber
   46                  | embedded_lilypond_number
   47                  | post_event post_events
   48                  | multiplied_duration
   49                  | music_embedded music_embedded music_list
   50                  | error
   51                  | "\version-error" embedded_lilypond

   52 lilypond_header_body: /* empty */
   53                     | lilypond_header_body assignment
   54                     | lilypond_header_body embedded_scm

   55 lilypond_header: "\header" '{' lilypond_header_body '}'

   56 assignment_id: STRING

   57 assignment: assignment_id '=' identifier_init
   58           | assignment_id property_path '=' identifier_init
   59           | assignment_id '.' property_path '=' identifier_init

   60 identifier_init: identifier_init_nonumber
   61                | number_expression
   62                | post_event_nofinger post_events

   63 identifier_init_nonumber: score_block
   64                         | book_block
   65                         | bookpart_block
   66                         | output_def
   67                         | context_def_spec_block
   68                         | music_assign
   69                         | pitch_or_music
   70                         | FRACTION
   71                         | string
   72                         | embedded_scm
   73                         | full_markup_list
   74                         | context_modification

   75 context_def_spec_block: "\context" '{' context_def_spec_body '}'

   76 context_mod_arg: embedded_scm

   78 context_mod_arg:  composite_music

   79 context_def_spec_body: /* empty */
   80                      | context_def_spec_body context_mod
   81                      | context_def_spec_body context_modification
   82                      | context_def_spec_body context_mod_arg

   83 book_block: "\book" '{' book_body '}'

   84 book_body: /* empty */
   85          | BOOK_IDENTIFIER
   86          | book_body paper_block
   87          | book_body bookpart_block
   88          | book_body score_block
   89          | book_body composite_music
   90          | book_body full_markup
   91          | book_body full_markup_list
   92          | book_body SCM_TOKEN
   93          | book_body embedded_scm_active

   95 book_body: book_body  lilypond_header
   96          | book_body error

   97 bookpart_block: "\bookpart" '{' bookpart_body '}'

   98 bookpart_body: /* empty */
   99              | BOOK_IDENTIFIER
  100              | bookpart_body paper_block
  101              | bookpart_body score_block
  102              | bookpart_body composite_music
  103              | bookpart_body full_markup
  104              | bookpart_body full_markup_list
  105              | bookpart_body SCM_TOKEN
  106              | bookpart_body embedded_scm_active

  108 bookpart_body: bookpart_body  lilypond_header
  109              | bookpart_body error

  110 score_block: "\score" '{' score_body '}'

  111 score_headers: /* empty */

  113 score_headers: score_headers  lilypond_header
  114              | score_headers output_def

  115 score_body: score_headers music
  116           | embedded_scm_active

  118 score_body: score_body  lilypond_header
  119           | score_body output_def
  120           | score_body error

  121 paper_block: output_def

  122 output_def: output_def_body '}'

  123 output_def_head: "\paper"
  124                | "\midi"
  125                | "\layout"

  126 output_def_head_with_mode_switch: output_def_head

  127 music_or_context_def: music_assign
  128                     | context_def_spec_block

  129 output_def_body: output_def_head_with_mode_switch '{'
  130                | output_def_body assignment
  131                | output_def_body embedded_scm_active
  132                | output_def_body SCM_TOKEN

  134 output_def_body: output_def_body  music_or_context_def
  135                | output_def_body error

  136 tempo_event: "\tempo" steno_duration '=' tempo_range
  137            | "\tempo" scalar steno_duration '=' tempo_range
  138            | "\tempo" scalar

  139 music_list: /* empty */
  140           | music_list music_embedded
  141           | music_list error

  142 braced_music_list: '{' music_list '}'

  143 music: music_assign
  144      | lyric_element_music
  145      | pitch_or_music

  146 music_embedded: music
  147               | music_embedded_backup
  148               | music_embedded_backup 
                        "(backed-up?)" 
                        lyric_element_music 
  149               | multiplied_duration post_events

  150 music_embedded_backup: embedded_scm

  151 music_assign: simple_music
  152             | composite_music

  153 repeated_music: "\repeat" simple_string unsigned_number music
  154               | "\repeat" 
                        simple_string 
                        unsigned_number 
                        music 
                        "\alternative" 
                        braced_music_list 

  155 sequential_music: "\sequential" braced_music_list
  156                 | braced_music_list

  157 simultaneous_music: "\simultaneous" braced_music_list
  158                   | "<<" music_list ">>"

  159 simple_music: event_chord
  160             | music_property_def
  161             | context_change

  163 context_modification: "\with"  '{' context_mod_list '}'
  164                     | "\with" CONTEXT_MOD_IDENTIFIER
  165                     | CONTEXT_MOD_IDENTIFIER
  166                     | "\with" context_modification_arg

  167 context_modification_arg: embedded_scm
  168                         | MUSIC_IDENTIFIER

  169 optional_context_mod: /* empty */
  170                     | context_modification

  171 context_mod_list: /* empty */
  172                 | context_mod_list context_mod
  173                 | context_mod_list CONTEXT_MOD_IDENTIFIER
  174                 | context_mod_list context_mod_arg

  175 composite_music: complex_music
  176                | music_bare

  177 music_bare: mode_changed_music
  178           | MUSIC_IDENTIFIER
  179           | grouped_music_list

  180 grouped_music_list: simultaneous_music
  181                   | sequential_music

  182 symbol_list_arg: SYMBOL_LIST
  183                | SYMBOL_LIST '.' symbol_list_rev

  184 symbol_list_rev: symbol_list_part
  185                | symbol_list_rev '.' symbol_list_part

  186 symbol_list_part: symbol_list_element

  187 symbol_list_element: STRING
  188                    | embedded_scm_bare

  189 function_arglist_nonbackup: function_arglist_common
  190                           | "optional?" 
                                    "scheme?" 
                                    function_arglist_nonbackup 
                                    post_event_nofinger 
  191                           | "optional?" 
                                    "scheme?" 
                                    function_arglist_nonbackup 
                                    '-' 
                                    UNSIGNED 
  192                           | "optional?" 
                                    "scheme?" 
                                    function_arglist_nonbackup 
                                    '-' 
                                    REAL 
  193                           | "optional?" 
                                    "scheme?" 
                                    function_arglist_nonbackup 
                                    '-' 
                                    NUMBER_IDENTIFIER 
  194                           | "optional?" 
                                    "scheme?" 
                                    function_arglist_nonbackup 
                                    embedded_scm_arg 
  195                           | "optional?" 
                                    "scheme?" 
                                    function_arglist_nonbackup 
                                    bare_number_common 
  196                           | function_arglist_nonbackup_reparse 
                                    "(reparsed?)" 
                                    pitch_or_music 
  197                           | function_arglist_nonbackup_reparse 
                                    "(reparsed?)" 
                                    duration_length 
  198                           | function_arglist_nonbackup_reparse 
                                    "(reparsed?)" 
                                    bare_number_common 
  199                           | function_arglist_nonbackup_reparse 
                                    "(reparsed?)" 
                                    SCM_ARG 
  200                           | function_arglist_nonbackup_reparse 
                                    "(reparsed?)" 
                                    lyric_element_music 
  201                           | function_arglist_nonbackup_reparse 
                                    "(reparsed?)" 
                                    symbol_list_arg 

  202 function_arglist_nonbackup_reparse: "optional?" 
                                            "scheme?" 
                                            function_arglist_nonbackup 
                                            SCM_IDENTIFIER 
  203                                   | "optional?" 
                                            "scheme?" 
                                            function_arglist_nonbackup 
                                            pitch 
  204                                   | "optional?" 
                                            "scheme?" 
                                            function_arglist_nonbackup 
                                            steno_tonic_pitch 
  205                                   | "optional?" 
                                            "scheme?" 
                                            function_arglist_nonbackup 
                                            STRING 
  206                                   | "optional?" 
                                            "scheme?" 
                                            function_arglist_nonbackup 
                                            full_markup 
  207                                   | "optional?" 
                                            "scheme?" 
                                            function_arglist_nonbackup 
                                            UNSIGNED 
  208                                   | "optional?" 
                                            "scheme?" 
                                            function_arglist_nonbackup 
                                            DURATION_IDENTIFIER 

  209 function_arglist_backup: function_arglist_common
  210                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 embedded_scm_arg 
  211                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 post_event_nofinger 
  212                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 pitch 
  213                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 steno_tonic_pitch 
  214                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 full_markup 
  215                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 UNSIGNED 
  216                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 REAL 
  217                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 NUMBER_IDENTIFIER 
  218                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 '-' 
                                 UNSIGNED 
  219                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 '-' 
                                 REAL 
  220                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 '-' 
                                 NUMBER_IDENTIFIER 
  221                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 DURATION_IDENTIFIER 
  222                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 SCM_IDENTIFIER 
  223                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 STRING 
  224                        | function_arglist_backup 
                                 "(reparsed?)" 
                                 pitch_or_music 
  225                        | function_arglist_backup 
                                 "(reparsed?)" 
                                 bare_number_common 
  226                        | function_arglist_backup 
                                 "(reparsed?)" 
                                 duration_length 
  227                        | function_arglist_backup 
                                 "(reparsed?)" 
                                 symbol_list_arg 

  228 function_arglist: function_arglist_nonbackup
  229                 | "optional?" 
                          "scheme?" 
                          function_arglist_skip_nonbackup 
                          "\default" 

  230 function_arglist_skip_nonbackup: function_arglist_nonbackup
  231                                | "optional?" 
                                         "scheme?" 
                                         function_arglist_skip_nonbackup 

  232 function_arglist_common: EXPECT_NO_MORE_ARGS
  233                        | "scheme?" 
                                 function_arglist_optional 
                                 embedded_scm_arg 
  234                        | "scheme?" 
                                 function_arglist_optional 
                                 bare_number_common 
  235                        | "scheme?" 
                                 function_arglist_optional 
                                 post_event_nofinger 
  236                        | "scheme?" 
                                 function_arglist_optional 
                                 '-' 
                                 NUMBER_IDENTIFIER 
  237                        | function_arglist_common_reparse 
                                 "(reparsed?)" 
                                 SCM_ARG 
  238                        | function_arglist_common_reparse 
                                 "(reparsed?)" 
                                 lyric_element_music 
  239                        | function_arglist_common_reparse 
                                 "(reparsed?)" 
                                 pitch_or_music 
  240                        | function_arglist_common_reparse 
                                 "(reparsed?)" 
                                 bare_number_common 
  241                        | function_arglist_common_reparse 
                                 "(reparsed?)" 
                                 duration_length 
  242                        | function_arglist_common_reparse 
                                 "(reparsed?)" 
                                 symbol_list_arg 

  243 function_arglist_common_reparse: "scheme?" 
                                         function_arglist_optional 
                                         SCM_IDENTIFIER 
  244                                | "scheme?" 
                                         function_arglist_optional 
                                         pitch 
  245                                | "scheme?" 
                                         function_arglist_optional 
                                         steno_tonic_pitch 
  246                                | "scheme?" 
                                         function_arglist_optional 
                                         STRING 
  247                                | "scheme?" 
                                         function_arglist_optional 
                                         full_markup 
  248                                | "scheme?" 
                                         function_arglist_optional 
                                         UNSIGNED 
  249                                | "scheme?" 
                                         function_arglist_optional 
                                         DURATION_IDENTIFIER 
  250                                | "scheme?" 
                                         function_arglist_optional 
                                         '-' 
                                         UNSIGNED 
  251                                | "scheme?" 
                                         function_arglist_optional 
                                         '-' 
                                         REAL 

  252 function_arglist_optional: function_arglist_backup
  253                          | "optional?" 
                                   "scheme?" 
                                   function_arglist_skip_backup 
                                   "\default" 
  254                          | function_arglist_skip_backup "(backed-up?)"

  255 function_arglist_skip_backup: function_arglist_backup
  256                             | "optional?" 
                                      "scheme?" 
                                      function_arglist_skip_backup 

  257 music_function_call: MUSIC_FUNCTION function_arglist

  258 optional_id: /* empty */
  259            | '=' simple_string

  261 lyric_mode_music: 0 grouped_music_list
  262                 | MUSIC_IDENTIFIER

  263 complex_music: music_function_call
  264              | repeated_music
  265              | re_rhythmed_music
  266              | complex_music_prefix music

  267 complex_music_prefix: "\context" 
                              symbol 
                              optional_id 
                              optional_context_mod 
  268                     | "\new" symbol optional_id optional_context_mod

  269 mode_changed_music: mode_changing_head grouped_music_list
  270                   | mode_changing_head_with_context 
                            optional_context_mod 
                            grouped_music_list 

  271 mode_changing_head: "\notemode"
  272                   | "\drummode"
  273                   | "\figuremode"
  274                   | "\chordmode"
  275                   | "\lyricmode"

  276 mode_changing_head_with_context: "\drums"
  277                                | "\figures"
  278                                | "\chords"
  279                                | "\lyrics"

  280 new_lyrics: "\addlyrics" lyric_mode_music
  281           | new_lyrics "\addlyrics" lyric_mode_music

  282 re_rhythmed_music: composite_music new_lyrics
  283                  | "\lyricsto" simple_string lyric_mode_music

  284 context_change: "\change" symbol '=' simple_string

  285 property_path: symbol_list_rev
  286              | symbol_list_rev property_path

  287 property_operation: symbol '=' scalar
  288                   | "\unset" symbol
  289                   | "\override" property_path '=' scalar
  290                   | "\revert" revert_arg

  291 revert_arg: revert_arg_backup "(backed-up?)" symbol_list_arg

  292 revert_arg_backup: revert_arg_part

  293 revert_arg_part: symbol_list_part
  294                | revert_arg_backup 
                         "(backed-up?)" 
                         SCM_ARG 
                         '.' 
                         symbol_list_part 
  295                | revert_arg_backup 
                         "(backed-up?)" 
                         SCM_ARG 
                         symbol_list_part 

  296 context_def_mod: "\consists"
  297                | "\remove"
  298                | "\accepts"
  299                | "\defaultchild"
  300                | "\denies"
  301                | "\alias"
  302                | "\type"
  303                | "\description"
  304                | "\name"

  305 context_mod: property_operation
  306            | context_def_mod STRING
  307            | context_def_mod embedded_scm

  308 grob_prop_spec: symbol_list_rev

  309 grob_prop_path: grob_prop_spec
  310               | grob_prop_spec property_path

  311 context_prop_spec: symbol_list_rev

  312 simple_music_property_def: "\override" grob_prop_path '=' scalar
  313                          | "\revert" simple_revert_context revert_arg
  314                          | "\set" context_prop_spec '=' scalar
  315                          | "\unset" context_prop_spec

  316 simple_revert_context: symbol_list_part

  317 music_property_def: simple_music_property_def

  318 string: STRING
  319       | full_markup

  320 simple_string: STRING
  321              | embedded_scm_bare

  322 symbol: STRING
  323       | embedded_scm_bare

  324 scalar: embedded_scm_arg
  325       | pitch_or_music
  326       | SCM_IDENTIFIER
  327       | bare_number
  328       | '-' bare_number
  329       | string

  330 event_chord: simple_element post_events
  331            | CHORD_REPETITION optional_notemode_duration post_events
  332            | MULTI_MEASURE_REST optional_notemode_duration post_events
  333            | tempo_event
  334            | note_chord_element

  335 note_chord_element: chord_body optional_notemode_duration post_events

  336 chord_body: "<" chord_body_elements ">"

  337 chord_body_elements: /* empty */
  338                    | chord_body_elements chord_body_element

  339 chord_body_element: pitch 
                            exclamations 
                            questions 
                            octave_check 
                            post_events 
  340                   | DRUM_PITCH post_events
  341                   | music_function_chord_body

  342 music_function_chord_body: music_function_call
  343                          | MUSIC_IDENTIFIER
  344                          | embedded_scm

  345 event_function_event: EVENT_FUNCTION function_arglist

  346 post_events: /* empty */
  347            | post_events post_event

  348 post_event_nofinger: direction_less_event
  349                    | script_dir music_function_call
  350                    | "--"
  351                    | "__"
  352                    | script_dir direction_reqd_event
  353                    | script_dir direction_less_event
  354                    | '^' fingering
  355                    | '_' fingering

  356 post_event: post_event_nofinger
  357           | '-' fingering

  358 string_number_event: E_UNSIGNED

  359 direction_less_event: string_number_event
  360                     | EVENT_IDENTIFIER
  361                     | tremolo_type
  362                     | event_function_event

  363 direction_reqd_event: gen_text_def
  364                     | script_abbreviation

  365 octave_check: /* empty */
  366             | '=' quotes

  367 quotes: /* empty */
  368       | sub_quotes
  369       | sup_quotes

  370 sup_quotes: '''
  371           | sup_quotes '''

  372 sub_quotes: ','
  373           | sub_quotes ','

  374 steno_pitch: NOTENAME_PITCH quotes

  375 steno_tonic_pitch: TONICNAME_PITCH quotes

  376 pitch: steno_pitch
  377      | PITCH_IDENTIFIER quotes

  378 gen_text_def: full_markup
  379             | STRING
  380             | embedded_scm

  381 fingering: UNSIGNED

  382 script_abbreviation: '^'
  383                    | '+'
  384                    | '-'
  385                    | '!'
  386                    | ">"
  387                    | '.'
  388                    | '_'

  389 script_dir: '_'
  390           | '^'
  391           | '-'

  392 duration_length: multiplied_duration

  393 maybe_notemode_duration: /* empty */
  394                        | multiplied_duration

  395 optional_notemode_duration: maybe_notemode_duration

  396 steno_duration: UNSIGNED dots
  397               | DURATION_IDENTIFIER dots

  398 multiplied_duration: steno_duration
  399                    | multiplied_duration '*' UNSIGNED
  400                    | multiplied_duration '*' FRACTION

  401 dots: /* empty */
  402     | dots '.'

  403 tremolo_type: ':'
  404             | ':' UNSIGNED

  405 bass_number: UNSIGNED
  406            | STRING
  407            | full_markup
  408            | embedded_scm_bare

  409 figured_bass_alteration: '-'
  410                        | '+'
  411                        | '!'

  412 bass_figure: "_"
  413            | bass_number
  414            | bass_figure ']'
  415            | bass_figure figured_bass_alteration
  416            | bass_figure figured_bass_modification

  417 figured_bass_modification: "\+"
  418                          | "\!"
  419                          | '/'
  420                          | "\"

  421 br_bass_figure: bass_figure
  422               | '[' bass_figure

  423 figure_list: /* empty */
  424            | figure_list br_bass_figure

  425 figure_spec: FIGURE_OPEN figure_list FIGURE_CLOSE

  426 optional_rest: /* empty */
  427              | "\rest"

  428 pitch_or_music: pitch 
                        exclamations 
                        questions 
                        octave_check 
                        maybe_notemode_duration 
                        optional_rest 
                        post_events 
  429               | simple_chord_elements post_events

  430 simple_element: DRUM_PITCH optional_notemode_duration
  431               | RESTNAME optional_notemode_duration

  432 simple_chord_elements: new_chord
  433                      | figure_spec optional_notemode_duration

  434 lyric_element: full_markup
  435              | STRING
  436              | LYRIC_ELEMENT

  437 lyric_element_music: lyric_element 
                             optional_notemode_duration 
                             post_events 

  438 new_chord: steno_tonic_pitch maybe_notemode_duration
  439          | steno_tonic_pitch 
                   optional_notemode_duration 
                   chord_separator 
                   chord_items 

  440 chord_items: /* empty */
  441            | chord_items chord_item

  442 chord_separator: ":"
  443                | "^"
  444                | "/" steno_tonic_pitch
  445                | "/+" steno_tonic_pitch

  446 chord_item: chord_separator
  447           | step_numbers
  448           | CHORD_MODIFIER

  449 step_numbers: step_number
  450             | step_numbers '.' step_number

  451 step_number: UNSIGNED
  452            | UNSIGNED '+'
  453            | UNSIGNED "-"

  454 tempo_range: unsigned_number
  455            | unsigned_number '-' unsigned_number

  456 number_expression: number_expression '+' number_term
  457                  | number_expression '-' number_term
  458                  | number_term

  459 number_term: number_factor
  460            | number_factor '*' number_factor
  461            | number_factor '/' number_factor

  462 number_factor: '-' number_factor
  463              | bare_number

  464 bare_number_common: REAL
  465                   | NUMBER_IDENTIFIER
  466                   | REAL NUMBER_IDENTIFIER

  467 bare_number: bare_number_common
  468            | UNSIGNED
  469            | UNSIGNED NUMBER_IDENTIFIER

  470 unsigned_number: UNSIGNED
  471                | NUMBER_IDENTIFIER
  472                | embedded_scm

  473 exclamations: /* empty */
  474             | exclamations '!'

  475 questions: /* empty */
  476          | questions '?'

  478 full_markup_list: "\markuplist" 1 markup_list

  480 full_markup: "\markup" 2 markup_top

  481 markup_top: markup_list
  482           | markup_head_1_list simple_markup
  483           | simple_markup

  485 markup_scm: embedded_scm_bare 3 "(backed-up?)"

  486 markup_list: markup_composed_list
  487            | markup_uncomposed_list

  488 markup_uncomposed_list: markup_braced_list
  489                       | markup_command_list
  490                       | markup_scm MARKUPLIST_IDENTIFIER

  492 markup_uncomposed_list: "\score-lines" 4 '{' score_body '}'

  493 markup_composed_list: markup_head_1_list markup_uncomposed_list

  494 markup_braced_list: '{' markup_braced_list_body '}'

  495 markup_braced_list_body: /* empty */
  496                        | markup_braced_list_body markup
  497                        | markup_braced_list_body markup_list

  498 markup_command_list: MARKUP_LIST_FUNCTION markup_command_list_arguments

  499 markup_command_basic_arguments: "markup-list?" 
                                        markup_command_list_arguments 
                                        markup_list 
  500                               | "scheme?" 
                                        markup_command_list_arguments 
                                        embedded_scm 
  501                               | EXPECT_NO_MORE_ARGS

  502 markup_command_list_arguments: markup_command_basic_arguments
  503                              | "markup?" 
                                       markup_command_list_arguments 
                                       markup 

  504 markup_head_1_item: MARKUP_FUNCTION 
                            "markup?" 
                            markup_command_list_arguments 

  505 markup_head_1_list: markup_head_1_item
  506                   | markup_head_1_list markup_head_1_item

  507 simple_markup: STRING

  509 simple_markup: "\score" 5 '{' score_body '}'
  510              | MARKUP_FUNCTION markup_command_basic_arguments
  511              | markup_scm MARKUP_IDENTIFIER

  512 markup: markup_head_1_list simple_markup
  513       | simple_markup


Terminals, with rules where they appear



    210 211 212 213 214 215 216 217 218 219 220 221 222 223 229 231
    210 211 212 213 214 215 216 217 218 219 220 221 222 223 229 231
    233 234 235 236 243 244 245 246 247 248 249 250 251 253 256 500
    239 240 241 242
    253 256
    453 468 469 470
    455 457 462
"#{" (339) 3
"(backed-up?)" (334) 148 254 291 294 295 485
"(reparsed?)" (335) 196 197 198 199 200 201 224 225 226 227 237 238
"-" (319) 453
"--" (265) 350
"/" (320) 444
"/+" (316) 445
":" (318) 442
"<" (321) 336
"<<" (323) 158
">" (322) 336 386
">>" (324) 158
"\!" (326) 418
"\" (325) 420
"\+" (327) 417
"\accepts" (273) 298
"\addlyrics" (262) 280 281
"\alias" (274) 301
"\alternative" (260) 154
"\book" (275) 83
"\bookpart" (276) 97
"\change" (277) 284
"\chordmode" (278) 274
"\chords" (279) 278
"\consists" (280) 296
"\context" (281) 75 267
"\default" (282) 229 253
"\defaultchild" (283) 299
"\denies" (284) 300
"\description" (285) 303
"\drummode" (286) 272
"\drums" (287) 276
"\figuremode" (288) 273
"\figures" (289) 277
"\header" (290) 55
"\layout" (292) 125
"\lyricmode" (293) 275
"\lyrics" (294) 279
"\lyricsto" (295) 283
"\markup" (296) 480
"\markuplist" (297) 478
"\midi" (298) 124
"\name" (299) 304
"\new" (315) 268
"\notemode" (300) 271
"\override" (301) 289 312
"\paper" (302) 123
"\remove" (303) 297
"\repeat" (259) 153 154
"\rest" (304) 427
"\revert" (305) 290 313
"\score" (306) 110 509
"\score-lines" (307) 492
"\sequential" (308) 155
"\set" (309) 314
"\simultaneous" (310) 157
"\tempo" (311) 136 137 138
"\type" (312) 302
"\unset" (313) 288 315
"\version-error" (291) 8 51
"\with" (314) 163 164 166
"^" (317) 443
"_" (330) 412
"__" (264) 351
"end of input" (0) 0
"markup-list?" (336) 499
"markup?" (332) 503 504
"optional?" (337) 190 191 192 193 194 195 202 203 204 205 206 207 208
"scheme?" (333) 190 191 192 193 194 195 202 203 204 205 206 207 208
'!' (33) 385 411 474
''' (39) 370 371
'*' (42) 399 400 460
'+' (43) 383 410 452 456
',' (44) 372 373
'-' (45) 41 191 192 193 218 219 220 236 250 251 328 357 384 391 409
'.' (46) 59 183 185 294 387 402 450
'/' (47) 419 461
':' (58) 403 404
'=' (61) 57 58 59 136 137 259 284 287 289 312 314 366
'?' (63) 476
'[' (91) 422
']' (93) 414
'^' (94) 354 382 390
'_' (95) 355 388 389
'{' (123) 55 75 83 97 110 129 142 163 492 494 509
'}' (125) 55 75 83 97 110 122 142 163 492 494 509
BOOK_IDENTIFIER (340) 13 85 99
CHORD_MODIFIER (341) 448
CHORD_REPETITION (342) 331
COMPOSITE (261)
CONTEXT_MOD_IDENTIFIER (343) 164 165 173
DRUM_PITCH (344) 340 430
DURATION_IDENTIFIER (263) 208 221 249 397
E_UNSIGNED (268) 358
error (256) 7 50 96 109 120 135 141
EVENT_FUNCTION (266) 345
EVENT_IDENTIFIER (267) 360
EXPECT_NO_MORE_ARGS (338) 232 501
FIGURE_CLOSE (328) 425
FIGURE_OPEN (329) 425
FRACTION (346) 27 70 400
LYRIC_ELEMENT (347) 436
MARKUP_FUNCTION (348) 504 510
MARKUP_IDENTIFIER (350) 511
MARKUP_LIST_FUNCTION (349) 498
MARKUPLIST_IDENTIFIER (351) 490
MULTI_MEASURE_REST (331) 332
MUSIC_FUNCTION (352) 257
MUSIC_IDENTIFIER (353) 168 178 262 343
NOTENAME_PITCH (354) 374
NUMBER_IDENTIFIER (271) 43 193 217 220 236 465 466 469 471
PITCH_IDENTIFIER (345) 377
PREC_BOT (258)
PREC_TOP (272)
REAL (269) 192 216 219 251 464 466
RESTNAME (355) 431
SCM_ARG (356) 25 199 237 294 295
SCM_FUNCTION (357) 40
SCM_IDENTIFIER (358) 22 23 202 222 243 326
SCM_TOKEN (359) 18 21 26 92 105 132
STRING (360) 56 187 205 223 246 306 318 320 322 379 406 435 507
SYMBOL_LIST (361) 182 183
TONICNAME_PITCH (362) 375
UNARY_MINUS (363)
UNSIGNED (270) 43 191 207 215 218 248 250 381 396 399 404 405 451 452

Nonterminals, with rules where they appear


assignment (143)
    on left: 57 58 59, on right: 6 53 130
assignment_id (142)
    on left: 56, on right: 57 58 59
bare_number (284)
    on left: 467 468 469, on right: 327 328 463
bass_number (260)
    on left: 405 406 407 408, on right: 413
book_block (150)
    on left: 83, on right: 11 32 64
bookpart_block (153)
    on left: 97, on right: 12 33 65 87
br_bass_figure (264)
    on left: 421 422, on right: 424
braced_music_list (170)
    on left: 142, on right: 154 155 156 157
chord_body (231)
    on left: 336, on right: 335
chord_body_element (233)
    on left: 339 340 341, on right: 338
chord_body_elements (232)
    on left: 337 338, on right: 336 338
chord_item (276)
    on left: 446 447 448, on right: 441
chord_items (274)
    on left: 440 441, on right: 439 441
chord_separator (275)
    on left: 442 443 444 445, on right: 439 446
complex_music (204)
    on left: 263 264 265 266, on right: 175
complex_music_prefix (205)
    on left: 267 268, on right: 266
composite_music (184)
    on left: 175 176, on right: 15 78 89 102 152 282
context_change (211)
    on left: 284, on right: 161
context_def_spec_block (146)
    on left: 75, on right: 31 67 128
context_def_spec_body (149)
    on left: 79 80 81 82, on right: 75 80 81 82
context_mod (218)
    on left: 305 306 307, on right: 80 172
context_mod_arg (147)
    on left: 76 78, on right: 82 174
context_modification_arg (181)
    on left: 167 168, on right: 166
context_prop_spec (221)
    on left: 311, on right: 314 315
direction_less_event (240)
    on left: 359 360 361 362, on right: 348 353
direction_reqd_event (241)
    on left: 363 364, on right: 352
dots (258)
    on left: 401 402, on right: 396 397 402
duration_length (253)
    on left: 392, on right: 197 226 241
embedded_lilypond (139)
    on left: 44 45 46 47 48 49 50 51, on right: 3 51
embedded_lilypond_number (138)
    on left: 41 42 43, on right: 41 46
embedded_scm_active (133)
    on left: 23 24, on right: 19 93 106 116 131
embedded_scm_arg (136)
    on left: 37 38 39, on right: 194 210 233 324
embedded_scm_bare (132)
    on left: 21 22, on right: 35 188 321 323 408 485
event_chord (229)
    on left: 330 331 332 333 334, on right: 159
event_function_event (235)
    on left: 345, on right: 362
exclamations (286)
    on left: 473 474, on right: 339 428 474
figure_list (265)
    on left: 423 424, on right: 424 425
figure_spec (266)
    on left: 425, on right: 433
figured_bass_alteration (261)
    on left: 409 410 411, on right: 415
figured_bass_modification (263)
    on left: 417 418 419 420, on right: 416
fingering (250)
    on left: 381, on right: 354 355 357
full_markup_list (288)
    on left: 478, on right: 17 28 73 91 104
function_arglist (194)
    on left: 228 229, on right: 40 257 345
function_arglist_skip_nonbackup (195)
    on left: 230 231, on right: 229 231
gen_text_def (249)
    on left: 378 379 380, on right: 363
grob_prop_path (220)
    on left: 309 310, on right: 312
grob_prop_spec (219)
    on left: 308, on right: 309 310
grouped_music_list (186)
    on left: 180 181, on right: 179 261 269 270
identifier_init (144)
    on left: 60 61 62, on right: 57 58 59
lilypond (129)
    on left: 4 5 6 7 8, on right: 1 5 6 7 8
lilypond_header (141)
    on left: 55, on right: 10 95 108 113 118
lilypond_header_body (140)
    on left: 52 53 54, on right: 53 54 55
lyric_element (271)
    on left: 434 435 436, on right: 437
lyric_element_music (272)
    on left: 437, on right: 144 148 200 238
lyric_mode_music (202)
    on left: 261 262, on right: 280 281 283
markup (308)
    on left: 512 513, on right: 496 503
markup_braced_list (299)
    on left: 494, on right: 488
markup_braced_list_body (300)
    on left: 495 496 497, on right: 494 496 497
markup_command_list (301)
    on left: 498, on right: 489
markup_composed_list (298)
    on left: 493, on right: 486
markup_head_1_item (304)
    on left: 504, on right: 505 506
markup_head_1_list (305)
    on left: 505 506, on right: 482 493 506 512
markup_list (295)
    on left: 486 487, on right: 478 481 497 499
markup_scm (293)
    on left: 485, on right: 490 511
markup_top (292)
    on left: 481 482 483, on right: 480
markup_uncomposed_list (296)
    on left: 488 489 490 492, on right: 487 493
maybe_notemode_duration (254)
    on left: 393 394, on right: 395 428 438
mode_changed_music (206)
    on left: 269 270, on right: 177
mode_changing_head (207)
    on left: 271 272 273 274 275, on right: 269
music (171)
    on left: 143 144 145, on right: 115 146 153 154 266
music_assign (174)
    on left: 151 152, on right: 39 68 127 143
music_bare (185)
    on left: 177 178 179, on right: 176
music_embedded (172)
    on left: 146 147 148 149, on right: 49 140
music_embedded_backup (173)
    on left: 150, on right: 147 148
music_function_call (200)
    on left: 257, on right: 263 342 349
music_function_chord_body (234)
    on left: 342 343 344, on right: 341
music_list (169)
    on left: 139 140 141, on right: 49 140 141 142 158
music_or_context_def (165)
    on left: 127 128, on right: 134
music_property_def (224)
    on left: 317, on right: 160
new_chord (273)
    on left: 438 439, on right: 432
new_lyrics (209)
    on left: 280 281, on right: 281 282
note_chord_element (230)
    on left: 335, on right: 334
number_expression (280)
    on left: 456 457 458, on right: 61 456 457
number_factor (282)
    on left: 462 463, on right: 459 460 461 462
number_term (281)
    on left: 459 460 461, on right: 456 457 458
octave_check (242)
    on left: 365 366, on right: 339 428
optional_context_mod (182)
    on left: 169 170, on right: 267 268 270
optional_id (201)
    on left: 258 259, on right: 267 268
optional_rest (267)
    on left: 426 427, on right: 428
output_def (162)
    on left: 122, on right: 20 34 66 114 119 121
output_def_head (163)
    on left: 123 124 125, on right: 126
output_def_head_with_mode_switch (164)
    on left: 126, on right: 129
paper_block (161)
    on left: 121, on right: 86 100
pitch (248)
    on left: 376 377, on right: 203 212 244 339 428
pitch_or_music (268)
    on left: 428 429, on right: 69 145 196 224 239 325
post_event (238)
    on left: 356 357, on right: 47 347
property_operation (213)
    on left: 287 288 289 290, on right: 305
property_path (212)
    on left: 285 286, on right: 58 59 286 289 310
questions (287)
    on left: 475 476, on right: 339 428 476
quotes (243)
    on left: 367 368 369, on right: 366 374 375 377
re_rhythmed_music (210)
    on left: 282 283, on right: 265
repeated_music (175)
    on left: 153 154, on right: 264
revert_arg (214)
    on left: 291, on right: 290 313
revert_arg_backup (215)
    on left: 292, on right: 291 294 295
revert_arg_part (216)
    on left: 293 294 295, on right: 292
scm_function_call (137)
    on left: 40, on right: 24 36 38
score_block (156)
    on left: 110, on right: 14 30 63 88 101
score_headers (157)
    on left: 111 113 114, on right: 113 114 115
script_dir (252)
    on left: 389 390 391, on right: 349 352 353
sequential_music (176)
    on left: 155 156, on right: 181
simple_chord_elements (270)
    on left: 432 433, on right: 429
simple_element (269)
    on left: 430 431, on right: 330
simple_markup (306)
    on left: 507 509 510 511, on right: 482 483 512 513
simple_music (178)
    on left: 159 160 161, on right: 151
simple_music_property_def (222)
    on left: 312 313 314 315, on right: 317
simple_revert_context (223)
    on left: 316, on right: 313
simple_string (226)
    on left: 320 321, on right: 153 154 259 283 284
simultaneous_music (177)
    on left: 157 158, on right: 180
start_symbol (127)
    on left: 1 3, on right: 0
steno_duration (256)
    on left: 396 397, on right: 136 137 398
steno_pitch (246)
    on left: 374, on right: 376
step_number (278)
    on left: 451 452 453, on right: 449 450
step_numbers (277)
    on left: 449 450, on right: 447 450
string (225)
    on left: 318 319, on right: 71 329
string_number_event (239)
    on left: 358, on right: 359
sub_quotes (245)
    on left: 372 373, on right: 368 373
sup_quotes (244)
    on left: 370 371, on right: 369 371
symbol (227)
    on left: 322 323, on right: 267 268 284 287 288
symbol_list_arg (187)
    on left: 182 183, on right: 201 227 242 291
symbol_list_element (190)
    on left: 187 188, on right: 186
symbol_list_part (189)
    on left: 186, on right: 184 185 293 294 295 316
symbol_list_rev (188)
    on left: 184 185, on right: 183 185 285 286 308 311
tempo_event (168)
    on left: 136 137 138, on right: 333
tempo_range (279)
    on left: 454 455, on right: 136 137
tremolo_type (259)
    on left: 403 404, on right: 361
unsigned_number (285)
    on left: 470 471 472, on right: 153 154 454 455

LilyPond — Contributor’s Guide v2.19.2 (development-branch).