]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-parser-scheme.cc
Merge branch 'master' of git://git.sv.gnu.org/lilypond
[lilypond.git] / lily / lily-parser-scheme.cc
index a1cdfa3c035f9b5d7d26db9f3d81f7928f9930bd..37dbc7a8966f274f6ac6f9f4449ca337e9ab6127 100644 (file)
@@ -11,7 +11,6 @@
 #include "file-name-map.hh"
 #include "file-name.hh"
 #include "file-path.hh"
-#include "input.hh"
 #include "international.hh"
 #include "lily-lexer.hh"
 #include "lily-parser.hh"
@@ -86,7 +85,7 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
       if (dir != "" && dir != "." && dir != get_working_directory ())
        {
          global_path.prepend (get_working_directory ());
-         message (_f ("Changing working directory to `%s'",
+         message (_f ("Changing working directory to: `%s'",
                       dir.c_str ()));
          chdir (dir.c_str ());
        }
@@ -104,7 +103,7 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
 
   if (init.length () && global_path.find (init).empty ())
     {
-      warning (_f ("can't find init file: `%s'", init));
+      warning (_f ("cannot find init file: `%s'", init));
       warning (_f ("(search path: `%s')",
                   global_path.to_string ().c_str ()));
       exit (2);
@@ -114,7 +113,7 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
   bool error = false;
   if ((file_name != "-") && file_name.empty ())
     {
-      warning (_f ("can't find file: `%s'", file));
+      warning (_f ("cannot find file: `%s'", file));
       error = true;
     }
   else
@@ -164,7 +163,15 @@ LY_DEFINE (ly_parse_string, "ly:parse-string",
   return SCM_UNSPECIFIED;
 }
 
-LY_DEFINE (ly_clone_parser, "ly:clone-parser",
+LY_DEFINE (ly_parser_lexer, "ly:parser-lexer",
+          1, 0, 0, (SCM parser_smob),
+          "Return the lexer for PARSER_SMOB.")
+{
+  Lily_parser *parser = unsmob_lily_parser (parser_smob);
+  return parser->lexer_->self_scm ();
+}
+
+LY_DEFINE (ly_parser_clone, "ly:parser-clone",
           1, 0, 0, (SCM parser_smob),
           "Return a clone of PARSER_SMOB.")
 {