summaryrefslogtreecommitdiff
path: root/Parser
Commit message (Collapse)AuthorAgeFilesLines
* bpo-25083: Python can sometimes create incorrect .pyc files (GH-8449)tzickel2018-09-101-0/+5
| | | | | | Python 2 never checked for I/O error when reading .py files and thus could mistake an I/O error for EOF and create incorrect .pyc files. This adds an check for this and aborts on an error.
* [2.7] bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833). (GH-8849)Zackery Spytz2018-08-221-2/+4
| | | | | (cherry picked from commit 3e26e42c905852394fa136f1cc564dac98b56166) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* closes bpo-34400: Fix undefined behavior in parsetok(). (GH-4439)Miss Islington (bot)2018-08-151-1/+1
| | | | | | Avoid undefined pointer arithmetic with NULL. (cherry picked from commit 7c4ab2afb17b99eb3f61f9c73cbd548b5e0ad2c0) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)Serhiy Storchaka2018-07-311-1/+1
|
* bpo-27780: Make pgen.c C89 compliant (GH-7915)Zachary Ware2018-06-251-2/+3
|
* make pgen.c C89 compliant again (GH-7870)Benjamin Peterson2018-06-221-1/+2
|
* [2.7] properly free memory in pgen. (GH-7869) (closes bpo-27780Benjamin Peterson2018-06-223-2/+35
| | | | | (cherry picked from commit 9ac11a752a19c3b8607582a3d5ccb615c467124b) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* bpo-33645: Fix an "unknown parsing error" in the parser. (GH-7119)Serhiy Storchaka2018-05-311-0/+2
| | | | It is reproduced when parse the "<>" operator and run Python with both options -3 and -We.
* Fix a shadow-compatible-local warning (#2182)Yuan Chao Chou2017-08-041-3/+3
| | | | Change the shadowing naming, 'value' (Python-ast.c:3814), to 'val' to prevent the variables from being misused.
* reinit the TLS before anything else (#130)Benjamin Peterson2017-02-201-1/+1
| | | | PyEval_ReInitThread can run arbitrary Python code, which really ought to have the TLS initialized.
* Silenced compiler warnings.Serhiy Storchaka2016-10-081-2/+3
|
* Issue #24098: Fixed possible crash when AST is changed in process ofSerhiy Storchaka2016-10-071-0/+7
| | | | compiling it.
* Revert unintended commit to asdl_c.pyMartin Panter2016-09-241-1/+1
|
* Fix incomplete format error in asdl.pyMartin Panter2016-09-242-2/+2
|
* properly handle the single null-byte file (closes #24022)Benjamin Peterson2016-09-181-1/+1
|
* Spelling and grammar fixes in code comments and documentationMartin Panter2016-07-281-1/+1
|
* Issue #22463: Backport compiler warning fixes and workaroundsMartin Panter2016-06-211-0/+1
| | | | | | | | | | | | | | * Set but unused variable in Parser/pgen.c in non-debug builds. Patch by Christian Heimes. * Unused static function in Modules/readline.c. Patch by Georg Brandl. * main_window unused in Modules/tkappinit.c. Patch by Gregory P. Smith. * Dead assignment in Modules/_ctypes/cfield.c. Extracted from patch by Brett Cannon. * Expression result unused in PyObject_INIT macro expansions. Based on patches by Christian Heimes. * Load expat_config.h and therefore pyconfig.h before C stdlib headers are loaded. This silences pre-processor warnings including '_POSIX_C_SOURCE redefined'. Extracted from patch by Christian Heimes.
* Issue #25388: Fixed tokenizer hang when processing undecodable source codeSerhiy Storchaka2015-11-141-3/+6
| | | | with a null byte.
* add missing NULL checks to get_coding_spec (closes #24854)Benjamin Peterson2015-08-131-1/+4
|
* Issue #22221: Backported fixes from Python 3 (issue #18960).Serhiy Storchaka2014-09-051-3/+17
| | | | | | | | | | | | | * Now the source encoding declaration on the second line isn't effective if the first line contains anything except a comment. This affects compile(), eval() and exec() too. * IDLE now ignores the source encoding declaration on the second line if the first line contains anything except a comment. * 2to3 and the findnocoding.py script now ignore the source encoding declaration on the second line if the first line contains anything except a comment.
* Issue #21789: fix broken link (reported by Jan Varho)Ned Deily2014-06-171-1/+1
|
* allow the keyword else immediately after (no space) an integer (closes #21642)Benjamin Peterson2014-06-071-5/+14
|
* complain if the codec doesn't return unicodeBenjamin Peterson2013-12-281-0/+6
|
* #18803: fix more typos. Patch by Févry Thibault.Ezio Melotti2013-08-261-1/+1
|
* Issue #18038: SyntaxError raised during compilation sources with illegalSerhiy Storchaka2013-06-091-7/+7
| | | | encoding now always contains an encoding name.
* Make PyAST_obj2mod C89 compliant.Trent Nelson2012-12-131-3/+11
|
* #15923: fix a mistake in asdl_c.py that resulted in a TypeError after ↵Ezio Melotti2012-09-301-1/+1
| | | | 2801bf875a24 (see #15801).
* Remove unused variables in parsetok().Georg Brandl2012-08-111-2/+1
|
* Closes #15512: Correct __sizeof__ support for parserJesus Cea2012-08-031-0/+26
|
* Issue #1677: Unused variable warning in Non-WindowsJesus Cea2012-07-031-0/+3
|
* Backed out changeset 7ccc2cea6969Jesus Cea2012-07-031-3/+0
|
* Issue #1667: Unused variable warning in Non-WindowsJesus Cea2012-07-031-0/+3
|
* Issue #1677: Handle better a race condition between the interactive ↵Tim Golden2012-06-291-23/+16
| | | | | | interpreter and the Ctrl-C signal handler on Windows
* allow None identifiersBenjamin Peterson2011-07-221-1/+1
|
* verify the types of AST strings and identifiers (closes #12609 and #12610)Benjamin Peterson2011-07-221-2/+19
|
* hardcode the old svn __version__Benjamin Peterson2011-07-221-5/+3
|
* Issue #12016: my_fgets() now always clears errors before calling fgets(). FixVictor Stinner2011-05-301-0/+1
| | | | | the following case: sys.stdin.read() stopped with CTRL+d (end of file), raw_input() interrupted by CTRL+c.
* (Merge 3.1) Issue #1195: Fix input() if it is interrupted by CTRL+d and thenVictor Stinner2011-05-101-0/+1
| | | | CTRL+c, clear the end-of-file indicator after CTRL+d.
* (Merge 3.1) Issue #11650: PyOS_StdioReadline() retries fgets() if it wasVictor Stinner2011-04-091-45/+49
| | | | | interrupted (EINTR), for example if the program is stopped with CTRL+z on Mac OS X. Patch written by Charles-Francois Natali.
* Issue #9020: The Py_IS* macros from pyctype.h should generally only beStefan Krah2010-06-241-1/+1
| | | | | used with signed/unsigned char arguments. For integer arguments, EOF has to be handled separately.
* spacing nit; this isn't CBenjamin Peterson2010-06-221-1/+1
|
* fix code formattingBenjamin Peterson2010-06-091-2/+3
|
* Doc Fix. Correct link to Zephyr ASDL Abstract page.Senthil Kumaran2010-05-181-1/+1
|
* Use 4-spaces for indentation (instead of tabs) in pgen outputsVictor Stinner2010-05-151-10/+10
| | | | Regenerate (reindent) Python/graminit.c
* Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-0917-3286/+3286
|
* use our own locale independent ctype macrosBenjamin Peterson2010-04-031-19/+3
| | | | requires building pyctype.o into pgen
* ensure that the locale does not affect the tokenization of identifiersBenjamin Peterson2010-04-031-4/+18
|
* Issue #3137: Don't ignore errors at startup, especially a keyboard interruptVictor Stinner2010-03-101-1/+5
| | | | | | (SIGINT). If an error occurs while importing the site module, the error is printed and Python exits. Initialize the GIL before importing the site module.
* Issue #7820: The parser tokenizer restores all bytes in the right if the BOMVictor Stinner2010-03-021-22/+32
| | | | | | check fails. Fix an assertion in pydebug mode.
* #2560: remove an unnecessary 'for' loop from my_fgets() in Parser/myreadline.c.Andrew M. Kuchling2010-02-221-48/+45
| | | | | | | | | | | Noted by Joseph Armbruster; patch by Jessica McKellar. The original code was 'for (;;) {...}', where ... ended with a 'return -2' statement and did not contain a 'break' or 'continue' statement. Therefore, the body of the loop is always executed once. Once upon a time there was a 'continue' in the loop, but it was removed in rev36346, committed by mwh on Wed Jul 7 17:44:12 2004.