]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lexer.ll
Let ly:music-message and ly:music-warning accept additional arguments for format
[lilypond.git] / lily / lexer.ll
index 0df70e20082f50bb4a6f131b00d6f55382f9b6af..9e25ed788735e0af6191c715188ce597fb966a66 100644 (file)
@@ -156,6 +156,7 @@ E_UNSIGNED  \\{N}+
 FRACTION       {N}+\/{N}+
 INT            -?{UNSIGNED}
 REAL           ({INT}\.{N}*)|(-?\.{N}+)
+STRICTREAL      {UNSIGNED}\.{UNSIGNED}
 WHITE          [ \n\t\f\r]
 HORIZONTALWHITE                [ \t]
 BLACK          [^ \n\t\f\r]
@@ -492,8 +493,12 @@ BOM_UTF8   \357\273\277
                yylval =  scan_fraction (YYText ());
                return FRACTION;
        }
-       {UNSIGNED}/\/   | // backup rule
-       {UNSIGNED}              {
+       {STRICTREAL}    {
+               yylval = scm_c_read_string (YYText ());
+               return REAL;
+       }
+       {UNSIGNED}/[/.] | // backup rule
+       {UNSIGNED}      {
                yylval = scm_c_read_string (YYText ());
                return UNSIGNED;
        }
@@ -539,7 +544,11 @@ BOM_UTF8   \357\273\277
                yylval =  scan_fraction (YYText ());
                return FRACTION;
        }
-       {UNSIGNED}/\/   | // backup rule
+       {STRICTREAL}    {
+               yylval = scm_c_read_string (YYText ());
+               return REAL;
+       }
+       {UNSIGNED}/[/.] | // backup rule
        {UNSIGNED}              {
                yylval = scm_c_read_string (YYText ());
                return UNSIGNED;
@@ -722,7 +731,7 @@ BOM_UTF8    \357\273\277
                yyterminate ();
 }
 
-<maininput>. {
+<maininput>{ANY_CHAR} {
        while (include_stack_.size () > main_input_level_
               && close_input ())
                ;