]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.7
authorfred <fred>
Sun, 24 Mar 2002 19:51:18 +0000 (19:51 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:51:18 +0000 (19:51 +0000)
lily/lexer.l
lily/my-lily-lexer.cc

index 51ea87a08dd3a5fcde94cd98740d7524f5fd02f6..0634e76c4a6dea644f29029efe4f237e0450f206 100644 (file)
@@ -70,7 +70,7 @@ TEX           {AA}|-|{PUNCT}|{ACCENT}|{NATIONAL}
 WORD           {A}{AN}*
 ALPHAWORD      {A}+
 INT            -?{N}+
-REAL           {INT}?\.{N}*
+REAL           ({INT}\.{N}*)|(-?\.{N}+)
 KEYWORD                \\{WORD}
 WHITE          [ \n\t\f]
 BLACK          [^ \n\t\f]
@@ -179,9 +179,6 @@ LYRICS              ({AA}|{NATIONAL})[^0-9 \t\n\f]*
                return INT;
        }
 
-       \+\+            {
-               return CONCAT;
-       }
        \" {
                start_quote();
        }
@@ -223,7 +220,7 @@ LYRICS              ({AA}|{NATIONAL})[^0-9 \t\n\f]*
                /* ugr. This sux. */
                String s (YYText()); 
                int i = 0;
-               while ((i=s.index_i("_")) != -1) // change word binding "_" to " "
+                       while ((i=s.index_i("_")) != -1) // change word binding "_" to " "
                        *(s.ch_l() + i) = ' ';
                if ((i=s.index_i("\\,")) != -1)   // change "\," to TeX's "\c "
                        {
@@ -335,6 +332,14 @@ My_lily_lexer::scan_escaped_word(String str)
                yylval.id = id;
                return id->token_code_i_;
        }
+       if ( YYSTATE != notes ) {
+               Melodic_req * mel_l = lookup_melodic_req_l(str);
+               if (mel_l) {
+                   mtor << "(notename)\n";
+                   yylval.melreq = mel_l;
+                   return NOTENAME_ID;
+               }
+       }
        LexerError( "Unknown escaped string: `" + str + "'");   
        mtor << "(string)";
        String *sp = new String( str);
@@ -354,17 +359,6 @@ My_lily_lexer::scan_bare_word(String str)
                    return NOTENAME_ID;
                }
        }
-#if 0
-       if (YYSTATE != notes) {
-               // ugr. Should do this in note mode?
-       //              Identifier * id = lookup_identifier(str);
-               if (id) {
-                       mtor << "(identifier)\n";
-                       yylval.id = id;
-                       return id->token_code_i_;
-               }
-       }
-#endif
 
        yylval.string=new String( str );
        return STRING;
index a67aac8a7608b9b5d42ab64afb2de3071eefba59..18155a56e7584574c8faf79fdaec026d8999d632 100644 (file)
@@ -33,11 +33,9 @@ static Keyword_ent the_key_tab[]={
     {"duration", DURATIONCOMMAND},
     {"absdynamic", ABSDYNAMIC},
     {"group", GROUP},
-    {"geometric", GEOMETRIC},
     {"hshift", HSHIFT},
     {"id", ID},
     {"in", IN_T},
-    {"init_end", INIT_END},
     {"requesttranslator", REQUESTTRANSLATOR},
     {"lyric", LYRIC},
     {"key", KEY},
@@ -47,7 +45,6 @@ static Keyword_ent the_key_tab[]={
     {"midi", MIDI},
     {"mm", MM_T},
     {"multi", MULTI},
-    {"note", NOTE},
     {"notenames", NOTENAMES},
     {"octave", OCTAVECOMMAND},
     {"output", OUTPUT},
@@ -59,7 +56,6 @@ static Keyword_ent the_key_tab[]={
     {"script", SCRIPT},
     {"skip", SKIP},
     {"staff", STAFF},
-    {"start", START_T},
     {"stem", STEM},
     {"table", TABLE},
     {"spandynamic", SPANDYNAMIC}, 
@@ -68,8 +64,6 @@ static Keyword_ent the_key_tab[]={
     {"texid", TEXID},
     {"textstyle", TEXTSTYLE},
     {"transpose", TRANSPOSE},
-    {"unitspace", UNITSPACE},
-    {"width", WIDTH},
     {"version", VERSION},
     {"grouping", GROUPING},
     {0,0}