summaryrefslogtreecommitdiffstats
path: root/Parser/parsetok.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Pass the flags along, rather than ignoring them. Backport candidateNeal Norwitz2004-07-081-1/+1
|
* - Finally fixed the bug in compile() and exec where a string endingGuido van Rossum2003-02-131-0/+9
| | | | | | | | | with an indented code block but no newline would raise SyntaxError. This would have been a four-line change in parsetok.c... Except codeop.py depends on this behavior, so a compilation flag had to be invented that causes the tokenizer to revert to the old behavior; this required extra changes to 2 .h files, 2 .c files, and 2 .py files. (Fixes SF bug #501622.)
* Constify filenames and scripts. Fixes #651362.Martin v. Löwis2002-12-111-7/+7
|
* Patch #534304: Implement phase 1 of PEP 263.Martin v. Löwis2002-08-041-2/+10
|
* SF patch #578297:Andrew MacIntyre2002-08-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the parser and compiler to use PyMalloc. Only the files implementing processes that will request memory allocations small enough for PyMalloc to be a win have been changed, which are:- - Python/compile.c - Parser/acceler.c - Parser/node.c - Parser/parsetok.c This augments the aggressive overallocation strategy implemented by Tim Peters in PyNode_AddChild() [Parser/node.c], in reducing the impact of platform malloc()/realloc()/free() corner case behaviour. Such corner cases are known to be triggered by test_longexp and test_import. Jeremy Hylton, in accepting this patch, recommended this as a bugfix candidate for 2.2. While the changes to Python/compile.c and Parser/node.c backport easily (and could go in), the changes to Parser/acceler.c and Parser/parsetok.c require other not insignificant changes as a result of the differences in the memory APIs between 2.3 and 2.2, which I'm not in a position to work through at the moment. This is a pity, as the Parser/parsetok.c changes are the most important after the Parser/node.c changes, due to the size of the memory requests involved and their frequency.
* Fix SF Bug 564931: compile() traceback must include filename.Thomas Heller2002-07-091-2/+11
|
* Disable the parser hacks that enabled the "yield" keyword using a futureNeil Schemenauer2002-03-221-0/+6
| | | | statement.
* Initialize err_ret with filename if available. Fixes #498828.Martin v. Löwis2002-01-051-5/+5
|
* Patch from SF bug #472956: UMR when there is a syntax error (Neal Norwitz)Guido van Rossum2001-10-201-12/+15
| | | | | perrdetail.token is unitialized when there is a syntax error in a file.
* Add a really stupid warning about 'yield' used as an identifier.Guido van Rossum2001-07-171-0/+12
| | | | | | | | | | | | | | | This is really stupid because it cannot be suppressed or altered using the warning framework; that's because the warning framework is built on Python interpreter internals, and the parser generator doesn't have access to any of those (you cannot use anything of type PyObject * in the parser). But it's better than nothing, and implementing a proper check for this appears to require modifying compile.c in a dozen places, for which I don't have the stamina today. I promise we'll do better in 2.2a2. At least it tells you the filename and line number (unlike the first hack I considered :-).
* Ugly. A pile of new xxxFlags() functions, to communicate to the parserTim Peters2001-07-161-5/+22
| | | | | | | | | | | | | | | | | | | | | | | that 'yield' is a keyword. This doesn't help test_generators at all! I don't know why not. These things do work now (and didn't before this patch): 1. "from __future__ import generators" now works in a native shell. 2. Similarly "python -i xxx.py" now has generators enabled in the shell if xxx.py had them enabled. 3. This program (which was my doctest proxy) works fine: from __future__ import generators source = """\ def f(): yield 1 """ exec compile(source, "", "single") in globals() print type(f())
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* PyParser_ParseString(): When the err_ret structure is initialized, theBarry Warsaw2000-08-181-0/+2
| | | | | | fields token and expected must also be initialized, otherwise the tests in parsetok() can generate uninitialized memory read errors. This quiets an Insure warning.
* Mass ANSIfication.Thomas Wouters2000-07-221-17/+4
| | | | | | Work around intrcheck.c's desire to pass 'PyErr_CheckSignals' to 'Py_AddPendingCall' by providing a (static) wrapper function that has the right number of arguments.
* Create two new exceptions: IndentationError and TabError. These areFred Drake2000-07-111-2/+2
| | | | | | | used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856.
* Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters2000-07-091-2/+1
|
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Trent Mick: familiar simple Win64 patchesGuido van Rossum2000-06-281-2/+2
|
* Jack Jansen: Removed Macintosh tab-guessing codeGuido van Rossum2000-06-281-7/+0
|
* Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum2000-05-031-1/+1
| | | | | | | | | | For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
* Make sure that -t and -tt also work on strings passed to compile().Guido van Rossum1998-12-211-0/+7
|
* Declare and use Py_TabcheckFlag here.Guido van Rossum1998-04-101-0/+8
|
* Finally plug the memory leak caused by syntax error (includingGuido van Rossum1997-07-271-1/+4
| | | | interactive EOF, which leaked *one* byte).
* Another directory quickly renamed.Guido van Rossum1997-04-291-11/+12
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* fix strncpy call (uninitialized memory read)Guido van Rossum1995-01-201-1/+2
|
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
|
* don't call strncpy(str, NULL, 0)Guido van Rossum1994-08-291-81/+79
|
* * Changed many files to use mkvalue() instead of newtupleobject().Guido van Rossum1993-03-161-4/+7
| | | | | | | | | | * Fixcprt.py: added [-y file] option, do only files younger than file. * modsupport.[ch]: added vmkvalue(). * intobject.c: use mkvalue(). * stringobject.c: added "formatstring"; renamed string* to string_*; ceval.c: call formatstring for string % value. * longobject.c: close memory leak in divmod. * parsetok.c: set result node to NULL when returning an error.
* Copyright for 1992 addedGuido van Rossum1992-04-051-1/+1
|
* Guess tab size on the Mac from tab resource.Guido van Rossum1992-03-251-0/+7
|
* Append a NEWLINE token at the end of a file.Guido van Rossum1992-03-041-0/+7
|
* When printing an error message, don't choke if tok->buf is NULL.Guido van Rossum1991-06-071-10/+14
|
* Don't print the line number for syntax errors in string parsing.Guido van Rossum1991-06-031-0/+3
|
* Added copyright notice.Guido van Rossum1991-02-191-0/+24
|
* "Compiling" versionGuido van Rossum1990-12-201-63/+65
|
* Set parse tree in parser data structure to NULL when returningGuido van Rossum1990-11-181-3/+4
| | | | a valid parse tree to caller, so caller must free the tree.
* Initial revisionGuido van Rossum1990-10-141-0/+131