\include "property.ly"
-\include "scm.ly"
+\scmfile "lily.scm";
% music = "\melodic\relative c"
-% scm.ly -- implement Scheme output routines for TeX and PostScript
-%
-% source file of the GNU LilyPond music typesetter
-%
-% (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
-
-\scm "
-(primitive-load-path 'lily)
-";
void load_stdin ();
void load_file (String);
-protected:
+public:
virtual char const*ch_C () const;
virtual int length_i () const;
virtual ~Simple_file_storage ();
-public:
Simple_file_storage (String);
};
SCM lambda_scm (String str, Array<Scalar> args_arr);
-
+void read_lily_scm_file (String);
#endif // LILY_GUILE_HH
#include "libc-extension.hh"
#include "lily-guile.hh"
#include "main.hh"
+#include "simple-file-storage.hh"
+#include "file-path.hh"
SCM
ly_append (SCM a, SCM b)
SCM
ly_list1 (SCM a)
{
- return gh_call1 (gh_eval_str ("list"), a);
+ return gh_list (a, SCM_UNDEFINED);
}
SCM
args_arr.clear ();
}
SCM args_scm = SCM_EOL;
- for (int i = args_arr.size () - 1; i >= 0; i--)
+ for (int i = args_arr.size (); i--; )
args_scm = gh_cons (gh_double2scm (args_arr[i]), args_scm);
+
SCM scm =
ly_append (ly_lambda_o (),
ly_list1 (ly_append (ly_func_o (str.ch_l ()), args_scm)));
}
+
+void
+read_lily_scm_file (String fn)
+{
+ String s = global_path.find (fn);
+ Simple_file_storage f(s);
+
+ gh_eval_str (f.ch_C());
+}
%token PT_T
%token RELATIVE
%token REMOVE
-%token SCHEME /* token vs typedef; can't be named SCM */
+%token SCM_T
+%token SCMFILE
%token SCORE
%token SCRIPT
%token SHAPE
;
embedded_scm:
- SCHEME STRING ';' {
- #ifdef HAVE_LIBGUILE
+ SCMFILE STRING ';' {
+ read_lily_scm_file (*$2);
+ delete $2;
+ }
+ | SCM_T STRING ';' {
gh_eval_str ($2->ch_l ());
- #endif
delete $2;
};
"musical_pitch" "time" "midi" "mm" "header"
"notenames" "octave" "output" "partial" "paper" "plet"
"property" "pt" "shape" "relative" "include" "score"
+ "scm" "scmfile"
"script" "skip" "table" "spandynamic" "symboltables"
"tempo" "texid" "textstyle" "transpose" "version" "grouping"
))