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_mod_embedded: context_mod_arg

   80 context_def_spec_body: /* empty */
   81                      | CONTEXT_DEF_IDENTIFIER
   82                      | context_def_spec_body context_mod
   83                      | context_def_spec_body context_modification
   84                      | context_def_spec_body context_mod_embedded

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

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

   97 book_body: book_body  lilypond_header
   98          | book_body error

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

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

  110 bookpart_body: bookpart_body  lilypond_header
  111              | bookpart_body error

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

  113 score_headers: /* empty */

  115 score_headers: score_headers  lilypond_header
  116              | score_headers output_def

  117 score_body: score_headers music
  118           | embedded_scm_active

  120 score_body: score_body  lilypond_header
  121           | score_body output_def
  122           | score_body error

  123 paper_block: output_def

  124 output_def: output_def_body '}'

  125 output_def_head: "\paper"
  126                | "\midi"
  127                | "\layout"

  128 output_def_head_with_mode_switch: output_def_head

  129 music_or_context_def: music_assign
  130                     | context_def_spec_block

  131 output_def_body: output_def_head_with_mode_switch '{'
  132                | output_def_head_with_mode_switch 
                         '{' 
                         OUTPUT_DEF_IDENTIFIER 
  133                | output_def_body assignment
  134                | output_def_body embedded_scm

  136 output_def_body: output_def_body  music_or_context_def
  137                | output_def_body error

  138 tempo_event: "\tempo" steno_duration '=' tempo_range
  139            | "\tempo" scalar steno_duration '=' tempo_range
  140            | "\tempo" scalar

  141 music_list: /* empty */
  142           | music_list music_embedded
  143           | music_list error

  144 braced_music_list: '{' music_list '}'

  145 music: music_assign
  146      | lyric_element_music
  147      | pitch_or_music

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

  152 music_embedded_backup: embedded_scm

  153 music_assign: simple_music
  154             | composite_music

  155 repeated_music: "\repeat" simple_string unsigned_number music
  156               | "\repeat" 
                        simple_string 
                        unsigned_number 
                        music 
                        "\alternative" 
                        braced_music_list 

  157 sequential_music: "\sequential" braced_music_list
  158                 | braced_music_list

  159 simultaneous_music: "\simultaneous" braced_music_list
  160                   | "<<" music_list ">>"

  161 simple_music: event_chord
  162             | music_property_def
  163             | context_change

  165 context_modification: "\with"  '{' context_mod_list '}'
  166                     | "\with" CONTEXT_MOD_IDENTIFIER
  167                     | CONTEXT_MOD_IDENTIFIER
  168                     | "\with" context_modification_arg

  169 context_modification_arg: embedded_scm
  170                         | MUSIC_IDENTIFIER

  171 optional_context_mod: /* empty */
  172                     | context_modification

  173 context_mod_list: /* empty */
  174                 | context_mod_list context_mod
  175                 | context_mod_list CONTEXT_MOD_IDENTIFIER
  176                 | context_mod_list context_mod_embedded

  177 composite_music: complex_music
  178                | music_bare

  179 music_bare: mode_changed_music
  180           | MUSIC_IDENTIFIER
  181           | grouped_music_list

  182 grouped_music_list: simultaneous_music
  183                   | sequential_music

  184 symbol_list_arg: SYMBOL_LIST
  185                | SYMBOL_LIST '.' symbol_list_rev

  186 symbol_list_rev: symbol_list_part
  187                | symbol_list_rev '.' symbol_list_part

  188 symbol_list_part: symbol_list_element

  189 symbol_list_element: STRING
  190                    | embedded_scm_bare

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

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

  211 function_arglist_backup: function_arglist_common
  212                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 embedded_scm_arg 
  213                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 post_event_nofinger 
  214                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 pitch 
  215                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 steno_tonic_pitch 
  216                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 full_markup 
  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 
                                 '-' 
                                 UNSIGNED 
  221                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 '-' 
                                 REAL 
  222                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 '-' 
                                 NUMBER_IDENTIFIER 
  223                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 DURATION_IDENTIFIER 
  224                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 SCM_IDENTIFIER 
  225                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 STRING 
  226                        | function_arglist_backup 
                                 "(reparsed?)" 
                                 pitch_or_music 
  227                        | function_arglist_backup 
                                 "(reparsed?)" 
                                 bare_number_common 
  228                        | function_arglist_backup 
                                 "(reparsed?)" 
                                 duration_length 
  229                        | function_arglist_backup 
                                 "(reparsed?)" 
                                 symbol_list_arg 

  230 function_arglist: function_arglist_nonbackup
  231                 | "optional?" 
                          "scheme?" 
                          function_arglist_skip_nonbackup 
                          "\default" 

  232 function_arglist_skip_nonbackup: function_arglist_nonbackup
  233                                | "optional?" 
                                         "scheme?" 
                                         function_arglist_skip_nonbackup 

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

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

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

  257 function_arglist_skip_backup: function_arglist_backup
  258                             | "optional?" 
                                      "scheme?" 
                                      function_arglist_skip_backup 

  259 music_function_call: MUSIC_FUNCTION function_arglist

  260 optional_id: /* empty */
  261            | '=' simple_string

  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"

  280 new_lyrics: "\addlyrics" 0 composite_music

  282 new_lyrics: new_lyrics "\addlyrics" 1 composite_music

  283 re_rhythmed_music: composite_music new_lyrics

  285 re_rhythmed_music: "\lyricsto" simple_string 2 music

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

  287 property_path: symbol_list_rev
  288              | symbol_list_rev property_path

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

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

  294 revert_arg_backup: revert_arg_part

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

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

  307 context_mod: property_operation
  308            | context_def_mod STRING
  309            | context_def_mod embedded_scm

  310 grob_prop_spec: symbol_list_rev

  311 grob_prop_path: grob_prop_spec
  312               | grob_prop_spec property_path

  313 context_prop_spec: symbol_list_rev

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

  318 simple_revert_context: symbol_list_part

  319 music_property_def: simple_music_property_def

  320 string: STRING
  321       | full_markup

  322 simple_string: STRING
  323              | embedded_scm_bare

  324 symbol: STRING
  325       | embedded_scm_bare

  326 scalar: embedded_scm_arg
  327       | pitch_or_music
  328       | SCM_IDENTIFIER
  329       | bare_number
  330       | '-' bare_number
  331       | string

  332 event_chord: simple_element post_events
  333            | CHORD_REPETITION optional_notemode_duration post_events
  334            | MULTI_MEASURE_REST optional_notemode_duration post_events
  335            | tempo_event
  336            | note_chord_element

  337 note_chord_element: chord_body optional_notemode_duration post_events

  338 chord_body: "<" chord_body_elements ">"

  339 chord_body_elements: /* empty */
  340                    | chord_body_elements chord_body_element

  341 chord_body_element: pitch 
                            exclamations 
                            questions 
                            octave_check 
                            post_events 
  342                   | DRUM_PITCH post_events
  343                   | music_function_chord_body

  344 music_function_chord_body: music_function_call
  345                          | MUSIC_IDENTIFIER

  346 event_function_event: EVENT_FUNCTION function_arglist

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

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

  357 post_event: post_event_nofinger
  358           | '-' fingering

  359 string_number_event: E_UNSIGNED

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

  364 direction_reqd_event: gen_text_def
  365                     | script_abbreviation

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

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

  371 sup_quotes: '''
  372           | sup_quotes '''

  373 sub_quotes: ','
  374           | sub_quotes ','

  375 steno_pitch: NOTENAME_PITCH quotes

  376 steno_tonic_pitch: TONICNAME_PITCH quotes

  377 pitch: steno_pitch
  378      | PITCH_IDENTIFIER quotes

  379 gen_text_def: full_markup
  380             | STRING
  381             | embedded_scm

  382 fingering: UNSIGNED

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

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

  393 duration_length: multiplied_duration

  394 maybe_notemode_duration: /* empty */
  395                        | multiplied_duration

  396 optional_notemode_duration: maybe_notemode_duration

  397 steno_duration: UNSIGNED dots
  398               | DURATION_IDENTIFIER dots

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

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

  404 tremolo_type: ':'
  405             | ':' UNSIGNED

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

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

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

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

  422 br_bass_figure: bass_figure
  423               | '[' bass_figure

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

  426 figure_spec: FIGURE_OPEN figure_list FIGURE_CLOSE

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

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

  431 simple_element: DRUM_PITCH optional_notemode_duration
  432               | RESTNAME optional_notemode_duration

  433 simple_chord_elements: new_chord
  434                      | figure_spec optional_notemode_duration

  435 lyric_element: full_markup
  436              | STRING
  437              | LYRIC_ELEMENT

  438 lyric_element_music: lyric_element 
                             optional_notemode_duration 
                             post_events 

  439 new_chord: steno_tonic_pitch maybe_notemode_duration
  440          | steno_tonic_pitch 
                   optional_notemode_duration 
                   chord_separator 
                   chord_items 

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

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

  447 chord_item: chord_separator
  448           | step_numbers
  449           | CHORD_MODIFIER

  450 step_numbers: step_number
  451             | step_numbers '.' step_number

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

  455 tempo_range: unsigned_number
  456            | unsigned_number '-' unsigned_number

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

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

  463 number_factor: '-' number_factor
  464              | bare_number

  465 bare_number_common: REAL
  466                   | NUMBER_IDENTIFIER
  467                   | REAL NUMBER_IDENTIFIER

  468 bare_number: bare_number_common
  469            | UNSIGNED
  470            | UNSIGNED NUMBER_IDENTIFIER

  471 unsigned_number: UNSIGNED
  472                | NUMBER_IDENTIFIER
  473                | embedded_scm

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

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

  479 full_markup_list: "\markuplist" 3 markup_list

  481 full_markup: "\markup" 4 markup_top

  482 markup_top: markup_list
  483           | markup_head_1_list simple_markup
  484           | simple_markup

  486 markup_scm: embedded_scm_bare 5 "(backed-up?)"

  487 markup_list: markup_composed_list
  488            | markup_uncomposed_list

  489 markup_uncomposed_list: markup_braced_list
  490                       | markup_command_list
  491                       | markup_scm MARKUPLIST_IDENTIFIER

  493 markup_uncomposed_list: "\score-lines" 6 '{' score_body '}'

  494 markup_composed_list: markup_head_1_list markup_uncomposed_list

  495 markup_braced_list: '{' markup_braced_list_body '}'

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

  499 markup_command_list: MARKUP_LIST_FUNCTION markup_command_list_arguments

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

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

  505 markup_head_1_item: MARKUP_FUNCTION 
                            "markup?" 
                            markup_command_list_arguments 

  506 markup_head_1_list: markup_head_1_item
  507                   | markup_head_1_list markup_head_1_item

  508 simple_markup: STRING

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

  513 markup: markup_head_1_list simple_markup
  514       | simple_markup


Terminals, with rules where they appear



    212 213 214 215 216 217 218 219 220 221 222 223 224 225 231 233
    212 213 214 215 216 217 218 219 220 221 222 223 224 225 231 233
    235 236 237 238 245 246 247 248 249 250 251 252 253 255 258 501
    241 242 243 244
    255 258
    454 469 470 471
    456 458 463
"#{" (339) 3
"(backed-up?)" (334) 150 256 293 296 297 486
"(reparsed?)" (335) 198 199 200 201 202 203 226 227 228 229 239 240
"-" (319) 454
"--" (265) 351
"/" (320) 445
"/+" (316) 446
":" (318) 443
"<" (321) 338
"<<" (323) 160
">" (322) 338 387
">>" (324) 160
"\!" (326) 419
"\" (325) 421
"\+" (327) 418
"\accepts" (273) 300
"\addlyrics" (262) 280 282
"\alias" (274) 303
"\alternative" (260) 156
"\book" (275) 85
"\bookpart" (276) 99
"\change" (277) 286
"\chordmode" (278) 273
"\chords" (279) 277
"\consists" (280) 298
"\context" (281) 75 266
"\default" (282) 231 255
"\defaultchild" (283) 301
"\denies" (284) 302
"\description" (285) 305
"\drummode" (286) 271
"\drums" (287) 275
"\figuremode" (288) 272
"\figures" (289) 276
"\header" (290) 55
"\layout" (292) 127
"\lyricmode" (293) 274
"\lyrics" (294) 278
"\lyricsto" (295) 285
"\markup" (296) 481
"\markuplist" (297) 479
"\midi" (298) 126
"\name" (299) 306
"\new" (315) 267
"\notemode" (300) 270
"\override" (301) 291 314
"\paper" (302) 125
"\remove" (303) 299
"\repeat" (259) 155 156
"\rest" (304) 428
"\revert" (305) 292 315
"\score" (306) 112 510
"\score-lines" (307) 493
"\sequential" (308) 157
"\set" (309) 316
"\simultaneous" (310) 159
"\tempo" (311) 138 139 140
"\type" (312) 304
"\unset" (313) 290 317
"\version-error" (291) 8 51
"\with" (314) 165 166 168
"^" (317) 444
"_" (330) 413
"__" (264) 352
"end of input" (0) 0
"markup-list?" (336) 500
"markup?" (332) 504 505
"optional?" (337) 192 193 194 195 196 197 204 205 206 207 208 209 210
"scheme?" (333) 192 193 194 195 196 197 204 205 206 207 208 209 210
'!' (33) 386 412 475
''' (39) 371 372
'*' (42) 400 401 461
'+' (43) 384 411 453 457
',' (44) 373 374
'-' (45) 41 193 194 195 220 221 222 238 252 253 330 358 385 392 410
'.' (46) 59 185 187 296 388 403 451
'/' (47) 420 462
':' (58) 404 405
'=' (61) 57 58 59 138 139 261 286 289 291 314 316 367
'?' (63) 477
'[' (91) 423
']' (93) 415
'^' (94) 355 383 391
'_' (95) 356 389 390
'{' (123) 55 75 85 99 112 131 132 144 165 493 495 510
'}' (125) 55 75 85 99 112 124 144 165 493 495 510
BOOK_IDENTIFIER (340) 13 87 101
CHORD_MODIFIER (341) 449
CHORD_REPETITION (342) 333
COMPOSITE (261)
CONTEXT_DEF_IDENTIFIER (343) 81
CONTEXT_MOD_IDENTIFIER (344) 166 167 175
DRUM_PITCH (345) 342 431
DURATION_IDENTIFIER (263) 210 223 251 398
E_UNSIGNED (268) 359
error (256) 7 50 98 111 122 137 143
EVENT_FUNCTION (266) 346
EVENT_IDENTIFIER (267) 361
EXPECT_NO_MORE_ARGS (338) 234 502
FIGURE_CLOSE (328) 426
FIGURE_OPEN (329) 426
FRACTION (347) 27 70 401
LYRIC_ELEMENT (348) 437
MARKUP_FUNCTION (349) 505 511
MARKUP_IDENTIFIER (351) 512
MARKUP_LIST_FUNCTION (350) 499
MARKUPLIST_IDENTIFIER (352) 491
MULTI_MEASURE_REST (331) 334
MUSIC_FUNCTION (353) 259
MUSIC_IDENTIFIER (354) 170 180 345
NOTENAME_PITCH (355) 375
NUMBER_IDENTIFIER (271) 43 195 219 222 238 466 467 470 472
OUTPUT_DEF_IDENTIFIER (356) 132
PITCH_IDENTIFIER (346) 378
PREC_BOT (258)
PREC_TOP (272)
REAL (269) 194 218 221 253 465 467
RESTNAME (357) 432
SCM_ARG (358) 25 201 239 296 297
SCM_FUNCTION (359) 40
SCM_IDENTIFIER (360) 22 23 204 224 245 328
SCM_TOKEN (361) 18 21 26 94 107
STRING (362) 56 189 207 225 248 308 320 322 324 380 407 436 508
SYMBOL_LIST (363) 184 185
TONICNAME_PITCH (364) 376
UNARY_MINUS (365)
UNSIGNED (270) 43 193 209 217 220 250 252 382 397 400 405 406 452 453

Nonterminals, with rules where they appear


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