summaryrefslogtreecommitdiffstats
path: root/Parser
Commit message (Collapse)AuthorAgeFilesLines
* Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-1/+1
|
* Issue #26581: Use the first coding cookie on a line, not the last one.Serhiy Storchaka2016-03-201-0/+1
|
* Issue #20440: Massive replacing unsafe attribute setting code with specialSerhiy Storchaka2015-12-241-2/+1
| | | | macro Py_SETREF.
* Issue #25388: Fixed tokenizer crash when processing undecodable source codeSerhiy Storchaka2015-11-141-8/+6
|\ | | | | | | with a null byte.
| * Issue #25388: Fixed tokenizer crash when processing undecodable source codeSerhiy Storchaka2015-11-141-8/+6
| | | | | | | | with a null byte.
* | Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node whenVictor Stinner2015-11-061-2/+10
| | | | | | | | compiling AST from Python objects.
* | remove duplicated imports (closes #25502)Benjamin Peterson2015-10-291-1/+0
| |
* | Issue #24619: Simplify async/await tokenization.Yury Selivanov2015-07-232-102/+45
| | | | | | | | | | | | | | | | | | | | This commit simplifies async/await tokenization in tokenizer.c, tokenize.py & lib2to3/tokenize.py. Previous solution was to keep a stack of async-def & def blocks, whereas the new approach is just to remember position of the outermost async-def block. This change won't bring any parsing performance improvements, but it makes the code much easier to read and validate.
* | Issue #24619: New approach for tokenizing async/await.Yury Selivanov2015-07-222-41/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes how one-line async-defs and defs are tracked by tokenizer. It allows to correctly parse invalid code such as: >>> async def f(): ... def g(): pass ... async = 10 and valid code such as: >>> async def f(): ... async def g(): pass ... await z As a consequence, is is now possible to have one-line 'async def foo(): await ..' functions: >>> async def foo(): return await bar()
* | Issue 24226: Fix parsing of many sequential one-line 'def' statements.Yury Selivanov2015-05-181-8/+17
| |
* | PEP 0492 -- Coroutines with async and await syntax. Issue #24017.Yury Selivanov2015-05-123-1/+82
| |
* | PEP 448: additional unpacking generalizations (closes #2292)Benjamin Peterson2015-05-061-6/+3
| | | | | | | | Patch by Neil Girdhar.
* | merge 3.4 (#24022)Benjamin Peterson2015-04-211-4/+3
|\ \ | |/
| * do not call into python api if an exception is set (#24022)Benjamin Peterson2015-04-211-4/+3
| |
* | Removed trailing whitespaces in miscalenous files.Serhiy Storchaka2015-04-031-8/+8
| |
* | Got rid of warnings "suggest braces around empty body in an ‘else’ ↵Serhiy Storchaka2015-04-031-2/+3
| | | | | | | | | | | | statement" in Parser/pgen.c.
* | Issue #22823: Use set literals instead of creating a set from a listRaymond Hettinger2014-11-091-2/+1
| |
* | Silenced some warnings about comparison between signed and unsigned integerSerhiy Storchaka2014-09-053-7/+9
| | | | | | | | expressions.
* | Fix bootstrapping asdl -- it didn't work with Python 2.7.Guido van Rossum2014-07-081-2/+2
| |
* | merge 3.4 (#21642)Benjamin Peterson2014-06-071-5/+14
|\ \ | |/
| * allow the keyword else immediately after (no space) an integer (closes #21642)Benjamin Peterson2014-06-071-5/+14
| |
* | Issue #19655: Replace the ASDL parser carried with CPythonEli Bendersky2014-05-103-1202/+289
| | | | | | | | | | | | | | | | The new parser does not rely on Spark (which is now removed from our repo), uses modern 3.x idioms and is significantly smaller and simpler. It generates exactly the same AST files (.h and .c), so in practice no builds should be affected.
* | PEP 465: a dedicated infix operator for matrix multiplication (closes #21176)Benjamin Peterson2014-04-102-2/+8
|/
* Merge with 3.3Martin v. Löwis2014-02-281-2/+12
|\
| * Issue #20731: Properly position in source code files even if theyMartin v. Löwis2014-02-281-2/+12
| | | | | | | | are opened in text mode. Patch by Serhiy Storchaka.
* | merge 3.3 (#20588)Benjamin Peterson2014-02-111-2/+6
|\ \ | |/
| * don't put runtime values in array initializer for C89 compliance (closes #20588)Benjamin Peterson2014-02-111-2/+6
| |
* | Do not reset the line number because we already set file position to correctSerhiy Storchaka2014-01-091-8/+0
|\ \ | |/ | | | | | | | | value. (fixes error in patch for issue #18960)
| * Do not reset the line number because we already set file position to correctSerhiy Storchaka2014-01-091-8/+0
| | | | | | | | | | | | value. (fixes error in patch for issue #18960)
* | Issue #18960: Fix bugs with Python source code encoding in the second line.Serhiy Storchaka2014-01-091-4/+22
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The first line of Python script could be executed twice when the source encoding (not equal to 'utf-8') was specified on the second line. * Now the source encoding declaration on the second line isn't effective if the first line contains anything except a comment. * As a consequence, 'python -x' works now again with files with the source encoding declarations specified on the second file, and can be used again to make Python batch files on Windows. * The tokenize module now ignore the source encoding declaration on the second line if the first line contains anything except a comment. * 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 #18960: Fix bugs with Python source code encoding in the second line.Serhiy Storchaka2014-01-091-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The first line of Python script could be executed twice when the source encoding (not equal to 'utf-8') was specified on the second line. * Now the source encoding declaration on the second line isn't effective if the first line contains anything except a comment. * As a consequence, 'python -x' works now again with files with the source encoding declarations specified on the second file, and can be used again to make Python batch files on Windows. * The tokenize module now ignore the source encoding declaration on the second line if the first line contains anything except a comment. * 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 #16136: Remove VMS support and VMS-related codeChristian Heimes2013-12-211-8/+0
| |
* | upcast int to size_t to silence two ↵Christian Heimes2013-12-041-1/+1
| | | | | | | | autological-constant-out-of-range-compare warnings with clang.
* | Fix a compiler warning on Windows 64-bit in parsetok.cVictor Stinner2013-11-181-1/+2
| | | | | | | | Python parser doesn't support lines longer than INT_MAX bytes yet
* | Fix compiler warnings on Windows 64-bit in grammar.cVictor Stinner2013-11-181-2/+2
| | | | | | | | INT_MAX states and labels should be enough for everyone
* | Issue #1772673: The type of `char*` arguments now changed to `const char*`.Serhiy Storchaka2013-10-197-21/+25
| |
* | Issue #16742: My fix on PyOS_StdioReadline() was incomplete, PyMem_FREE() wasVictor Stinner2013-10-191-3/+3
| | | | | | | | not patched
* | Issue #4555: All exported C symbols are now prefixed with either "Py" or "_Py".Antoine Pitrou2013-10-121-2/+2
| | | | | | | | ("make smelly" now clean)
* | Close #16742: Fix misuse of memory allocations in PyOS_Readline()Victor Stinner2013-10-101-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GIL must be held to call PyMem_Malloc(), whereas PyOS_Readline() releases the GIL to read input. The result of the C callback PyOS_ReadlineFunctionPointer must now be a string allocated by PyMem_RawMalloc() or PyMem_RawRealloc() (or NULL if an error occurred), instead of a string allocated by PyMem_Malloc() or PyMem_Realloc(). Fixing this issue was required to setup a hook on PyMem_Malloc(), for example using the tracemalloc module. PyOS_Readline() copies the result of PyOS_ReadlineFunctionPointer() into a new buffer allocated by PyMem_Malloc(). So the public API of PyOS_Readline() does not change.
* | Move open outside try/finallyEli Bendersky2013-09-261-1/+1
| |
* | Don't use fancy new Python features like 'with' - some bots don't have themEli Bendersky2013-09-261-1/+4
| | | | | | | | and can't bootstrap the parser.
* | Normalize whitespaceEli Bendersky2013-09-261-1/+1
| |
* | Small fixes in Parser/asdl.py - no change in functionality.Eli Bendersky2013-09-261-4/+6
| | | | | | | | | | | | 1. Make it work when invoked directly from the command-line. It was failing due to a couple of stale function/class usages in the __main__ section. 2. Close the parsed file in the parse() function after opening it.
* | Issue #18571: Implementation of the PEP 446: file descriptors and file handlesVictor Stinner2013-08-271-0/+5
| | | | | | | | | | are now created non-inheritable; add functions os.get/set_inheritable(), os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
* | Close #11619: The parser and the import machinery do not encode UnicodeVictor Stinner2013-08-261-14/+65
| | | | | | | | filenames anymore on Windows.
* | #18803: merge with 3.3.Ezio Melotti2013-08-251-1/+1
|\ \ | |/
| * #18803: fix more typos. Patch by Févry Thibault.Ezio Melotti2013-08-251-1/+1
| |
* | Issue #18722: Remove uses of the "register" keyword in C code.Antoine Pitrou2013-08-134-27/+27
| |
* | Issue #18368: PyOS_StdioReadline() no longer leaks memory when realloc() fails.Christian Heimes2013-08-061-5/+17
|\ \ | |/
| * Issue #18368: PyOS_StdioReadline() no longer leaks memory when realloc() fails.Christian Heimes2013-08-061-5/+17
| |