]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/my-lily-lexer.cc
*** empty log message ***
[lilypond.git] / lily / my-lily-lexer.cc
index 53acda5cdd6d11403eb25fc7027d25556abc2216..c36b546c8640d5c948750e1c4d4727c27bac0236 100644 (file)
@@ -22,7 +22,7 @@
 #include "main.hh"
 #include "input.hh"
 #include "moment.hh"
-#include "ly-modules.hh"
+#include "ly-module.hh"
 
 
 static Keyword_ent the_key_tab[]={
@@ -83,8 +83,8 @@ static Keyword_ent the_key_tab[]={
   {"tempo", TEMPO},
   {"time", TIME_T},
   {"times", TIMES},
-  {"translator", TRANSLATOR},
   {"transpose", TRANSPOSE},
+  {"transposition", TRANSPOSITION},
   {"type", TYPE},
   {"unset", UNSET},
   {"with", WITH},
@@ -94,8 +94,6 @@ static Keyword_ent the_key_tab[]={
 
 My_lily_lexer::My_lily_lexer ()
 {
-  //  yy_flex_debug = 1;
-  
   keytable_ = new Keyword_table (the_key_tab);
 
   chordmodifier_tab_ = scm_make_vector (gh_int2scm (1), SCM_EOL);
@@ -103,7 +101,7 @@ My_lily_lexer::My_lily_lexer ()
   
   scopes_ = SCM_EOL;
   
-  add_scope(ly_make_anonymous_module());
+  add_scope (ly_make_anonymous_module ());
   errorlevel_ =0; 
 
   main_input_b_ = false;
@@ -124,7 +122,7 @@ My_lily_lexer::add_scope (SCM module)
                                                 gh_car (s), SCM_UNDEFINED),
                             SCM_UNDEFINED);
       
-      scm_primitive_eval(expr);
+      scm_primitive_eval (expr);
     }
   
   scopes_ = scm_cons (module, scopes_);
@@ -155,7 +153,7 @@ My_lily_lexer::lookup_identifier (String s)
     {
       SCM var = ly_module_lookup (gh_car (s), sym);
       if (var != SCM_BOOL_F)
-       return scm_variable_ref(var);
+       return scm_variable_ref (var);
     }
 
   return SCM_UNDEFINED;
@@ -163,8 +161,11 @@ My_lily_lexer::lookup_identifier (String s)
 
 void
 My_lily_lexer::start_main_input ()
-{  
+{
+  // yy_flex_debug = 1;
+
   new_input (main_input_name_, &global_input_file->sources_);
+  /* Do not allow \include in --safe-mode */
   allow_includes_b_ = allow_includes_b_ && ! safe_global_b;
 
   scm_module_define (gh_car (scopes_),
@@ -241,5 +242,5 @@ My_lily_lexer::here_input () const
 void
 My_lily_lexer::prepare_for_next_token ()
 {
-  last_input_ = here_input();
+  last_input_ = here_input ();
 }