C. LilyPond-Grammatik

Dieser Anhang enthält eine Beschreibung der LilyPond-Grammatik, wie sie der Parser ausgibt.

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                    | score_block
   14                    | composite_music
   15                    | full_markup
   16                    | full_markup_list
   17                    | SCM_TOKEN
   18                    | embedded_scm_active
   19                    | output_def

   20 embedded_scm_bare: SCM_TOKEN
   21                  | SCM_IDENTIFIER

   22 embedded_scm_active: SCM_IDENTIFIER
   23                    | scm_function_call

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

   33 embedded_scm: embedded_scm_bare
   34             | scm_function_call

   35 embedded_scm_arg: embedded_scm_bare_arg
   36                 | scm_function_call
   37                 | music_arg

   38 scm_function_call: SCM_FUNCTION function_arglist

   39 embedded_lilypond: /* empty */
   40                  | identifier_init
   41                  | music_embedded music_embedded music_list
   42                  | error
   43                  | "\version-error" embedded_lilypond

   44 lilypond_header_body: /* empty */
   45                     | lilypond_header_body assignment
   46                     | lilypond_header_body embedded_scm

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

   48 assignment_id: STRING

   49 assignment: assignment_id '=' identifier_init
   50           | assignment_id property_path '=' identifier_init

   51 identifier_init: score_block
   52                | book_block
   53                | bookpart_block
   54                | output_def
   55                | context_def_spec_block
   56                | music_assign
   57                | post_event_nofinger post_events
   58                | number_expression
   59                | FRACTION
   60                | string
   61                | embedded_scm
   62                | full_markup_list
   63                | context_modification

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

   65 context_mod_arg: embedded_scm

   67 context_mod_arg:  composite_music

   68 context_mod_embedded: context_mod_arg

   69 context_def_spec_body: /* empty */
   70                      | CONTEXT_DEF_IDENTIFIER
   71                      | context_def_spec_body context_mod
   72                      | context_def_spec_body context_modification
   73                      | context_def_spec_body context_mod_embedded

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

   75 book_body: /* empty */
   76          | BOOK_IDENTIFIER
   77          | book_body paper_block
   78          | book_body bookpart_block
   79          | book_body score_block
   80          | book_body composite_music
   81          | book_body full_markup
   82          | book_body full_markup_list
   83          | book_body SCM_TOKEN
   84          | book_body embedded_scm_active

   86 book_body: book_body  lilypond_header
   87          | book_body error

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

   89 bookpart_body: /* empty */
   90              | BOOK_IDENTIFIER
   91              | bookpart_body paper_block
   92              | bookpart_body score_block
   93              | bookpart_body composite_music
   94              | bookpart_body full_markup
   95              | bookpart_body full_markup_list
   96              | bookpart_body SCM_TOKEN
   97              | bookpart_body embedded_scm_active

   99 bookpart_body: bookpart_body  lilypond_header
  100              | bookpart_body error

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

  102 score_body: music
  103           | embedded_scm_active

  105 score_body: score_body  lilypond_header
  106           | score_body output_def
  107           | score_body error

  108 paper_block: output_def

  109 output_def: output_def_body '}'

  110 output_def_head: "\paper"
  111                | "\midi"
  112                | "\layout"

  113 output_def_head_with_mode_switch: output_def_head

  114 music_or_context_def: music_arg

  116 music_or_context_def: "\context"  '{' context_def_spec_body '}'

  117 output_def_body: output_def_head_with_mode_switch '{'
  118                | output_def_head_with_mode_switch 
                         '{' 
                         OUTPUT_DEF_IDENTIFIER 
  119                | output_def_body assignment
  120                | output_def_body embedded_scm

  122 output_def_body: output_def_body  music_or_context_def
  123                | output_def_body error

  124 tempo_event: "\tempo" steno_duration '=' tempo_range
  125            | "\tempo" scalar_closed steno_duration '=' tempo_range
  126            | "\tempo" scalar

  127 music_list: /* empty */
  128           | music_list music_embedded
  129           | music_list error

  130 braced_music_list: '{' music_list '}'

  131 music: music_arg
  132      | lyric_element_music

  133 music_embedded: music
  134               | music_embedded_backup
  135               | music_embedded_backup 
                        "(backed-up?)" 
                        lyric_element_music 

  136 music_embedded_backup: embedded_scm

  137 music_arg: simple_music
  138          | composite_music

  139 music_assign: simple_music
  140             | composite_music

  141 repeated_music: "\repeat" simple_string unsigned_number music
  142               | "\repeat" 
                        simple_string 
                        unsigned_number 
                        music 
                        "\alternative" 
                        braced_music_list 

  143 sequential_music: "\sequential" braced_music_list
  144                 | braced_music_list

  145 simultaneous_music: "\simultaneous" braced_music_list
  146                   | "<<" music_list ">>"

  147 simple_music: event_chord
  148             | music_property_def
  149             | context_change

  151 context_modification: "\with"  '{' context_mod_list '}'
  152                     | "\with" CONTEXT_MOD_IDENTIFIER
  153                     | CONTEXT_MOD_IDENTIFIER
  154                     | "\with" embedded_scm_closed

  155 optional_context_mod: /* empty */
  156                     | context_modification

  157 context_mod_list: /* empty */
  158                 | context_mod_list context_mod
  159                 | context_mod_list CONTEXT_MOD_IDENTIFIER
  160                 | context_mod_list context_mod_embedded

  161 composite_music: complex_music
  162                | music_bare

  163 closed_music: music_bare
  164             | complex_music_prefix closed_music
  165             | music_function_call_closed

  166 music_bare: mode_changed_music
  167           | MUSIC_IDENTIFIER
  168           | grouped_music_list

  169 grouped_music_list: simultaneous_music
  170                   | sequential_music

  171 function_arglist_skip: function_arglist_common
  172                      | "optional?" "ly:pitch?" function_arglist_skip
  173                      | "optional?" "ly:duration?" function_arglist_skip
  174                      | "optional?" "scheme?" function_arglist_skip

  175 function_arglist_nonbackup_common: "optional?" 
                                           "ly:pitch?" 
                                           function_arglist 
                                           pitch_also_in_chords 
  176                                  | "optional?" 
                                           "ly:duration?" 
                                           function_arglist_closed 
                                           duration_length 
  177                                  | "optional?" 
                                           "scheme?" 
                                           function_arglist 
                                           FRACTION 
  178                                  | "optional?" 
                                           "scheme?" 
                                           function_arglist_closed 
                                           post_event_nofinger 
  179                                  | "optional?" 
                                           "scheme?" 
                                           function_arglist_closed 
                                           '-' 
                                           UNSIGNED 
  180                                  | "optional?" 
                                           "scheme?" 
                                           function_arglist_closed 
                                           '-' 
                                           REAL 
  181                                  | "optional?" 
                                           "scheme?" 
                                           function_arglist_closed 
                                           '-' 
                                           NUMBER_IDENTIFIER 

  182 function_arglist_closed_nonbackup: function_arglist_nonbackup_common
  183                                  | "optional?" 
                                           "scheme?" 
                                           function_arglist 
                                           embedded_scm_arg_closed 
  184                                  | "optional?" 
                                           "scheme?" 
                                           function_arglist_closed 
                                           bare_number_closed 
  185                                  | "optional?" 
                                           "scheme?" 
                                           function_arglist 
                                           SCM_IDENTIFIER 
  186                                  | "optional?" 
                                           "scheme?" 
                                           function_arglist 
                                           STRING 
  187                                  | "optional?" 
                                           "scheme?" 
                                           function_arglist 
                                           full_markup 

  188 symbol_list_arg: SYMBOL_LIST
  189                | SYMBOL_LIST '.' symbol_list_rev

  190 symbol_list_rev: symbol_list_part
  191                | symbol_list_rev '.' symbol_list_part

  192 symbol_list_part: symbol_list_element

  193 symbol_list_element: STRING
  194                    | embedded_scm_bare

  195 function_arglist_nonbackup: function_arglist_nonbackup_common
  196                           | "optional?" 
                                    "scheme?" 
                                    function_arglist 
                                    embedded_scm_arg 
  197                           | "optional?" 
                                    "scheme?" 
                                    function_arglist_closed 
                                    bare_number 
  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 
                                            SCM_IDENTIFIER 
  202                                   | "optional?" 
                                            "scheme?" 
                                            function_arglist 
                                            STRING 
  203                                   | "optional?" 
                                            "scheme?" 
                                            function_arglist 
                                            full_markup 

  204 function_arglist_keep: function_arglist_common
  205                      | function_arglist_backup

  206 function_arglist_closed_keep: function_arglist_closed_common
  207                             | function_arglist_backup

  208 function_arglist_backup: "optional?" 
                                 "scheme?" 
                                 function_arglist_keep 
                                 embedded_scm_arg_closed 
  209                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_closed_keep 
                                 post_event_nofinger 
  210                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_keep 
                                 full_markup 
  211                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_closed_keep 
                                 UNSIGNED 
  212                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_closed_keep 
                                 REAL 
  213                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_closed_keep 
                                 NUMBER_IDENTIFIER 
  214                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_keep 
                                 FRACTION 
  215                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_closed_keep 
                                 '-' 
                                 UNSIGNED 
  216                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_closed_keep 
                                 '-' 
                                 REAL 
  217                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_closed_keep 
                                 '-' 
                                 NUMBER_IDENTIFIER 
  218                        | "optional?" 
                                 "ly:pitch?" 
                                 function_arglist_keep 
                                 pitch_also_in_chords 
  219                        | "optional?" 
                                 "ly:duration?" 
                                 function_arglist_closed_keep 
                                 duration_length 
  220                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_keep 
                                 SCM_IDENTIFIER 
  221                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_keep 
                                 STRING 
  222                        | "optional?" 
                                 "scheme?" 
                                 function_arglist_backup 
                                 "(backed-up?)" 
  223                        | function_arglist_backup 
                                 "(reparsed?)" 
                                 bare_number 
  224                        | function_arglist_backup 
                                 "(reparsed?)" 
                                 symbol_list_arg 

  225 function_arglist: function_arglist_common
  226                 | function_arglist_nonbackup

  227 function_arglist_common: function_arglist_bare
  228                        | "scheme?" 
                                 function_arglist_optional 
                                 embedded_scm_arg 
  229                        | "scheme?" 
                                 function_arglist_closed_optional 
                                 bare_number 
  230                        | "scheme?" function_arglist_optional FRACTION
  231                        | "scheme?" 
                                 function_arglist_closed_optional 
                                 post_event_nofinger 
  232                        | "scheme?" 
                                 function_arglist_closed_optional 
                                 '-' 
                                 NUMBER_IDENTIFIER 
  233                        | function_arglist_common_reparse 
                                 "(reparsed?)" 
                                 SCM_ARG 
  234                        | function_arglist_common_reparse 
                                 "(reparsed?)" 
                                 lyric_element_music 
  235                        | function_arglist_common_reparse 
                                 "(reparsed?)" 
                                 bare_number 
  236                        | function_arglist_common_reparse 
                                 "(reparsed?)" 
                                 symbol_list_arg 

  237 function_arglist_common_reparse: "scheme?" 
                                         function_arglist_optional 
                                         SCM_IDENTIFIER 
  238                                | "scheme?" 
                                         function_arglist_optional 
                                         STRING 
  239                                | "scheme?" 
                                         function_arglist_optional 
                                         full_markup 
  240                                | "scheme?" 
                                         function_arglist_closed_optional 
                                         '-' 
                                         UNSIGNED 
  241                                | "scheme?" 
                                         function_arglist_closed_optional 
                                         '-' 
                                         REAL 

  242 function_arglist_closed: function_arglist_closed_common
  243                        | function_arglist_closed_nonbackup

  244 function_arglist_closed_common: function_arglist_bare
  245                               | "scheme?" 
                                        function_arglist_optional 
                                        embedded_scm_arg_closed 
  246                               | "scheme?" 
                                        function_arglist_closed_optional 
                                        bare_number 
  247                               | "scheme?" 
                                        function_arglist_closed_optional 
                                        '-' 
                                        NUMBER_IDENTIFIER 
  248                               | "scheme?" 
                                        function_arglist_closed_optional 
                                        post_event_nofinger 
  249                               | "scheme?" 
                                        function_arglist_optional 
                                        FRACTION 
  250                               | function_arglist_common_reparse 
                                        "(reparsed?)" 
                                        SCM_ARG 
  251                               | function_arglist_common_reparse 
                                        "(reparsed?)" 
                                        bare_number 
  252                               | function_arglist_common_reparse 
                                        "(reparsed?)" 
                                        symbol_list_arg 

  253 function_arglist_optional: function_arglist_keep
  254                          | function_arglist_backup "(backed-up?)"
  255                          | "optional?" 
                                   "ly:pitch?" 
                                   function_arglist_optional 
  256                          | "optional?" 
                                   "ly:duration?" 
                                   function_arglist_optional 

  257 function_arglist_closed_optional: function_arglist_closed_keep
  258                                 | function_arglist_backup 
                                          "(backed-up?)" 
  259                                 | "optional?" 
                                          "ly:pitch?" 
                                          function_arglist_closed_optional 
  260                                 | "optional?" 
                                          "ly:duration?" 
                                          function_arglist_closed_optional 

  261 embedded_scm_closed: embedded_scm_bare
  262                    | scm_function_call_closed

  263 embedded_scm_arg_closed: embedded_scm_bare_arg
  264                        | scm_function_call_closed
  265                        | closed_music

  266 scm_function_call_closed: SCM_FUNCTION function_arglist_closed

  267 function_arglist_bare: EXPECT_NO_MORE_ARGS
  268                      | "ly:pitch?" 
                               function_arglist_optional 
                               pitch_also_in_chords 
  269                      | "ly:duration?" 
                               function_arglist_closed_optional 
                               duration_length 
  270                      | "optional?" 
                               "ly:pitch?" 
                               function_arglist_skip 
                               "\default" 
  271                      | "optional?" 
                               "ly:duration?" 
                               function_arglist_skip 
                               "\default" 
  272                      | "optional?" 
                               "scheme?" 
                               function_arglist_skip 
                               "\default" 

  273 music_function_call: MUSIC_FUNCTION function_arglist

  274 optional_id: /* empty */
  275            | '=' simple_string

  276 complex_music: music_function_call
  277              | repeated_music
  278              | re_rhythmed_music
  279              | complex_music_prefix music

  280 complex_music_prefix: "\context" 
                              symbol 
                              optional_id 
                              optional_context_mod 
  281                     | "\new" symbol optional_id optional_context_mod

  282 mode_changed_music: mode_changing_head grouped_music_list
  283                   | mode_changing_head_with_context 
                            optional_context_mod 
                            grouped_music_list 

  284 mode_changing_head: "\notemode"
  285                   | "\drummode"
  286                   | "\figuremode"
  287                   | "\chordmode"
  288                   | "\lyricmode"

  289 mode_changing_head_with_context: "\drums"
  290                                | "\figures"
  291                                | "\chords"
  292                                | "\lyrics"

  294 new_lyrics: "\addlyrics" 0 composite_music

  296 new_lyrics: new_lyrics "\addlyrics" 1 composite_music

  297 re_rhythmed_music: composite_music new_lyrics

  299 re_rhythmed_music: "\lyricsto" simple_string 2 music

  300 context_change: "\change" STRING '=' STRING

  301 property_path: symbol_list_rev
  302              | symbol_list_rev property_path

  303 property_operation: symbol '=' scalar
  304                   | "\unset" symbol
  305                   | "\override" property_path '=' scalar
  306                   | "\revert" revert_arg

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

  308 revert_arg_backup: revert_arg_part

  309 revert_arg_part: symbol_list_part
  310                | revert_arg_backup 
                         "(backed-up?)" 
                         SCM_ARG 
                         '.' 
                         symbol_list_part 
  311                | revert_arg_backup 
                         "(backed-up?)" 
                         SCM_ARG 
                         symbol_list_part 

  312 context_def_mod: "\consists"
  313                | "\remove"
  314                | "\accepts"
  315                | "\defaultchild"
  316                | "\denies"
  317                | "\alias"
  318                | "\type"
  319                | "\description"
  320                | "\name"

  321 context_mod: property_operation
  322            | context_def_mod STRING
  323            | context_def_mod embedded_scm

  324 grob_prop_spec: symbol_list_rev

  325 grob_prop_path: grob_prop_spec
  326               | grob_prop_spec property_path

  327 context_prop_spec: symbol_list_rev

  328 simple_music_property_def: "\override" grob_prop_path '=' scalar
  329                          | "\revert" simple_revert_context revert_arg
  330                          | "\set" context_prop_spec '=' scalar
  331                          | "\unset" context_prop_spec

  332 simple_revert_context: symbol_list_part

  333 music_property_def: simple_music_property_def

  334 string: STRING
  335       | full_markup

  336 simple_string: STRING
  337              | embedded_scm_bare

  338 symbol: STRING
  339       | embedded_scm_bare

  340 scalar: embedded_scm_arg
  341       | SCM_IDENTIFIER
  342       | bare_number
  343       | '-' bare_number
  344       | FRACTION
  345       | STRING
  346       | full_markup

  347 scalar_closed: embedded_scm_arg_closed
  348              | SCM_IDENTIFIER
  349              | bare_number
  350              | '-' bare_number
  351              | FRACTION
  352              | STRING
  353              | full_markup

  354 event_chord: simple_element post_events
  355            | simple_chord_elements post_events
  356            | CHORD_REPETITION optional_notemode_duration post_events
  357            | MULTI_MEASURE_REST optional_notemode_duration post_events
  358            | command_element
  359            | note_chord_element

  360 note_chord_element: chord_body optional_notemode_duration post_events

  361 chord_body: "<" chord_body_elements ">"

  362 chord_body_elements: /* empty */
  363                    | chord_body_elements chord_body_element

  364 chord_body_element: pitch 
                            exclamations 
                            questions 
                            octave_check 
                            post_events 
  365                   | DRUM_PITCH post_events
  366                   | music_function_chord_body

  367 music_function_chord_body: music_function_call
  368                          | MUSIC_IDENTIFIER

  369 music_function_call_closed: MUSIC_FUNCTION function_arglist_closed

  370 event_function_event: EVENT_FUNCTION function_arglist_closed

  371 command_element: command_event

  372 command_event: tempo_event

  373 post_events: /* empty */
  374            | post_events post_event

  375 post_event_nofinger: direction_less_event
  376                    | script_dir music_function_call_closed
  377                    | "--"
  378                    | "__"
  379                    | script_dir direction_reqd_event
  380                    | script_dir direction_less_event
  381                    | '^' fingering
  382                    | '_' fingering

  383 post_event: post_event_nofinger
  384           | '-' fingering

  385 string_number_event: E_UNSIGNED

  386 direction_less_event: string_number_event
  387                     | EVENT_IDENTIFIER
  388                     | tremolo_type
  389                     | event_function_event

  390 direction_reqd_event: gen_text_def
  391                     | script_abbreviation

  392 octave_check: /* empty */
  393             | '=' quotes

  394 quotes: /* empty */
  395       | sub_quotes
  396       | sup_quotes

  397 sup_quotes: '''
  398           | sup_quotes '''

  399 sub_quotes: ','
  400           | sub_quotes ','

  401 steno_pitch: NOTENAME_PITCH quotes

  402 steno_tonic_pitch: TONICNAME_PITCH quotes

  403 pitch: steno_pitch
  404      | PITCH_IDENTIFIER

  405 pitch_also_in_chords: pitch
  406                     | steno_tonic_pitch

  407 gen_text_def: full_markup
  408             | STRING
  409             | embedded_scm_closed

  410 fingering: UNSIGNED

  411 script_abbreviation: '^'
  412                    | '+'
  413                    | '-'
  414                    | '!'
  415                    | ">"
  416                    | '.'
  417                    | '_'

  418 script_dir: '_'
  419           | '^'
  420           | '-'

  421 duration_length: multiplied_duration

  422 maybe_notemode_duration: /* empty */
  423                        | multiplied_duration

  424 optional_notemode_duration: maybe_notemode_duration

  425 steno_duration: UNSIGNED dots
  426               | DURATION_IDENTIFIER dots

  427 multiplied_duration: steno_duration
  428                    | multiplied_duration '*' UNSIGNED
  429                    | multiplied_duration '*' FRACTION

  430 dots: /* empty */
  431     | dots '.'

  432 tremolo_type: ':'
  433             | ':' UNSIGNED

  434 bass_number: UNSIGNED
  435            | STRING
  436            | full_markup
  437            | embedded_scm_bare

  438 figured_bass_alteration: '-'
  439                        | '+'
  440                        | '!'

  441 bass_figure: "_"
  442            | bass_number
  443            | bass_figure ']'
  444            | bass_figure figured_bass_alteration
  445            | bass_figure figured_bass_modification

  446 figured_bass_modification: "\+"
  447                          | "\!"
  448                          | '/'
  449                          | "\"

  450 br_bass_figure: bass_figure
  451               | '[' bass_figure

  452 figure_list: /* empty */
  453            | figure_list br_bass_figure

  454 figure_spec: FIGURE_OPEN figure_list FIGURE_CLOSE

  455 optional_rest: /* empty */
  456              | "\rest"

  457 simple_element: pitch 
                        exclamations 
                        questions 
                        octave_check 
                        maybe_notemode_duration 
                        optional_rest 
  458               | DRUM_PITCH optional_notemode_duration
  459               | RESTNAME optional_notemode_duration

  460 simple_chord_elements: new_chord
  461                      | figure_spec optional_notemode_duration

  462 lyric_element: full_markup
  463              | STRING
  464              | LYRIC_ELEMENT

  465 lyric_element_music: lyric_element 
                             optional_notemode_duration 
                             post_events 

  466 new_chord: steno_tonic_pitch optional_notemode_duration
  467          | steno_tonic_pitch 
                   optional_notemode_duration 
                   chord_separator 
                   chord_items 

  468 chord_items: /* empty */
  469            | chord_items chord_item

  470 chord_separator: ":"
  471                | "^"
  472                | "/" steno_tonic_pitch
  473                | "/+" steno_tonic_pitch

  474 chord_item: chord_separator
  475           | step_numbers
  476           | CHORD_MODIFIER

  477 step_numbers: step_number
  478             | step_numbers '.' step_number

  479 step_number: UNSIGNED
  480            | UNSIGNED '+'
  481            | UNSIGNED "-"

  482 tempo_range: UNSIGNED
  483            | UNSIGNED '-' UNSIGNED

  484 number_expression: number_expression '+' number_term
  485                  | number_expression '-' number_term
  486                  | number_term

  487 number_term: number_factor
  488            | number_factor '*' number_factor
  489            | number_factor '/' number_factor

  490 number_factor: '-' number_factor
  491              | bare_number

  492 bare_number: bare_number_closed
  493            | UNSIGNED NUMBER_IDENTIFIER
  494            | REAL NUMBER_IDENTIFIER

  495 bare_number_closed: UNSIGNED
  496                   | REAL
  497                   | NUMBER_IDENTIFIER

  498 unsigned_number: UNSIGNED
  499                | NUMBER_IDENTIFIER

  500 exclamations: /* empty */
  501             | exclamations '!'

  502 questions: /* empty */
  503          | questions '?'

  505 full_markup_list: "\markuplist" 3 markup_list

  507 full_markup: "\markup" 4 markup_top

  508 markup_top: simple_markup_list
  509           | markup_head_1_list simple_markup
  510           | simple_markup

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

  513 simple_markup_list: markup_composed_list
  514                   | markup_uncomposed_list

  515 markup_uncomposed_list: markup_braced_list
  516                       | markup_command_list
  517                       | markup_scm MARKUPLIST_IDENTIFIER

  518 markup_list: simple_markup_list
  519            | markup_score

  521 markup_score: "\score" 6 '{' score_body '}'

  522 markup_composed_list: markup_head_1_list markup_uncomposed_list

  523 markup_braced_list: '{' markup_braced_list_body '}'

  524 markup_braced_list_body: /* empty */
  525                        | markup_braced_list_body markup
  526                        | markup_braced_list_body simple_markup_list

  527 markup_command_list: MARKUP_LIST_FUNCTION markup_command_list_arguments

  528 markup_command_basic_arguments: "markup-list?" 
                                        markup_command_list_arguments 
                                        markup_list 
  529                               | "scheme?" 
                                        markup_command_list_arguments 
                                        embedded_scm_closed 
  530                               | EXPECT_NO_MORE_ARGS

  531 markup_command_list_arguments: markup_command_basic_arguments
  532                              | "markup?" 
                                       markup_command_list_arguments 
                                       markup 

  533 markup_head_1_item: MARKUP_FUNCTION 
                            "markup?" 
                            markup_command_list_arguments 

  534 markup_head_1_list: markup_head_1_item
  535                   | markup_head_1_list markup_head_1_item

  536 simple_markup: STRING
  537              | MARKUP_FUNCTION markup_command_basic_arguments
  538              | markup_scm MARKUP_IDENTIFIER
  539              | markup_score

  540 markup: markup_head_1_list simple_markup
  541       | simple_markup


Terminals, with rules where they appear



    186 187 196 197 201 202 203 208 209 210 211 212 213 214 215 216
    201 202 203 208 209 210 211 212 213 214 215 216 217 220 221 222
    217 218 219 220 221 222 255 256 259 260 270 271 272
    228 229 230 231 232 237 238 239 240 241 245 246 247 248 249 272
    435 463 536
    438 483 485 490
    483 493 495 498
    529
"#{" (343) 3
"(backed-up?)" (338) 135 222 254 258 307 310 311 512
"(reparsed?)" (339) 198 199 200 223 224 233 234 235 236 250 251 252
"-" (317) 481
"--" (330) 377
"/" (318) 472
"/+" (314) 473
":" (316) 470
"<" (319) 361
"<<" (321) 146
">" (320) 361 415
">>" (322) 146
"\!" (324) 447
"\" (323) 449
"\+" (325) 446
"\accepts" (273) 314
"\addlyrics" (262) 294 296
"\alias" (274) 317
"\alternative" (260) 142
"\book" (275) 74
"\bookpart" (276) 88
"\change" (277) 300
"\chordmode" (278) 287
"\chords" (279) 291
"\consists" (280) 312
"\context" (281) 64 116 280
"\default" (263) 270 271 272
"\defaultchild" (282) 315
"\denies" (283) 316
"\description" (284) 319
"\drummode" (285) 285
"\drums" (286) 289
"\figuremode" (287) 286
"\figures" (288) 290
"\header" (289) 47
"\layout" (291) 112
"\lyricmode" (292) 288
"\lyrics" (293) 292
"\lyricsto" (294) 299
"\markup" (295) 507
"\markuplist" (296) 505
"\midi" (297) 111
"\name" (298) 320
"\new" (313) 281
"\notemode" (299) 284
"\override" (300) 305 328
"\paper" (301) 110
"\remove" (302) 313
"\repeat" (259) 141 142
"\rest" (303) 456
"\revert" (304) 306 329
"\score" (305) 101 521
"\sequential" (306) 143
"\set" (307) 330
"\simultaneous" (308) 145
"\tempo" (309) 124 125 126
"\type" (310) 318
"\unset" (311) 304 331
"\version-error" (290) 8 43
"\with" (312) 151 152 154
"^" (315) 471
"_" (329) 441
"__" (326) 378
"end of input" (0) 0
"ly:duration?" (336) 173 176 219 256 260 269 271
"ly:pitch?" (335) 172 175 218 255 259 268 270
"markup-list?" (340) 528
"markup?" (334) 532 533
"optional?" (341) 172 173 174 175 176 177 178 179 180 181 183 184 185
"scheme?" (337) 174 177 178 179 180 181 183 184 185 186 187 196 197
'!' (33) 414 440 501
''' (39) 397 398
'*' (42) 428 429 488
'+' (43) 412 439 480 484
',' (44) 399 400
'-' (45) 179 180 181 215 216 217 232 240 241 247 343 350 384 413 420
'.' (46) 189 191 310 416 431 478
'/' (47) 448 489
':' (58) 432 433
'=' (61) 49 50 124 125 275 300 303 305 328 330 393
'?' (63) 503
'[' (91) 451
']' (93) 443
'^' (94) 381 411 419
'_' (95) 382 417 418
'{' (123) 47 64 74 88 101 116 117 118 130 151 521 523
'}' (125) 47 64 74 88 101 109 116 130 151 521 523
BOOK_IDENTIFIER (344) 76 90
CHORD_MODIFIER (346) 476
CHORD_REPETITION (347) 356
CHORDMODIFIER_PITCH (345)
CHORDMODIFIERS (331)
COMPOSITE (261)
CONTEXT_DEF_IDENTIFIER (348) 70
CONTEXT_MOD_IDENTIFIER (349) 152 153 159
DRUM_PITCH (350) 365 458
DURATION_IDENTIFIER (265) 426
E_UNSIGNED (333) 385
error (256) 7 42 87 100 107 123 129
EVENT_FUNCTION (352) 370
EVENT_IDENTIFIER (351) 387
EXPECT_NO_MORE_ARGS (342) 267 530
FIGURE_CLOSE (327) 454
FIGURE_OPEN (328) 454
FRACTION (353) 59 177 214 230 249 344 351 429
FUNCTION_ARGLIST (264)
LYRIC_ELEMENT (354) 464
MARKUP_FUNCTION (355) 533 537
MARKUP_IDENTIFIER (357) 538
MARKUP_LIST_FUNCTION (356) 527
MARKUPLIST_IDENTIFIER (358) 517
MULTI_MEASURE_REST (332) 357
MUSIC_FUNCTION (359) 273 369
MUSIC_IDENTIFIER (360) 167 368
NOTENAME_PITCH (269) 401
NUMBER_IDENTIFIER (271) 181 213 217 232 247 493 494 497 499
OUTPUT_DEF_IDENTIFIER (361) 118
PITCH_IDENTIFIER (270) 404
PREC_BOT (258)
PREC_TOP (272)
REAL (266) 180 212 216 241 494 496
RESTNAME (362) 459
SCM_ARG (363) 24 198 233 250 310 311
SCM_FUNCTION (364) 38 266
SCM_IDENTIFIER (365) 21 22 185 201 220 237 341 348
SCM_TOKEN (366) 17 20 25 83 96
STRING (367) 48 186 193 202 221 238 300 322 334 336 338 345 352 408
SYMBOL_LIST (368) 188 189
TONICNAME_PITCH (268) 402
UNARY_MINUS (369)
UNSIGNED (267) 179 211 215 240 410 425 428 433 434 479 480 481 482

Nonterminals, with rules where they appear


assignment (148)
    on left: 49 50, on right: 6 45 119
assignment_id (147)
    on left: 48, on right: 49 50
bare_number_closed (304)
    on left: 495 496 497, on right: 184 492
bass_number (281)
    on left: 434 435 436 437, on right: 442
book_block (155)
    on left: 74, on right: 11 30 52
bookpart_block (158)
    on left: 88, on right: 12 31 53 78
br_bass_figure (285)
    on left: 450 451, on right: 453
braced_music_list (174)
    on left: 130, on right: 142 143 144 145
chord_body (248)
    on left: 361, on right: 360
chord_body_element (250)
    on left: 364 365 366, on right: 363
chord_body_elements (249)
    on left: 362 363, on right: 361 363
chord_item (296)
    on left: 474 475 476, on right: 469
chord_items (294)
    on left: 468 469, on right: 467 469
chord_separator (295)
    on left: 470 471 472 473, on right: 467 474
closed_music (189)
    on left: 163 164 165, on right: 164 265
command_element (254)
    on left: 371, on right: 358
command_event (255)
    on left: 372, on right: 371
complex_music (217)
    on left: 276 277 278 279, on right: 161
complex_music_prefix (218)
    on left: 280 281, on right: 164 279
context_change (227)
    on left: 300, on right: 149
context_def_spec_block (150)
    on left: 64, on right: 29 55
context_mod (234)
    on left: 321 322 323, on right: 71 158
context_mod_arg (151)
    on left: 65 67, on right: 68
context_mod_embedded (153)
    on left: 68, on right: 73 160
context_prop_spec (237)
    on left: 327, on right: 330 331
direction_less_event (260)
    on left: 386 387 388 389, on right: 375 380
direction_reqd_event (261)
    on left: 390 391, on right: 379
dots (279)
    on left: 430 431, on right: 425 426 431
duration_length (274)
    on left: 421, on right: 176 219 269
embedded_lilypond (144)
    on left: 39 40 41 42 43, on right: 3 43
embedded_scm (141)
    on left: 33 34, on right: 46 61 65 120 136 323
embedded_scm_active (139)
    on left: 22 23, on right: 18 84 97 103
embedded_scm_arg (142)
    on left: 35 36 37, on right: 196 228 340
embedded_scm_closed (211)
    on left: 261 262, on right: 154 409 529
event_chord (246)
    on left: 354 355 356 357 358 359, on right: 147
event_function_event (253)
    on left: 370, on right: 389
exclamations (306)
    on left: 500 501, on right: 364 457 501
figure_list (286)
    on left: 452 453, on right: 453 454
figure_spec (287)
    on left: 454, on right: 461
figured_bass_alteration (282)
    on left: 438 439 440, on right: 444
figured_bass_modification (284)
    on left: 446 447 448 449, on right: 445
fingering (271)
    on left: 410, on right: 381 382 384
full_markup_list (308)
    on left: 505, on right: 16 26 62 82 95
gen_text_def (270)
    on left: 407 408 409, on right: 390
grob_prop_path (236)
    on left: 325 326, on right: 328
grob_prop_spec (235)
    on left: 324, on right: 325 326
grouped_music_list (191)
    on left: 169 170, on right: 168 282 283
lilypond (135)
    on left: 4 5 6 7 8, on right: 1 5 6 7 8
lilypond_header (146)
    on left: 47, on right: 10 86 99 105
lilypond_header_body (145)
    on left: 44 45 46, on right: 45 46 47
lyric_element (291)
    on left: 462 463 464, on right: 465
lyric_element_music (292)
    on left: 465, on right: 132 135 199 234
markup (329)
    on left: 540 541, on right: 525 532
markup_braced_list (321)
    on left: 523, on right: 515
markup_braced_list_body (322)
    on left: 524 525 526, on right: 523 525 526
markup_command_list (323)
    on left: 527, on right: 516
markup_composed_list (320)
    on left: 522, on right: 513
markup_head_1_item (326)
    on left: 533, on right: 534 535
markup_head_1_list (327)
    on left: 534 535, on right: 509 522 535 540
markup_list (317)
    on left: 518 519, on right: 505 528
markup_scm (313)
    on left: 512, on right: 517 538
markup_score (318)
    on left: 521, on right: 519 539
markup_top (312)
    on left: 508 509 510, on right: 507
markup_uncomposed_list (316)
    on left: 515 516 517, on right: 514 522
maybe_notemode_duration (275)
    on left: 422 423, on right: 424 457
mode_changed_music (219)
    on left: 282 283, on right: 166
mode_changing_head (220)
    on left: 284 285 286 287 288, on right: 282
multiplied_duration (278)
    on left: 427 428 429, on right: 421 423 428 429
music (175)
    on left: 131 132, on right: 102 133 141 142 279 299
music_arg (178)
    on left: 137 138, on right: 37 114 131
music_assign (179)
    on left: 139 140, on right: 56
music_bare (190)
    on left: 166 167 168, on right: 162 163
music_embedded (176)
    on left: 133 134 135, on right: 41 128
music_embedded_backup (177)
    on left: 136, on right: 134 135
music_function_call (215)
    on left: 273, on right: 276 367
music_function_call_closed (252)
    on left: 369, on right: 165 376
music_function_chord_body (251)
    on left: 367 368, on right: 366
music_list (173)
    on left: 127 128 129, on right: 41 128 129 130 146
music_or_context_def (168)
    on left: 114 116, on right: 122
music_property_def (240)
    on left: 333, on right: 148
new_chord (293)
    on left: 466 467, on right: 460
new_lyrics (222)
    on left: 294 296, on right: 296 297
note_chord_element (247)
    on left: 360, on right: 359
number_expression (300)
    on left: 484 485 486, on right: 58 484 485
number_factor (302)
    on left: 490 491, on right: 487 488 489 490
number_term (301)
    on left: 487 488 489, on right: 484 485 486
octave_check (262)
    on left: 392 393, on right: 364 457
optional_context_mod (186)
    on left: 155 156, on right: 280 281 283
optional_id (216)
    on left: 274 275, on right: 280 281
optional_rest (288)
    on left: 455 456, on right: 457
output_def (165)
    on left: 109, on right: 19 32 54 106 108
output_def_head (166)
    on left: 110 111 112, on right: 113
output_def_head_with_mode_switch (167)
    on left: 113, on right: 117 118
paper_block (164)
    on left: 108, on right: 77 91
pitch (268)
    on left: 403 404, on right: 364 405 457
pitch_also_in_chords (269)
    on left: 405 406, on right: 175 218 268
post_event (258)
    on left: 383 384, on right: 374
property_operation (229)
    on left: 303 304 305 306, on right: 321
property_path (228)
    on left: 301 302, on right: 50 302 305 326
questions (307)
    on left: 502 503, on right: 364 457 503
quotes (263)
    on left: 394 395 396, on right: 393 401 402
re_rhythmed_music (225)
    on left: 297 299, on right: 278
repeated_music (180)
    on left: 141 142, on right: 277
revert_arg (230)
    on left: 307, on right: 306 329
revert_arg_backup (231)
    on left: 308, on right: 307 310 311
revert_arg_part (232)
    on left: 309 310 311, on right: 308
scalar_closed (245)
    on left: 347 348 349 350 351 352 353, on right: 125
scm_function_call (143)
    on left: 38, on right: 23 34 36
scm_function_call_closed (213)
    on left: 266, on right: 262 264
score_block (161)
    on left: 101, on right: 13 28 51 79 92
script_dir (273)
    on left: 418 419 420, on right: 376 379 380
sequential_music (181)
    on left: 143 144, on right: 170
simple_chord_elements (290)
    on left: 460 461, on right: 355
simple_element (289)
    on left: 457 458 459, on right: 354
simple_markup (328)
    on left: 536 537 538 539, on right: 509 510 540 541
simple_markup_list (315)
    on left: 513 514, on right: 508 518 526
simple_music (183)
    on left: 147 148 149, on right: 137 139
simple_music_property_def (238)
    on left: 328 329 330 331, on right: 333
simple_revert_context (239)
    on left: 332, on right: 329
simple_string (242)
    on left: 336 337, on right: 141 142 275 299
simultaneous_music (182)
    on left: 145 146, on right: 169
start_symbol (133)
    on left: 1 3, on right: 0
steno_duration (277)
    on left: 425 426, on right: 124 125 427
steno_pitch (266)
    on left: 401, on right: 403
steno_tonic_pitch (267)
    on left: 402, on right: 406 466 467 472 473
step_number (298)
    on left: 479 480 481, on right: 477 478
step_numbers (297)
    on left: 477 478, on right: 475 478
string (241)
    on left: 334 335, on right: 60
string_number_event (259)
    on left: 385, on right: 386
sub_quotes (265)
    on left: 399 400, on right: 395 400
sup_quotes (264)
    on left: 397 398, on right: 396 398
symbol (243)
    on left: 338 339, on right: 280 281 303 304
symbol_list_arg (195)
    on left: 188 189, on right: 200 224 236 252 307
symbol_list_element (198)
    on left: 193 194, on right: 192
symbol_list_part (197)
    on left: 192, on right: 190 191 309 310 311 332
symbol_list_rev (196)
    on left: 190 191, on right: 189 191 301 302 324 327
tempo_event (172)
    on left: 124 125 126, on right: 372
tempo_range (299)
    on left: 482 483, on right: 124 125
tremolo_type (280)
    on left: 432 433, on right: 388
unsigned_number (305)
    on left: 498 499, on right: 141 142

LilyPond – Notationsreferenz v2.17.26 (Entwicklungszweig).