]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/parser.yy
Fix missing linebreaks in output
[lilypond.git] / lily / parser.yy
index d061ab7ece0b242911f8d3dfb53001fb037ecd56..02c99e2f42e8f4eb7cf3283a764369ccac3770d7 100644 (file)
@@ -187,7 +187,7 @@ void set_music_properties (Music *p, SCM a);
 %token FIGURES "\\figures"
 %token GROBDESCRIPTIONS "\\grobdescriptions"
 %token HEADER "\\header"
-%token INVALID "\\invalid"
+%token INVALID "\\version-error"
 %token KEY "\\key"
 %token LAYOUT "\\layout"
 %token LYRICMODE "\\lyricmode"
@@ -202,7 +202,6 @@ void set_music_properties (Music *p, SCM a);
 %token ONCE "\\once"
 %token OVERRIDE "\\override"
 %token PAPER "\\paper"
-%token PARTIAL "\\partial"
 %token RELATIVE "\\relative"
 %token REMOVE "\\remove"
 %token REPEAT "\\repeat"
@@ -212,7 +211,6 @@ void set_music_properties (Music *p, SCM a);
 %token SEQUENTIAL "\\sequential"
 %token SET "\\set"
 %token SIMULTANEOUS "\\simultaneous"
-%token SKIP "\\skip"
 %token TEMPO "\\tempo"
 %token TIMES "\\times"
 %token TYPE "\\type"
@@ -284,6 +282,7 @@ If we give names, Bison complains.
 %token <scm> CONTEXT_DEF_IDENTIFIER
 %token <scm> CONTEXT_MOD_IDENTIFIER
 %token <scm> DRUM_PITCH
+%token <scm> PITCH_IDENTIFIER
 %token <scm> DURATION_IDENTIFIER
 %token <scm> EVENT_IDENTIFIER
 %token <scm> FRACTION
@@ -1174,8 +1173,7 @@ function_arglist_nonmusic_last:
 generic_prefix_music_scm:
        MUSIC_FUNCTION function_arglist {
                $$ = run_music_function (PARSER, @$,
-                                        $1,
-                                        scm_reverse_x ($2, SCM_EOL));
+                                        $1, $2);
        }
        ;
 
@@ -1635,7 +1633,7 @@ music_function_chord_body_arglist:
 music_function_chord_body:
        MUSIC_FUNCTION music_function_chord_body_arglist {
                $$ = run_music_function (PARSER, @$,
-                                        $1, scm_reverse_x ($2, SCM_EOL));
+                                        $1, $2);
        }
        ;
 
@@ -1654,7 +1652,7 @@ music_function_event_arglist:
 music_function_event:
        MUSIC_FUNCTION music_function_event_arglist {
                $$ = run_music_function (PARSER, @$,
-                                        $1, scm_reverse_x ($2, SCM_EOL));
+                                        $1, $2);
        }
        ;
 
@@ -1662,9 +1660,6 @@ command_element:
        command_event {
                $$ = $1;
        }
-       | SKIP duration_length {
-               $$ = MAKE_SYNTAX ("skip-music", @$, $2);
-       }
        | E_BRACKET_OPEN {
                Music *m = MY_MAKE_MUSIC ("LigatureEvent", @$);
                m->set_property ("span-direction", scm_from_int (START));
@@ -1692,10 +1687,6 @@ command_element:
                        $$ = MAKE_SYNTAX ("bar-check", @$, SCM_UNDEFINED);
 
        }
-       | PARTIAL duration_length       {
-               $$ = MAKE_SYNTAX ("partial", @$, $2);
-       }
-
        | TIME_T fraction  {
                SCM proc = ly_lily_module_constant ("make-time-signature-set");
 
@@ -1946,6 +1937,7 @@ pitch:
        steno_pitch {
                $$ = $1;
        }
+       | PITCH_IDENTIFIER
        ;
 
 pitch_also_in_chords:
@@ -2007,7 +1999,7 @@ script_dir:
 
 
 absolute_pitch:
-       steno_pitch     {
+       pitch   {
                $$ = $1;
        }
        ;
@@ -2681,6 +2673,9 @@ Lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
 
                mus->unprotect ();
                return is_event ? EVENT_IDENTIFIER : MUSIC_IDENTIFIER;
+       } else if (unsmob_pitch (sid)) {
+               *destination = unsmob_pitch (sid)->smobbed_copy ();
+               return PITCH_IDENTIFIER;
        } else if (unsmob_duration (sid)) {
                *destination = unsmob_duration (sid)->smobbed_copy ();
                return DURATION_IDENTIFIER;
@@ -2728,14 +2723,16 @@ run_music_function (Lily_parser *parser, Input loc, SCM func, SCM args)
 
        SCM type_check_proc = ly_lily_module_constant ("type-check-list");
 
+       args = scm_reverse_x (args, SCM_EOL);
+
        if (!to_boolean (scm_call_3  (type_check_proc, make_input (loc), scm_cdr (sig), args)))
        {
                parser->error_level_ = 1;
                return LOWLEVEL_MAKE_SYNTAX (ly_lily_module_constant ("void-music"), scm_list_2 (parser->self_scm (), make_input (loc)));
        }
 
-       SCM syntax_args = scm_list_4 (parser->self_scm (), make_input (loc), func, args);
-       return LOWLEVEL_MAKE_SYNTAX (scm_car (sig), syntax_args);
+       SCM syntax_args = scm_list_5 (parser->self_scm (), make_input (loc), scm_car (sig), func, args);
+       return LOWLEVEL_MAKE_SYNTAX (ly_lily_module_constant ("music-function"), syntax_args);
 }
 
 bool