about summary refs log tree commit diff
path: root/src/libexpr/lexer.l
diff options
context:
space:
mode:
authorChristian Theune <ct@flyingcircus.io>2016-01-05T08·54+0100
committerChristian Theune <ct@flyingcircus.io>2016-01-05T08·54+0100
commita12a43046b0d1b967f0ca31d0db7bff218250274 (patch)
treeab45a95587c4cfec76682fb37aa612a226058e98 /src/libexpr/lexer.l
parentf872262e0818ae1000826cfca3ad17619f50b60c (diff)
Edge condition: parser did not pick up floats starting exactly with 0.
Diffstat (limited to 'src/libexpr/lexer.l')
-rw-r--r--src/libexpr/lexer.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l
index 5fdcb25dd4..7a6e48215b 100644
--- a/src/libexpr/lexer.l
+++ b/src/libexpr/lexer.l
@@ -85,7 +85,7 @@ static Expr * unescapeStr(SymbolTable & symbols, const char * s)
 
 ID          [a-zA-Z\_][a-zA-Z0-9\_\'\-]*
 INT         [0-9]+
-FLOAT       (([1-9][0-9]*\.?[0-9]*)|(\.[0-9]+))([Ee][+-]?[0-9]+)?
+FLOAT       (([1-9][0-9]*\.[0-9]*)|(0?\.[0-9]+))([Ee][+-]?[0-9]+)?
 PATH        [a-zA-Z0-9\.\_\-\+]*(\/[a-zA-Z0-9\.\_\-\+]+)+
 HPATH       \~(\/[a-zA-Z0-9\.\_\-\+]+)+
 SPATH       \<[a-zA-Z0-9\.\_\-\+]+(\/[a-zA-Z0-9\.\_\-\+]+)*\>