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_body: score_items
  112           | score_body error

  113 score_item: embedded_scm
  114           | music
  115           | output_def

  116 score_items: /* empty */
  117            | score_items score_item

  119 score_items: score_items  lilypond_header

  120 paper_block: output_def

  121 output_def: output_def_body '}'

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

  125 output_def_head_with_mode_switch: output_def_head

  126 music_or_context_def: music_assign
  127                     | context_def_spec_block

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

  133 output_def_body: output_def_body  music_or_context_def
  134                | output_def_body error

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

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

  141 braced_music_list: '{' music_list '}'

  142 music: music_assign
  143      | lyric_element_music
  144      | pitch_or_music

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

  149 music_embedded_backup: embedded_scm

  150 music_assign: simple_music
  151             | composite_music

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

  154 sequential_music: "\sequential" braced_music_list
  155                 | braced_music_list

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

  158 simple_music: event_chord
  159             | music_property_def
  160             | context_change

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

  166 context_modification_arg: embedded_scm
  167                         | MUSIC_IDENTIFIER

  168 optional_context_mod: /* empty */
  169                     | context_modification

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

  174 composite_music: complex_music
  175                | music_bare

  176 music_bare: mode_changed_music
  177           | MUSIC_IDENTIFIER
  178           | grouped_music_list

  179 grouped_music_list: simultaneous_music
  180                   | sequential_music

  181 symbol_list_arg: SYMBOL_LIST
  182                | SYMBOL_LIST '.' symbol_list_rev

  183 symbol_list_rev: symbol_list_part
  184                | symbol_list_rev '.' symbol_list_part

  185 symbol_list_part: symbol_list_element

  186 symbol_list_element: STRING
  187                    | embedded_scm_bare

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

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

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

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

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

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

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

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

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

  256 music_function_call: MUSIC_FUNCTION function_arglist

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

  260 lyric_mode_music:  grouped_music_list
  261                 | MUSIC_IDENTIFIER

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

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

  268 mode_changed_music: mode_changing_head grouped_music_list
  269                   | mode_changing_head_with_context 
                            optional_context_mod 
                            grouped_music_list 

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

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

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

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

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

  284 property_path: symbol_list_rev
  285              | symbol_list_rev property_path

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

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

  291 revert_arg_backup: revert_arg_part

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

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

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

  307 grob_prop_spec: symbol_list_rev

  308 grob_prop_path: grob_prop_spec
  309               | grob_prop_spec property_path

  310 context_prop_spec: symbol_list_rev

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

  315 simple_revert_context: symbol_list_part

  316 music_property_def: simple_music_property_def

  317 string: STRING
  318       | full_markup

  319 simple_string: STRING
  320              | embedded_scm_bare

  321 symbol: STRING
  322       | embedded_scm_bare

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

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

  334 note_chord_element: chord_body optional_notemode_duration post_events

  335 chord_body: "<" chord_body_elements ">"
  336           | FIGURE_OPEN figure_list FIGURE_CLOSE

  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 optional_rest: /* empty */
  426              | "\rest"

  427 pitch_or_music: pitch 
                        exclamations 
                        questions 
                        octave_check 
                        maybe_notemode_duration 
                        optional_rest 
                        post_events 
  428               | new_chord post_events

  429 simple_element: DRUM_PITCH optional_notemode_duration
  430               | RESTNAME optional_notemode_duration

  431 lyric_element: full_markup
  432              | STRING
  433              | LYRIC_ELEMENT

  434 lyric_element_music: lyric_element 
                             optional_notemode_duration 
                             post_events 

  435 new_chord: steno_tonic_pitch maybe_notemode_duration
  436          | steno_tonic_pitch 
                   optional_notemode_duration 
                   chord_separator 
                   chord_items 

  437 chord_items: /* empty */
  438            | chord_items chord_item

  439 chord_separator: ":"
  440                | "^"
  441                | "/" steno_tonic_pitch
  442                | "/+" steno_tonic_pitch

  443 chord_item: chord_separator
  444           | step_numbers
  445           | CHORD_MODIFIER

  446 step_numbers: step_number
  447             | step_numbers '.' step_number

  448 step_number: UNSIGNED
  449            | UNSIGNED '+'
  450            | UNSIGNED "-"

  451 tempo_range: unsigned_number
  452            | unsigned_number '-' unsigned_number

  453 number_expression: number_expression '+' number_term
  454                  | number_expression '-' number_term
  455                  | number_term

  456 number_term: number_factor
  457            | number_factor '*' number_factor
  458            | number_factor '/' number_factor

  459 number_factor: '-' number_factor
  460              | bare_number

  461 bare_number_common: REAL
  462                   | NUMBER_IDENTIFIER
  463                   | REAL NUMBER_IDENTIFIER

  464 bare_number: bare_number_common
  465            | UNSIGNED
  466            | UNSIGNED NUMBER_IDENTIFIER

  467 unsigned_number: UNSIGNED
  468                | NUMBER_IDENTIFIER
  469                | embedded_scm

  470 exclamations: /* empty */
  471             | exclamations '!'

  472 questions: /* empty */
  473          | questions '?'

  475 full_markup_list: "\markuplist" 0 markup_list

  477 full_markup: "\markup" 1 markup_top

  478 markup_top: markup_list
  479           | markup_head_1_list simple_markup
  480           | simple_markup

  482 markup_scm: embedded_scm_bare 2 "(backed-up?)"

  483 markup_list: markup_composed_list
  484            | markup_uncomposed_list

  485 markup_uncomposed_list: markup_braced_list
  486                       | markup_command_list
  487                       | markup_scm MARKUPLIST_IDENTIFIER

  489 markup_uncomposed_list: "\score-lines" 3 '{' score_body '}'

  490 markup_composed_list: markup_head_1_list markup_uncomposed_list

  491 markup_braced_list: '{' markup_braced_list_body '}'

  492 markup_braced_list_body: /* empty */
  493                        | markup_braced_list_body markup
  494                        | markup_braced_list_body markup_list

  495 markup_command_list: MARKUP_LIST_FUNCTION markup_command_list_arguments

  496 markup_command_basic_arguments: "markup-list?" 
                                        markup_command_list_arguments 
                                        markup_list 
  497                               | "scheme?" 
                                        markup_command_list_arguments 
                                        embedded_scm 
  498                               | EXPECT_NO_MORE_ARGS

  499 markup_command_list_arguments: markup_command_basic_arguments
  500                              | "markup?" 
                                       markup_command_list_arguments 
                                       markup 

  501 markup_head_1_item: MARKUP_FUNCTION 
                            "markup?" 
                            markup_command_list_arguments 

  502 markup_head_1_list: markup_head_1_item
  503                   | markup_head_1_list markup_head_1_item

  504 simple_markup: STRING

  506 simple_markup: "\score" 4 '{' score_body '}'
  507              | MARKUP_FUNCTION markup_command_basic_arguments
  508              | markup_scm MARKUP_IDENTIFIER

  509 markup: markup_head_1_list simple_markup
  510       | simple_markup


Terminals, with rules where they appear



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

Nonterminals, with rules where they appear


assignment (143)
    on left: 57 58 59, on right: 6 53 129
assignment_id (142)
    on left: 56, on right: 57 58 59
bare_number (282)
    on left: 464 465 466, on right: 326 327 460
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: 141, on right: 153 154 155 156
chord_body (231)
    on left: 335 336, on right: 334
chord_body_element (233)
    on left: 339 340 341, on right: 338
chord_body_elements (232)
    on left: 337 338, on right: 335 338
chord_item (274)
    on left: 443 444 445, on right: 438
chord_items (272)
    on left: 437 438, on right: 436 438
chord_separator (273)
    on left: 439 440 441 442, on right: 436 443
complex_music (204)
    on left: 262 263 264 265, on right: 174
complex_music_prefix (205)
    on left: 266 267, on right: 265
composite_music (184)
    on left: 174 175, on right: 15 78 89 102 151 281
context_change (211)
    on left: 283, on right: 160
context_def_spec_block (146)
    on left: 75, on right: 31 67 127
context_def_spec_body (149)
    on left: 79 80 81 82, on right: 75 80 81 82
context_mod (218)
    on left: 304 305 306, on right: 80 171
context_mod_arg (147)
    on left: 76 78, on right: 82 173
context_modification_arg (181)
    on left: 166 167, on right: 165
context_prop_spec (221)
    on left: 310, on right: 313 314
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: 196 225 240
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 130
embedded_scm_arg (136)
    on left: 37 38 39, on right: 193 209 232 323
embedded_scm_bare (132)
    on left: 21 22, on right: 35 187 320 322 408 482
event_chord (229)
    on left: 329 330 331 332 333, on right: 158
event_function_event (235)
    on left: 345, on right: 362
exclamations (284)
    on left: 470 471, on right: 339 427 471
figure_list (265)
    on left: 423 424, on right: 336 424
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 (286)
    on left: 475, on right: 17 28 73 91 104
function_arglist (194)
    on left: 227 228, on right: 40 256 345
function_arglist_skip_nonbackup (195)
    on left: 229 230, on right: 228 230
gen_text_def (249)
    on left: 378 379 380, on right: 363
grob_prop_path (220)
    on left: 308 309, on right: 311
grob_prop_spec (219)
    on left: 307, on right: 308 309
grouped_music_list (186)
    on left: 179 180, on right: 178 260 268 269
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 119
lilypond_header_body (140)
    on left: 52 53 54, on right: 53 54 55
lyric_element (269)
    on left: 431 432 433, on right: 434
lyric_element_music (270)
    on left: 434, on right: 143 147 199 237
lyric_mode_music (202)
    on left: 260 261, on right: 279 280 282
markup (306)
    on left: 509 510, on right: 493 500
markup_braced_list (297)
    on left: 491, on right: 485
markup_braced_list_body (298)
    on left: 492 493 494, on right: 491 493 494
markup_command_list (299)
    on left: 495, on right: 486
markup_composed_list (296)
    on left: 490, on right: 483
markup_head_1_item (302)
    on left: 501, on right: 502 503
markup_head_1_list (303)
    on left: 502 503, on right: 479 490 503 509
markup_list (293)
    on left: 483 484, on right: 475 478 494 496
markup_scm (291)
    on left: 482, on right: 487 508
markup_top (290)
    on left: 478 479 480, on right: 477
markup_uncomposed_list (294)
    on left: 485 486 487 489, on right: 484 490
maybe_notemode_duration (254)
    on left: 393 394, on right: 395 427 435
mode_changed_music (206)
    on left: 268 269, on right: 176
mode_changing_head (207)
    on left: 270 271 272 273 274, on right: 268
music (171)
    on left: 142 143 144, on right: 114 145 152 153 265
music_assign (174)
    on left: 150 151, on right: 39 68 126 142
music_bare (185)
    on left: 176 177 178, on right: 175
music_embedded (172)
    on left: 145 146 147 148, on right: 49 139
music_embedded_backup (173)
    on left: 149, on right: 146 147
music_function_call (200)
    on left: 256, on right: 262 342 349
music_function_chord_body (234)
    on left: 342 343 344, on right: 341
music_list (169)
    on left: 138 139 140, on right: 49 139 140 141 157
music_or_context_def (165)
    on left: 126 127, on right: 133
music_property_def (224)
    on left: 316, on right: 159
new_chord (271)
    on left: 435 436, on right: 428
new_lyrics (209)
    on left: 279 280, on right: 280 281
note_chord_element (230)
    on left: 334, on right: 333
number_expression (278)
    on left: 453 454 455, on right: 61 453 454
number_factor (280)
    on left: 459 460, on right: 456 457 458 459
number_term (279)
    on left: 456 457 458, on right: 453 454 455
octave_check (242)
    on left: 365 366, on right: 339 427
optional_context_mod (182)
    on left: 168 169, on right: 266 267 269
optional_id (201)
    on left: 257 258, on right: 266 267
optional_rest (266)
    on left: 425 426, on right: 427
output_def (162)
    on left: 121, on right: 20 34 66 115 120
output_def_head (163)
    on left: 122 123 124, on right: 125
output_def_head_with_mode_switch (164)
    on left: 125, on right: 128
paper_block (161)
    on left: 120, on right: 86 100
pitch (248)
    on left: 376 377, on right: 202 211 243 339 427
pitch_or_music (267)
    on left: 427 428, on right: 69 144 195 223 238 324
post_event (238)
    on left: 356 357, on right: 47 347
property_operation (213)
    on left: 286 287 288 289, on right: 304
property_path (212)
    on left: 284 285, on right: 58 59 285 288 309
questions (285)
    on left: 472 473, on right: 339 427 473
quotes (243)
    on left: 367 368 369, on right: 366 374 375 377
re_rhythmed_music (210)
    on left: 281 282, on right: 264
repeated_music (175)
    on left: 152 153, on right: 263
revert_arg (214)
    on left: 290, on right: 289 312
revert_arg_backup (215)
    on left: 291, on right: 290 293 294
revert_arg_part (216)
    on left: 292 293 294, on right: 291
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_body (157)
    on left: 111 112, on right: 110 112 489 506
score_item (158)
    on left: 113 114 115, on right: 117
score_items (159)
    on left: 116 117 119, on right: 111 117 119
script_dir (252)
    on left: 389 390 391, on right: 349 352 353
sequential_music (176)
    on left: 154 155, on right: 180
simple_element (268)
    on left: 429 430, on right: 329
simple_markup (304)
    on left: 504 506 507 508, on right: 479 480 509 510
simple_music (178)
    on left: 158 159 160, on right: 150
simple_music_property_def (222)
    on left: 311 312 313 314, on right: 316
simple_revert_context (223)
    on left: 315, on right: 312
simple_string (226)
    on left: 319 320, on right: 152 153 258 282 283
simultaneous_music (177)
    on left: 156 157, on right: 179
start_symbol (127)
    on left: 1 3, on right: 0
steno_duration (256)
    on left: 396 397, on right: 135 136 398
steno_pitch (246)
    on left: 374, on right: 376
step_number (276)
    on left: 448 449 450, on right: 446 447
step_numbers (275)
    on left: 446 447, on right: 444 447
string (225)
    on left: 317 318, on right: 71 328
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: 321 322, on right: 266 267 283 286 287
symbol_list_arg (187)
    on left: 181 182, on right: 200 226 241 290
symbol_list_element (190)
    on left: 186 187, on right: 185
symbol_list_part (189)
    on left: 185, on right: 183 184 292 293 294 315
symbol_list_rev (188)
    on left: 183 184, on right: 182 184 284 285 307 310
tempo_event (168)
    on left: 135 136 137, on right: 332
tempo_range (277)
    on left: 451 452, on right: 135 136
tremolo_type (259)
    on left: 403 404, on right: 361
unsigned_number (283)
    on left: 467 468 469, on right: 152 153 451 452

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