From ebb06c2f41e130dddd201c5f14966f6105b94978 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:51:18 +0000 Subject: [PATCH] lilypond-0.1.7 --- lily/lexer.l | 26 ++++++++++---------------- lily/my-lily-lexer.cc | 6 ------ 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/lily/lexer.l b/lily/lexer.l index 51ea87a08d..0634e76c4a 100644 --- a/lily/lexer.l +++ b/lily/lexer.l @@ -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; diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index a67aac8a76..18155a56e7 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -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} -- 2.39.5