summaryrefslogtreecommitdiffstats
path: root/Parser
Commit message (Collapse)AuthorAgeFilesLines
* Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis2003-05-101-0/+4
| | | | riscospath.extsep, and use os.extsep throughout.
* Patch #708495: Port more stuff to OpenVMS.Martin v. Löwis2003-05-031-0/+8
|
* Remove file that was moved to ../IncludeGuido van Rossum2003-04-291-18/+0
|
* Changes from Jonathan Riehl to allow his pgen extension (PEP 269) toGuido van Rossum2003-04-173-5/+34
| | | | | | work. This includes some more code that used to be part of pgen in the main parser; I'm okay with that. I'll see if the Windows build needs work next.
* compile_atom(): Neal's last checkin removing the setting of i brokeBarry Warsaw2003-02-281-0/+3
| | | | | | the build, so I'm restoring it. I'm not sure what Neal's intent was, since the line following the one he removed was "REQN(i, 1)" so i is obviously used. ;)
* Remove setting i since it isn't used. Found in unrelated bug 690012.Neal Norwitz2003-02-281-3/+0
|
* Add URL for PEP to the source code encoding warning.Marc-André Lemburg2003-02-171-6/+12
| | | | | | Remove the usage of PyErr_WarnExplicit() since this could cause sensitive information from the source files to appear in e.g. log files.
* - 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.)
* patch 680474 that fixes bug 679880: compile/eval/exec refused utf-8 bomJust van Rossum2003-02-091-2/+2
| | | | mark. Added unit test.
* Fix [ 665014 ] files with long lines and an encoding crash.Mark Hammond2003-01-141-1/+2
| | | | | Ensure that the 'size' arg is correctly passed to the encoding reader to prevent buffer overflows.
* Constify filenames and scripts. Fixes #651362.Martin v. Löwis2002-12-113-12/+14
|
* Fix compiler warning on HP-UX.Neal Norwitz2002-11-021-2/+2
| | | | Cast param to isalnum() to int.
* Change PyOS_Readline declaration to match the recent change to myreadline.cSkip Montanaro2002-10-271-2/+2
| | | | | | (see Patch 512981). I changed stdin to sys_stdin in the body of the function, but did not change stderr to sys_stdout, though I suspect that may be the correct course. I don't know the code involved well enough to judge.
* Patch #512981: Update readline input stream on sys.stdin/out change.Martin v. Löwis2002-10-262-10/+22
|
* Removed reliance on gcc/C99 extension.Tim Peters2002-09-031-1/+3
|
* Ignore encoding declarations inside strings. Fixes #603509.Martin v. Löwis2002-09-032-1/+17
|
* Squash a few calls to the hideously expensive PyObject_CallObject(o,a)Guido van Rossum2002-08-161-3/+14
| | | | | | | -- replace then with slightly faster PyObject_Call(o,a,NULL). (The difference is that the latter requires a to be a tuple; the former allows other values and wraps them in a tuple if necessary; it involves two more levels of C function calls to accomplish all that.)
* provide less mysterious error messages when seeing end-of-line inSkip Montanaro2002-08-151-3/+6
| | | | | single-quoted strings or end-of-file in triple-quoted strings. closes patch 586561.
* Use Py_FatalError instead of abort.Martin v. Löwis2002-08-071-2/+3
|
* Fix PEP 263 code --without-unicode. Fixes #591943.Martin v. Löwis2002-08-071-0/+18
|
* Added a cast to shut up a compiler warning.Jack Jansen2002-08-051-1/+1
|
* Add 1 to lineno in deprecation warning. Fixes #590888.Martin v. Löwis2002-08-051-1/+3
|
* Make pgen compile with pydebug. Duplicate normalized names, as it mayMartin v. Löwis2002-08-042-2/+8
| | | | be longer than the old string.
* Group statements properly.Martin v. Löwis2002-08-041-6/+12
|
* Repaired a fatal compiler error in the debug build: it's not clear whatTim Peters2002-08-041-1/+1
| | | | this was trying to assert, but the name it referenced didn't exist.
* Squash compiler wng about signed-vs-unsigned mismatch.Tim Peters2002-08-041-1/+1
|
* Patch #534304: Implement phase 1 of PEP 263.Martin v. Löwis2002-08-044-10/+463
|
* SF patch #578297:Andrew MacIntyre2002-08-043-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* XXXROUNDUP(): Turns out this fixed Andrew MacIntyre's memory-mgmtTim Peters2002-07-151-10/+33
| | | | | | | | | | disaster too, so this change is here to stay. Beefed up the comments and added some stats Andrew reported. Also a small change to the macro body, to make it obvious how XXXROUNDUP(0) ends up returning 0. See SF patch 578297 for context. Not a bugfix candidate, as the functional changes here have already been backported to the 2.2 line (this patch just improves clarity).
* Fix bug 439992 - [win32] KeyboardInterrupt Not Caught.Mark Hammond2002-07-141-0/+33
| | | | This gets us closer to consistent Ctrl+C behaviour on NT and Win9x. NT now reliably generates KeyboardInterrupt exceptions for NT when a file IO operation was aborted. Bugfix candidate
* I trust the parser accelators are getting added :-).Jeremy Hylton2002-07-111-6/+0
|
* Fix SF Bug 564931: compile() traceback must include filename.Thomas Heller2002-07-091-2/+11
|
* The Py_REF_DEBUG/COUNT_ALLOCS/Py_TRACE_REFS macro minefield: addedTim Peters2002-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | more trivial lexical helper macros so that uses of these guys expand to nothing at all when they're not enabled. This should help sub- standard compilers that can't do a good job of optimizing away the previous "(void)0" expressions. Py_DECREF: There's only one definition of this now. Yay! That was that last one in the family defined multiple times in an #ifdef maze. Py_FatalError(): Changed the char* signature to const char*. _Py_NegativeRefcount(): New helper function for the Py_REF_DEBUG expansion of Py_DECREF. Calling an external function cuts down on the volume of generated code. The previous inline expansion of abort() didn't work as intended on Windows (the program often kept going, and the error msg scrolled off the screen unseen). _Py_NegativeRefcount calls Py_FatalError instead, which captures our best knowledge of how to abort effectively across platforms.
* PyNode_AddChild() and fancy_roundup(): Be paranoid about int overflow.Tim Peters2002-07-081-2/+7
|
* PyNode_AddChild(): Do aggressive over-allocation when the number ofTim Peters2002-07-081-8/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | children gets large, to avoid severe platform realloc() degeneration in extreme cases (like test_longexp). Bugfix candidate. This was doing extremely timid over-allocation, just rounding up to the nearest multiple of 3. Now so long as the number of children is <= 128, it rounds up to a multiple of 4 but via a much faster method. When the number of children exceeds 128, though, and more space is needed, it doubles the capacity. This is aggressive over-allocation. SF patch <http://www.python.org/sf/578297> has Andrew MacIntyre using PyMalloc in the parser to overcome platform malloc problems in test_longexp on OS/2 EMX. Jack Jansen notes there that it didn't help him on the Mac, because the Mac has problems with frequent ever-growing reallocs, not just with gazillions of teensy mallocs. Win98 has no visible problems with test_longexp, but I tried boosting the test-case size and soon got "senseless" MemoryErrors out of it, and soon after crashed the OS: as I've seen in many other contexts before, while the Win98 realloc remains zippy in bad cases, it leads to extreme fragmentation of user address space, to the point that the OS barfs. I don't yet know whether this fixes Jack's Mac problems, but it does cure Win98's problems when boosting the test case size. It also speeds test_longexp in its unaltered state.
* Add definition of Py_IgnoreEnvironmentFlag (needed at least in debugGuido van Rossum2002-05-311-0/+1
| | | | mode).
* Py_IgnoreEnvironmentFlag should be extern, since it is declared in pythonrun.cNeal Norwitz2002-05-311-1/+1
|
* Link with the right C library! This has always been wrong (& my fault).Tim Peters2002-05-231-1/+1
|
* Py_GETENV is used by obmalloc and needs Py_IgnoreEnvironmentFlag. Provide it.Neil Schemenauer2002-04-221-0/+1
|
* Update the Windows makefile for 2.3.Tim Peters2002-04-221-3/+3
|
* Mass checkin of universal newline support.Jack Jansen2002-04-142-4/+16
| | | | | | | | Highlights: import and friends will understand any of \r, \n and \r\n as end of line. Python file input will do the same if you use mode 'U'. Everything can be disabled by configuring with --without-universal-newlines. See PEP278 for details.
* Disable the parser hacks that enabled the "yield" keyword using a futureNeil Schemenauer2002-03-222-0/+8
| | | | statement.
* Disable the parser hacks that allowed the "yield" keyword to be enabledNeil Schemenauer2002-03-221-0/+10
| | | | by a future statement.
* Include <unistd.h> in Python.h. Fixes #500924.Martin v. Löwis2002-01-121-3/+0
|
* Initialize err_ret with filename if available. Fixes #498828.Martin v. Löwis2002-01-051-5/+5
|
* PyGrammar_LabelRepr(): sprintf -> PyOS_snprintf.Tim Peters2001-12-041-2/+2
|
* The parser doesn't need its own implementation of assert, and having itsTim Peters2001-12-045-23/+4
| | | | own interfered with including Python.h. Remove Python's assert.h.
* Reverting last change so we don't have to think about the assert macroBarry Warsaw2001-11-281-5/+4
| | | | redefinition problem.
* PyGrammar_LabelRepr(): Conversion of sprintf() to PyOS_snprintf() forBarry Warsaw2001-11-281-4/+5
| | | | buffer overrun avoidance.
* 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.