diff options
author | David Beazley <dave@dabeaz.com> | 2009-01-13 13:23:40 +0000 |
---|---|---|
committer | David Beazley <dave@dabeaz.com> | 2009-01-13 13:23:40 +0000 |
commit | bc4321d25db0b37f5e6264c58827d69264aa0260 (patch) | |
tree | 69c2c7c7b654c71d7824829cc0cd3f115b9c70a3 /example/closurecalc/calc.py | |
parent | e65cd063f1c8881c9589a9726e0cde76533b55c0 (diff) | |
download | ply-bc4321d25db0b37f5e6264c58827d69264aa0260.tar.gz |
Significant cleanup. Refactoring of yacc internals
Diffstat (limited to 'example/closurecalc/calc.py')
-rw-r--r-- | example/closurecalc/calc.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/example/closurecalc/calc.py b/example/closurecalc/calc.py index a1d5845..6598f58 100644 --- a/example/closurecalc/calc.py +++ b/example/closurecalc/calc.py @@ -36,11 +36,7 @@ def make_calculator(): def t_NUMBER(t): r'\d+' - try: - t.value = int(t.value) - except ValueError: - print("Integer value too large %s" % t.value) - t.value = 0 + t.value = int(t.value) return t def t_newline(t): |