]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lexer.ll
* VERSION (MY_PATCH_LEVEL): make 1.7.0
[lilypond.git] / lily / lexer.ll
index c1451847d1234a28d8e8864d37c25ae3ef47ea95..48d8c3564048cdac9e594947b7161ebfac8c5bd8 100644 (file)
@@ -34,7 +34,7 @@
 #include "string.hh"
 #include "string-convert.hh"
 #include "my-lily-lexer.hh"
-#include "array.hh"
+#include "input-file-results.hh"
 #include "interval.hh"
 #include "lily-guile.hh"
 #include "parser.hh"
@@ -113,6 +113,7 @@ WORD                {A}{AN}*
 ALPHAWORD      {A}+
 DIGIT          {N}
 UNSIGNED       {N}+
+E_UNSIGNED     \\{N}+
 FRACTION       {N}+\/{N}+
 INT            -?{UNSIGNED}
 REAL           ({INT}\.{N}*)|(-?\.{N}+)
@@ -199,7 +200,7 @@ HYPHEN              --
        String s (YYText ()+1);
        s = s.left_string (s.index_last ('"'));
 
-       new_input (s,source_global);
+       new_input (s, &global_input_file->sources_ );
        yy_pop_state ();
 }
 <incl>\\{BLACK}*;?{WHITE} { /* got the include identifier */
@@ -210,7 +211,7 @@ HYPHEN              --
 
        SCM sid = lookup_identifier (s);
        if (gh_string_p (sid)) {
-               new_input (ly_scm2string (sid), source_global);
+               new_input (ly_scm2string (sid), &global_input_file->sources_);
                yy_pop_state ();
        } else { 
            String msg (_f ("wrong or undefined identifier: `%s'", s ));
@@ -303,6 +304,10 @@ HYPHEN             --
                yylval.i = String_convert::dec2int (String (YYText ()));
                return UNSIGNED;
        }
+       {E_UNSIGNED}    {
+               yylval.i = String_convert::dec2int (String (YYText () +1));
+               return E_UNSIGNED;
+       }
 
        \" {
                start_quote ();
@@ -361,7 +366,7 @@ HYPHEN              --
                char c = s[s.length () - 1];
                if (c == '{' ||  c == '}') // brace open is for not confusing dumb tools.
                        here_input ().warning (
-                               _ ("Brace found at end of lyric. Did you forget a space?"));
+                               _ ("Brace found at end of lyric.  Did you forget a space?"));
                yylval.scm = scm_makfrom0str (s.to_str0 ());
 
 
@@ -398,6 +403,9 @@ HYPHEN              --
        \/\+ {
                return CHORD_BASS;
        }
+       \/  {
+               return CHORD_SLASH;
+       }
        \^  {
                return CHORD_CARET;
        }
@@ -435,6 +443,7 @@ HYPHEN              --
        return UNSIGNED;
 }
 
+
 [{}]   {
 
        return YYText ()[0];
@@ -471,6 +480,7 @@ HYPHEN              --
        return E_TILDE;
     case '\\':
        return E_BACKSLASH;
+
     default:
        return E_CHAR;
     }