]> git.donarmstrong.com Git - lilypond.git/commitdiff
(My_lily_parser): only copy lexer if it
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 22 Jun 2004 17:46:01 +0000 (17:46 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 22 Jun 2004 17:46:01 +0000 (17:46 +0000)
exists

lily/my-lily-parser.cc
scm/ly-from-scheme.scm

index 44c858171990d1942f33e7aaf6ab6aca26a53729..7032ed78ba09893f7af966e1b2e6f2c64715a11d 100644 (file)
@@ -337,7 +337,6 @@ LY_DEFINE (ly_parser_define, "ly:parser-define",
   SCM_ASSERT_TYPE (ly_c_symbol_p (symbol), symbol, SCM_ARG2, __FUNCTION__, "symbol");
   SCM_ASSERT_TYPE (parser, parser_smob, SCM_ARG2, __FUNCTION__, "parser");  
 
-
   parser->lexer_->set_identifier (scm_symbol_to_string (symbol), val);
   return SCM_UNSPECIFIED;
 }
index f7928db4b3e4965b862f8acb66479418e3aa658c..43e6269c6e476e013e951e44ebc97956b2ee225c 100644 (file)
@@ -46,7 +46,8 @@ character."
       (cond (;; $variable
              (and (symbol? form)
                   (string=? (substring (symbol->string form) 0 1) "$")
-                  (not (string=? (substring (symbol->string form) 1 2) "$")))
+                  (not (and (<= 2 (string-length (symbol->string form)))
+                           (string=? (substring (symbol->string form) 1 2) "$"))))
              (create-binding! (string->symbol (substring (symbol->string form) 1))))
             (;; atom
              (not (pair? form)) form)