[sr-dev] git:alexh/master: core: allow negative decimal numbers in configuration file parser

Alex Hermann alex at speakup.nl
Mon Aug 8 11:11:06 CEST 2011


Module: sip-router
Branch: alexh/master
Commit: 99f314429cea4341240836e9c9d62c38176eae12
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=99f314429cea4341240836e9c9d62c38176eae12

Author: Alex Hermann <alex at speakup.nl>
Committer: Alex Hermann <alex at speakup.nl>
Date:   Fri Aug  5 15:32:14 2011 +0200

core: allow negative decimal numbers in configuration file parser

---

 cfg.lex |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cfg.lex b/cfg.lex
index ff35a8a..ecf92db 100644
--- a/cfg.lex
+++ b/cfg.lex
@@ -525,7 +525,7 @@ NUM_ID		{ALPHANUM}+
 HEX			[0-9a-fA-F]
 HEXNUMBER	0x{HEX}+
 OCTNUMBER	0[0-7]+
-DECNUMBER       0|([1-9]{DIGIT}*)
+DECNUMBER       0|(-?[1-9]{DIGIT}*)
 BINNUMBER       [0-1]+b
 HEX4		{HEX}{1,4}
 IPV6ADDR	({HEX4}":"){7}{HEX4}|({HEX4}":"){1,7}(":"{HEX4}){1,7}|":"(":"{HEX4}){1,7}|({HEX4}":"){1,7}":"|"::"




More information about the sr-dev mailing list