]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/my-lily-lexer.cc
* lily/my-lily-lexer.cc (start_main_input): define input-file-name
[lilypond.git] / lily / my-lily-lexer.cc
index 2c1faf4cfb3c3075b607709ff67ea08760c61c29..d84f6f4e52a520d5b5afc366765d589da5ef1dda 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <ctype.h>
 
 
 static Keyword_ent the_key_tab[]={
+  {"accepts", ACCEPTS},
+  {"addlyrics", ADDLYRICS},
   {"alias", ALIAS},
+  {"alternative", ALTERNATIVE},
   {"apply", APPLY},
   {"applycontext", APPLYCONTEXT},
+  {"applyoutput", APPLYOUTPUT},
   {"autochange", AUTOCHANGE},
-  {"simultaneous", SIMULTANEOUS},
-  {"sequential", SEQUENTIAL},
-  {"accepts", ACCEPTS},
-  {"alternative", ALTERNATIVE},
   {"bar", BAR},
   {"breathe", BREATHE},
   {"chordmodifiers", CHORDMODIFIERS},
@@ -44,39 +44,42 @@ static Keyword_ent the_key_tab[]={
   {"context", CONTEXT},
   {"default", DEFAULT},
   {"denies", DENIES},
+  {"description", DESCRIPTION},
   {"duration", DURATION},
-  {"grobdescriptions", GROBDESCRIPTIONS},
   {"figures",FIGURES},
   {"grace", GRACE},
+  {"grobdescriptions", GROBDESCRIPTIONS},
   {"header", HEADER},
-  {"lyrics", LYRICS},
   {"key", KEY},
+  {"lyrics", LYRICS},
   {"mark", MARK},
   {"markup", MARKUP},
-  {"once", ONCE},
-  {"pitch", PITCH},
-  {"time", TIME_T},
-  {"times", TIMES},
   {"midi", MIDI},
   {"name", NAME},
-  {"pitchnames", PITCHNAMES},
   {"notes", NOTES},
+  {"octave", OCTAVE},
+  {"once", ONCE},
   {"outputproperty", OUTPUTPROPERTY},
   {"override", OVERRIDE},
-  {"set", SET},
-  {"rest", REST},
-  {"revert", REVERT},
-  {"partial", PARTIAL},
   {"paper", PAPER},
+  {"partcombine", PARTCOMBINE},
+  {"partial", PARTIAL},
+  {"pitch", PITCH},
+  {"pitchnames", PITCHNAMES},
   {"property", PROPERTY},
   {"relative", RELATIVE},
   {"remove", REMOVE},
   {"repeat", REPEAT},
-  {"addlyrics", ADDLYRICS},
-  {"partcombine", PARTCOMBINE},
+  {"rest", REST},
+  {"revert", REVERT},
   {"score", SCORE},
+  {"sequential", SEQUENTIAL},
+  {"set", SET},
+  {"simultaneous", SIMULTANEOUS},
   {"skip", SKIP},
   {"tempo", TEMPO},
+  {"time", TIME_T},
+  {"times", TIMES},
   {"translator", TRANSLATOR},
   {"transpose", TRANSPOSE},
   {"type", TYPE},
@@ -145,7 +148,7 @@ My_lily_lexer::lookup_identifier (String s)
        return scm_variable_ref(var);
     }
 
-  return SCM_UNSPECIFIED;
+  return SCM_UNDEFINED;
 }
 
 void
@@ -153,6 +156,10 @@ My_lily_lexer::start_main_input ()
 {  
   new_input (main_input_string_, &global_input_file->sources_);
   allow_includes_b_ = allow_includes_b_ &&  ! (safe_global_b);
+
+  scm_module_define (gh_car (scopes_),
+                    ly_symbol2scm ("input-file-name"),
+                    scm_makfrom0str (main_input_string_.to_str0()));
 }
 
 void