]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-lexer.cc
* scripts/convert-ly.py (conv): add conversion.
[lilypond.git] / lily / lily-lexer.cc
index fa0ae8d544238ca2407278de4a33ccd9ff981197..2b96e09ffbb466da46c5deaaf4b0a117c136ca2d 100644 (file)
@@ -27,6 +27,7 @@
 static Keyword_ent the_key_tab[] = {
   {"accepts", ACCEPTS},
   {"addquote", ADDQUOTE},
+  {"addlyrics", ADDLYRICS},
   {"alias", ALIAS},
   {"alternative", ALTERNATIVE},
   {"bar", BAR},
@@ -34,26 +35,28 @@ static Keyword_ent the_key_tab[] = {
   {"bookpaper", BOOKPAPER},
   {"change", CHANGE},
   {"chords", CHORDS},
+  {"chordmode", CHORDMODE},
   {"clef", CLEF},
   {"consists", CONSISTS},
   {"context", CONTEXT},
   {"default", DEFAULT},
   {"denies", DENIES},
+  {"drummode", DRUMMODE},
   {"drums", DRUMS},
   {"description", DESCRIPTION},
   {"figures",FIGURES},
+  {"figuremode",FIGUREMODE},
   {"grobdescriptions", GROBDESCRIPTIONS},
   {"header", HEADER},
   {"key", KEY},
-  {"lyrics", LYRICS},
+  {"lyricmode", LYRICMODE},
   {"lyricsto", LYRICSTO},
   {"mark", MARK},
   {"markup", MARKUP},
   {"midi", MIDI},
   {"name", NAME},
   {"new", NEWCONTEXT},
-  {"newlyrics", NEWLYRICS},
-  {"notes", NOTES},
+  {"notemode", NOTEMODE},
   {"octave", OCTAVE},
   {"once", ONCE},
   {"override", OVERRIDE},
@@ -104,7 +107,7 @@ Lily_lexer::Lily_lexer (Sources *sources)
 Lily_lexer::Lily_lexer (Lily_lexer const &src)
   : Includable_lexer ()
 {
-  keytable_ =  (src.keytable_) ? new Keyword_table (*src.keytable_) : 0;
+  keytable_ = (src.keytable_) ? new Keyword_table (*src.keytable_) : 0;
   encoding_ = src.encoding_;
   chordmodifier_tab_ = src.chordmodifier_tab_;
   pitchname_tab_stack_ = src.pitchname_tab_stack_;
@@ -118,7 +121,7 @@ Lily_lexer::Lily_lexer (Lily_lexer const &src)
   smobify_self ();
   
   SCM scopes = SCM_EOL;
-  SCMtail = &scopes;
+  SCM *tail = &scopes;
   for (SCM s = src.scopes_; ly_c_pair_p (s); s = ly_cdr (s))
     {
       SCM newmod = ly_make_anonymous_module (false);
@@ -209,14 +212,15 @@ void
 Lily_lexer::set_identifier (SCM name, SCM s)
 {
   SCM sym = name;
-  if (ly_c_string_p (name))
+  if (scm_is_string (name))
     sym =  scm_string_to_symbol (name);
   
-  if (ly_c_symbol_p (sym))
+  if (scm_is_symbol (sym))
     {
       if (lookup_keyword (ly_symbol2string (sym)) >= 0)
        {
-         warning (_f ("Identifier name is a keyword: `%s'", SCM_SYMBOL_CHARS (sym)));
+         String symstr = ly_symbol2string (sym); 
+         warning (_f ("Identifier name is a keyword: `%s'", symstr.to_str0()));
        }
 
       SCM mod = ly_car (scopes_);
@@ -281,7 +285,6 @@ Lily_lexer::set_encoding (String s)
     encoding_ = SCM_EOL;
 }
 
-
 #include "ly-smobs.icc"
 
 IMPLEMENT_SMOBS (Lily_lexer);