Reviewers: Keith,
Message:
On 2012/07/26 02:37:19, Keith wrote:
Oh, I don't know. It's only mildly annoying, but I don't see what
good it does.
What else could ".3" be besides a number ?
A chord step. But chordmode is pretty awful anyway. I agree that
syntactically 4. is quite the more important case (and it is rather
pointless since 4\cm works quite fine)
<http://www.mutopiaproject.org/cgibin/piece-info.cgi?id=921>
chp-28-04-a4.ly:45:18: error: syntax error, unexpected '.'
bottom-margin =
.6\cm % A4
That is the sort of thing that a long-term syntax guarantee should not
cover. Unnecessarily illegible for both human and computer.
Description:
Syntax change: REAL requires at least one digit before decimal point
Please review this at http://codereview.appspot.com/6446048/
Affected files:
M lily/lexer.ll
Index: lily/lexer.ll
diff --git a/lily/lexer.ll b/lily/lexer.ll
index
07bb33c6f7187979356d7e6ffac05cca3ba095a5..30a1b5fa4b1732af5e79a654e5671e296b858ff3
100644
--- a/lily/lexer.ll
+++ b/lily/lexer.ll
@@ -166,7 +166,7 @@ UNSIGNED {N}+
E_UNSIGNED \\{N}+
FRACTION {N}+\/{N}+
INT -?{UNSIGNED}
-REAL ({INT}\.{N}*)|(-?\.{N}+)
+REAL {INT}\.{N}*
WHITE [ \n\t\f\r]
HORIZONTALWHITE [ \t]
BLACK [^ \n\t\f\r]
@@ -528,10 +528,6 @@ BOM_UTF8 \357\273\277
yylval.scm = scan_fraction (YYText ());
return FRACTION;
}
- {UNSIGNED}/\/[^0-9] { // backup rule
- yylval.scm = scm_c_read_string (YYText ());
- return UNSIGNED;
- }
{UNSIGNED}/\/ | // backup rule
{UNSIGNED} {
yylval.scm = scm_c_read_string (YYText ());
@@ -573,10 +569,6 @@ BOM_UTF8 \357\273\277
yylval.scm = scan_fraction (YYText ());
return FRACTION;
}
- {UNSIGNED}/\/[^0-9] { // backup rule
- yylval.scm = scm_c_read_string (YYText ());
- return UNSIGNED;
- }
{UNSIGNED}/\/ | // backup rule
{UNSIGNED} {
yylval.scm = scm_c_read_string (YYText ());
@@ -720,10 +712,6 @@ BOM_UTF8 \357\273\277
yylval.scm = scm_c_read_string (YYText ());
return REAL;
}
--\. { // backup rule
- yylval.scm = scm_from_double (0.0);
- return REAL;
-}
{UNSIGNED}/\/ | // backup rule
{UNSIGNED} {
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel