Improved some error messages for command line processing.
[python/dscho.git] / Include / errcode.h
blob565578269afda362cb14c4aa9d6358a54c4d0eb3
1 #ifndef Py_ERRCODE_H
2 #define Py_ERRCODE_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
7 /***********************************************************
8 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
9 The Netherlands.
11 All Rights Reserved
13 Permission to use, copy, modify, and distribute this software and its
14 documentation for any purpose and without fee is hereby granted,
15 provided that the above copyright notice appear in all copies and that
16 both that copyright notice and this permission notice appear in
17 supporting documentation, and that the names of Stichting Mathematisch
18 Centrum or CWI or Corporation for National Research Initiatives or
19 CNRI not be used in advertising or publicity pertaining to
20 distribution of the software without specific, written prior
21 permission.
23 While CWI is the initial source for this software, a modified version
24 is made available by the Corporation for National Research Initiatives
25 (CNRI) at the Internet address ftp://ftp.python.org.
27 STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
28 REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
29 MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
30 CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
31 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
32 PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
33 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
34 PERFORMANCE OF THIS SOFTWARE.
36 ******************************************************************/
38 /* Error codes passed around between file input, tokenizer, parser and
39 interpreter. This is necessary so we can turn them into Python
40 exceptions at a higher level. Note that some errors have a
41 slightly different meaning when passed from the tokenizer to the
42 parser than when passed from the parser to the interpreter; e.g.
43 the parser only returns E_EOF when it hits EOF immediately, and it
44 never returns E_OK. */
46 #define E_OK 10 /* No error */
47 #define E_EOF 11 /* End Of File */
48 #define E_INTR 12 /* Interrupted */
49 #define E_TOKEN 13 /* Bad token */
50 #define E_SYNTAX 14 /* Syntax error */
51 #define E_NOMEM 15 /* Ran out of memory */
52 #define E_DONE 16 /* Parsing complete */
53 #define E_ERROR 17 /* Execution error */
54 #define E_INDENT 18 /* Invalid indentation detected */
56 #ifdef __cplusplus
58 #endif
59 #endif /* !Py_ERRCODE_H */