[Python-checkins] CVS: python/dist/src/Include errcode.h,2.11,2.12 parsetok.h,2.13,2.14

Fred L. Drake python-dev@python.org
Tue, 11 Jul 2000 10:53:03 -0700


Update of /cvsroot/python/python/dist/src/Include
In directory slayer.i.sourceforge.net:/tmp/cvs-serv7915/Include

Modified Files:
	errcode.h parsetok.h 
Log Message:

Create two new exceptions:  IndentationError and TabError.  These are
used for indentation related errors.  This patch includes Ping's
improvements for indentation-related error messages.

Closes SourceForge patches #100734 and #100856.


Index: errcode.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/errcode.h,v
retrieving revision 2.11
retrieving revision 2.12
diff -C2 -r2.11 -r2.12
*** errcode.h	2000/06/30 23:58:04	2.11
--- errcode.h	2000/07/11 17:52:59	2.12
***************
*** 31,36 ****
  #define E_DONE		16	/* Parsing complete */
  #define E_ERROR		17	/* Execution error */
! #define E_INDENT	18	/* Invalid indentation detected */
! #define E_OVERFLOW      19      /* Node had too many children */
  
  #ifdef __cplusplus
--- 31,38 ----
  #define E_DONE		16	/* Parsing complete */
  #define E_ERROR		17	/* Execution error */
! #define E_TABSPACE	18	/* Invalid indentation detected */
! #define E_OVERFLOW      19	/* Node had too many children */
! #define E_TOODEEP	20	/* Too many indentation levels */
! #define E_DEDENT	21	/* No matching outer block for dedent */
  
  #ifdef __cplusplus

Index: parsetok.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/parsetok.h,v
retrieving revision 2.13
retrieving revision 2.14
diff -C2 -r2.13 -r2.14
*** parsetok.h	2000/07/08 23:37:28	2.13
--- parsetok.h	2000/07/11 17:52:59	2.14
***************
*** 23,26 ****
--- 23,28 ----
      int offset;
      char *text;
+     int token;
+     int expected;
  } perrdetail;