[SCM] calf/master: + Big Bull: fix regexp bug with fractional-only decimals
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:39:16 UTC 2013
The following commit has been merged in the master branch:
commit 5803a04f86e846d6b93eeaadc9d264ed6acf2f64
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Sun Feb 1 01:50:09 2009 +0000
+ Big Bull: fix regexp bug with fractional-only decimals
diff --git a/bigbull/ttl.l b/bigbull/ttl.l
index 36a2706..baba2b8 100644
--- a/bigbull/ttl.l
+++ b/bigbull/ttl.l
@@ -23,7 +23,7 @@ TRIPLEQUOTE \"\"\"
{TRIPLEQUOTE} { LEXER_DATA->strctx.clear(); BEGIN(C_LONGSTRING); }
\" { LEXER_DATA->strctx.clear(); BEGIN(C_STRING); }
\<[^>]*\> { LEXER_DATA->add("URI", std::string(yytext + 1, strlen(yytext) - 2)); }
-[+-]?[0-9]+\.[0-9]*([eE][-+]?[0-9]+)? { std::stringstream ss(yytext); double value; ss >> value; LEXER_DATA->add("number", PyFloat_FromDouble(value)); }
+[+-]?([0-9]+\.[0-9]*|\.[0-9]+)([eE][-+]?[0-9]+)? { std::stringstream ss(yytext); double value; ss >> value; LEXER_DATA->add("number", PyFloat_FromDouble(value)); }
[+-]?[0-9]+ { LEXER_DATA->add("number", PyInt_FromLong(atol(yytext))); }
{SYMBOL}?:{SYMBOL}? { LEXER_DATA->add("prnot", yytext); }
{SYMBOL} { LEXER_DATA->add("symbol", yytext); }
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list