From 59b31ae8596f9606217b09d4e3f00dcf5aab8475 Mon Sep 17 00:00:00 2001 From: murphy Date: Wed, 22 Apr 2009 02:40:04 +0000 Subject: Improved Python scanner (issue #41). * fixed numeric literals * better Python 3 support * bugfixes, optimizations * added two more test files --- test/scanners/python/literals.in.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/scanners/python/literals.in.py (limited to 'test/scanners/python/literals.in.py') diff --git a/test/scanners/python/literals.in.py b/test/scanners/python/literals.in.py new file mode 100644 index 0000000..ccf15ac --- /dev/null +++ b/test/scanners/python/literals.in.py @@ -0,0 +1,16 @@ +# from http://docs.python.org/reference/lexical_analysis.html#literals + +re.compile("[A-Za-z_]" # letter or underscore + "[A-Za-z0-9_]*" # letter, digit or underscore + ) +7 2147483647 0177 +3L 79228162514264337593543950336L 0377L 0x100000000L + 79228162514264337593543950336 0xdeadbeef + +3.14 10. .001 1e100 3.14e-10 0e0 + +3.14j 10.j 10j .001j 1e100j 3.14e-10j + +2 + 1j + +3.5e+54 - 2.5e-13j \ No newline at end of file -- cgit v1.2.1