summaryrefslogtreecommitdiff
path: root/src/pyparsing.py
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@austin.rr.com>2016-06-18 13:04:27 +0000
committerPaul McGuire <ptmcg@austin.rr.com>2016-06-18 13:04:27 +0000
commit24eccd7e4600afa4018c72fb66495047a5266ea5 (patch)
tree5704e9532759531cffce7c26b7a85469027423c7 /src/pyparsing.py
parent7e0372302a2c8ef23dc98b4b71b4c5ed54dbffac (diff)
downloadpyparsing-git-24eccd7e4600afa4018c72fb66495047a5266ea5.tar.gz
Fixed bug in pyparsing_common.numeric, integers were parsed as floats
Diffstat (limited to 'src/pyparsing.py')
-rw-r--r--src/pyparsing.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pyparsing.py b/src/pyparsing.py
index ec678d0..163dc8b 100644
--- a/src/pyparsing.py
+++ b/src/pyparsing.py
@@ -57,8 +57,8 @@ The pyparsing module handles some of the problems that are typically vexing when
- embedded comments
"""
-__version__ = "2.1.5"
-__versionTime__ = "13 Jun 2016 19:59 UTC"
+__version__ = "2.1.6"
+__versionTime__ = "18 Jun 2016 12:49 UTC"
__author__ = "Paul McGuire <ptmcg@users.sourceforge.net>"
import string
@@ -3988,7 +3988,7 @@ class pyparsing_common:
signedInteger = Regex(r'[+-]?\d+').setName("signed integer").setParseAction(convertToInteger)
"""expression that parses an integer with optional leading sign, returns an int"""
- fraction = (signedInteger.addParseAction(convertToFloat) + '/' + signedInteger.addParseAction(convertToFloat)).setName("fraction")
+ fraction = (signedInteger().setParseAction(convertToFloat) + '/' + signedInteger().setParseAction(convertToFloat)).setName("fraction")
"""fractional expression of an integer divided by an integer, returns a float"""
fraction.addParseAction(lambda t: t[0]/t[-1])