]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/parser.y
release: 0.1.1
[lilypond.git] / lily / parser.y
index 2607a2ed089d0257fd3308ed8785aada8832c8b1..d494a11a48d7b015fc5b1912668dba0c8f7ed496 100644 (file)
@@ -12,7 +12,7 @@
 #include <iostream.h>
 
 // mmm
-#define MUDELA_VERSION "0.0.61"
+#define MUDELA_VERSION "0.1.0"
 
 #include "script-def.hh"
 #include "symtable.hh"
@@ -170,6 +170,7 @@ yylex(YYSTYPE *s,  void * v_l)
 %token <id>    SCRIPT_IDENTIFIER
 %token <id>    STAFF_IDENTIFIER
 %token <id>    REAL_IDENTIFIER
+%token <id>    INPUT_TRANS_IDENTIFIER
 %token <id>    INT_IDENTIFIER
 %token <id>    SCORE_IDENTIFIER
 %token <id>    MIDI_IDENTIFIER
@@ -233,7 +234,7 @@ mudela:     /* empty */
 
 check_version:
        VERSION STRING ';'              {
-               if (*$2 != MUDELA_VERSION) {
+               if ( String( *$2 ) != MUDELA_VERSION) {
                        if (THIS->ignore_version_b_) {
                                THIS->here_input().error("Incorrect mudela version");
                        } else {
@@ -283,6 +284,7 @@ declarable_identifier:
 
 old_identifier:
        IDENTIFIER
+       |       INPUT_TRANS_IDENTIFIER
        |       MELODIC_REQUEST_IDENTIFIER 
        |       POST_REQUEST_IDENTIFIER
        |       SCRIPT_IDENTIFIER
@@ -332,6 +334,10 @@ declaration:
                $$ = new Request_id(*$1, $3, MELODIC_REQUEST_IDENTIFIER);
                delete $1;
        }
+       | declarable_identifier '=' input_translator_spec {
+               $$ = new Input_translator_id ( *$1, $3, INPUT_TRANS_IDENTIFIER);
+               delete $1;
+       }
        ;
 
 
@@ -342,7 +348,11 @@ input_translator_spec:
        ;
 
 input_translator_spec_body:
-       STRING STRING   { 
+       INPUT_TRANS_IDENTIFIER  {
+               $$ = $1->input_translator(true);
+               $$-> set_spot( THIS->here_input() );
+       }
+       | STRING STRING { 
                $$ = new Input_translator; 
                $$->base_str_ = *$1;
                $$->type_str_ =*$2;
@@ -431,7 +441,7 @@ paper_body:
        | paper_body STRING '=' dim ';'         { 
                $$->set_var(*$2, $4);
        }
-       | paper_body STRING '=' REAL ';' {
+       | paper_body STRING '=' real ';' {
                $$->set_var(*$2, $4);
        }
        | paper_body input_translator_spec      {
@@ -563,7 +573,7 @@ simple_element:
 
 command_elt:
 /* empty */    {
-               $$ = new Voice_element;
+               $$ = new Request_chord;
                $$-> set_spot( THIS->here_input());
        }
 /* cont: */
@@ -951,6 +961,7 @@ music_elt:
 
 lyrics_elt:
        text_def notemode_duration                      {
+       /* this sux! text-def should be feature of lyric-engraver. */
                if (!THIS->lexer_p_->lyric_state_b())
                        THIS->parser_error("Have to be in Lyric mode for lyrics");
                $$ = THIS->get_word_element($1, $2);