summaryrefslogtreecommitdiff
path: root/Parser
AgeCommit message (Collapse)AuthorLines
2002-10-07Backport 2.27:Raymond Hettinger-0/+33
Fix bug 439992 - [win32] KeyboardInterrupt Not Caught. 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
2002-07-08PyNode_AddChild(): Backporting an aggressive over-allocation policyTim Peters-8/+46
when a parse node grows a very large number of children. This sidesteps platform realloc() disasters on several platforms.
2002-01-12Include <unistd.h> in Python.h. Fixes #500924.Martin v. Löwis-3/+0
2002-01-05Initialize err_ret with filename if available. Fixes #498828.Martin v. Löwis-5/+5
2001-12-04PyGrammar_LabelRepr(): sprintf -> PyOS_snprintf.Tim Peters-2/+2
2001-12-04The parser doesn't need its own implementation of assert, and having itsTim Peters-23/+4
own interfered with including Python.h. Remove Python's assert.h.
2001-11-28Reverting last change so we don't have to think about the assert macroBarry Warsaw-5/+4
redefinition problem.
2001-11-28PyGrammar_LabelRepr(): Conversion of sprintf() to PyOS_snprintf() forBarry Warsaw-4/+5
buffer overrun avoidance.
2001-10-20Patch from SF bug #472956: UMR when there is a syntax error (Neal Norwitz)Guido van Rossum-12/+15
perrdetail.token is unitialized when there is a syntax error in a file.
2001-10-13An MSVC makefile to rebuild the grammar files (graminit.[ch]) manually.Tim Peters-0/+42
Ugly, but it works.
2001-09-11Silence parser generator output.Guido van Rossum-7/+11
2001-08-30SF patch #455966: Allow leading 0 in float/imag literals.Tim Peters-3/+22
Consequences for Jython still unknown (but raised on Jython-Dev).
2001-08-27SF bug [#455775] float parsing discrepancy.Tim Peters-5/+8
PyTokenizer_Get: error if exponent contains no digits (3e, 2.0e+, ...).
2001-08-08Implement PEP 238 in its (almost) full glory.Guido van Rossum-0/+13
This introduces: - A new operator // that means floor division (the kind of division where 1/2 is 0). - The "future division" statement ("from __future__ import division) which changes the meaning of the / operator to implement "true division" (where 1/2 is 0.5). - New overloadable operators __truediv__ and __floordiv__. - New slots in the PyNumberMethods struct for true and floor division, new abstract APIs for them, new opcodes, and so on. I emphasize that without the future division statement, the semantics of / will remain unchanged until Python 3.0. Not yet implemented are warnings (default off) when / is used with int or long arguments. This has been on display since 7/31 as SF patch #443474. Flames to /dev/null.
2001-07-19Fis SF bug #442647: not all forms of legal future statements wereGuido van Rossum-3/+9
parsed correctly. Now they are.
2001-07-17Add a really stupid warning about 'yield' used as an identifier.Guido van Rossum-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 :-).
2001-07-16Ugly. A pile of new xxxFlags() functions, to communicate to the parserTim Peters-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())
2001-07-15Preliminary support for "from __future__ import generators" to enableGuido van Rossum-3/+36
the yield statement. I figure we have to have this in before I can release 2.2a1 on Wednesday. Note: test_generators is currently broken, I'm counting on Tim to fix this.
2001-04-21SF but #417587: compiler warnings compiling 2.1.Tim Peters-3/+0
Repaired *some* of the SGI compiler warnings Sjoerd Mullender reported.
2001-03-02RISCOS changes by dschwertberger.Guido van Rossum-0/+17
2001-02-16Take output filenames as arguments instead of hard-coding them.Neil Schemenauer-9/+14
2001-02-03Superseded by $(srcdir)/Makefile.pre.in.Neil Schemenauer-103/+0
2000-10-02Fix a bug in stack overflow error handling. This fixes half of BugGuido van Rossum-1/+1
#115555. The error from s_push() on stack overflow was -1, which was passed through unchanged by push(), but not tested for by push()'s caller -- which only expected positive error codes. Fixed by changing s_push() to return E_NOMEM on stack overflow. (Not quite the proper error code either, but I can't be bothered adding a new E_STACKOVERFLOW error code in all the right places.)
2000-09-26More limits.h stuff in node.c.Tim Peters-9/+1
Fred, check this!
2000-09-26Rationalize use of limits.h, moving the inclusion to Python.h.Fred Drake-3/+0
Add definitions of INT_MAX and LONG_MAX to pyport.h. Remove includes of limits.h and conditional definitions of INT_MAX and LONG_MAX elsewhere. This closes SourceForge patch #101659 and bug #115323.
2000-09-03Move down the INT_MAX logic, because HAVE_LIMITS_H was always undefinedVladimir Marangozov-6/+6
and this breaks the AIX build with an INT_MAX redefinition error. "config.h" is included in pgenheaders.h, so moving this down fixes the problem.
2000-09-01REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum-180/+0
This should match the situation in the 1.6b1 tree.
2000-08-31Added a little more dependency information.Fred Drake-1/+1
2000-08-27Charles Waldman's patch to reinitialize the interpreter lock after aGuido van Rossum-0/+3
fork. This solves the test_fork1 problem. (ceval.c, signalmodule.c, intrcheck.c) SourceForge: [ Patch #101226 ] make threading fork-safe
2000-08-24Support for three-token characters (**=, >>=, <<=) which was written byThomas Wouters-0/+106
Michael Hudson, and support in general for the augmented assignment syntax. The graminit.c patch is large!
2000-08-24Charles G. Waldman <cgw@fnal.gov>:Fred Drake-1/+6
Add the EXTENDED_ARG opcode to the virtual machine, allowing 32-bit arguments to opcodes instead of being forced to stick to the 16-bit limit. This is especially useful for machine-generated code, which can be too long for the SET_LINENO parameter to fit into 16 bits. This closes the implementation portion of SourceForge patch #100893.
2000-08-23Simplified inclusions and avoid prototypes copied in from elsewhere.Fred Drake-12/+1
This also avoids a warning in anal mode.
2000-08-18PyParser_ParseString(): When the err_ret structure is initialized, theBarry Warsaw-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.
2000-07-31merge Include/my*.h into Include/pyport.hPeter Schneider-Kamp-1/+0
marked my*.h as obsolete
2000-07-25Use 'void' directly instead of the ANY #define, now that all code is ANSI C.Thomas Wouters-2/+1
Leave the actual #define in for API compatibility.
2000-07-23Removed all instances of RETSIGTYPE from the source code: signalTim Peters-3/+2
handlers "return void", according to ANSI C. Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro. Left RETSIGTYPE in the config stuff, because it's not clear to me that others aren't relying on it (e.g., extension modules).
2000-07-23Recent ANSIfication introduced a couple instances ofTim Peters-3/+1
#if RETSIGTYPE != void That isn't C, and MSVC properly refuses to compile it. Introduced new Py_RETURN_FROM_SIGNAL_HANDLER macro in pyport.h to expand to the correct thing based on RETSIGTYPE. However, only void is ANSI! Do we still have platforms that return int? The Unix config mess appears to #define RETSIGTYPE by magic without being asked to, so I assume it's "a problem" across Unices still.
2000-07-22Remember to return something if RETSIGTYPE is not 'void'. Do we still needThomas Wouters-0/+3
to worry about systems that have signal-handlers return 'int' ? Not all of the code does, though nothing will break because of it.
2000-07-22Mass ANSIfication.Thomas Wouters-330/+123
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.
2000-07-16Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters-1/+1
comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
2000-07-11Create two new exceptions: IndentationError and TabError. These areFred Drake-13/+20
used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856.
2000-07-09Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters-54/+51
2000-07-03Include limits.h if we have it.Jack Jansen-0/+3
2000-06-30Change copyright notice - 2nd try.Guido van Rossum-120/+0
2000-06-30Change copyright notice.Guido van Rossum-420/+120
2000-06-28Trent Mick: familiar simple Win64 patchesGuido van Rossum-11/+14
2000-06-28Jack Jansen: Removed Macintosh tab-guessing codeGuido van Rossum-7/+0
2000-06-20Add new parser error code, E_OVERFLOW. This error is returned whenJeremy Hylton-17/+23
the number of children of a node exceeds the max possible value for the short that is used to count them. The Python runtime converts this parser error into the SyntaxError "expression too long."
2000-05-03Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum-15/+18
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.)
2000-05-02Ignore a bunch of generated files.Barry Warsaw-0/+3