home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / DC-POS24.LZX / pOS / IncPOS.lzx / pDOS / Parsing.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-18  |  1.8 KB  |  61 lines

  1. #ifndef __INC_POS_PDOS_PARSING_H
  2. #define __INC_POS_PDOS_PARSING_H
  3. /*******************************************************************
  4.  Includes Release 24
  5.  (C) Copyright 1995-1997 proDAD
  6.      All Rights Reserved
  7.  
  8.  $AUT Holger Burkarth
  9.  $DAT >>Parsing.h<<   31 Jul 1996    09:12:46 - (C) ProDAD
  10. *******************************************************************/
  11. #ifndef __INC_POS_PDOS_DOSTYPES_H
  12. #include <pDOS/DosTypes.h>
  13. #endif
  14. #ifndef __INC_POS_PEXEC_MEMORY_H
  15. #include <pExec/Memory.h>
  16. #endif
  17.  
  18.  
  19. /*----------------------------------
  20. -----------------------------------*/
  21. struct pOS_Parse
  22. {
  23.   struct pOS_MemPool       ptmt_MemPool;    /* Handler private */
  24.   struct pOS_ParseObject **ptmt_StackLower;
  25.   struct pOS_ParseObject **ptmt_StackUpper;
  26.   struct pOS_ParseObject **ptmt_Stack;
  27.   SWORD                    ptmt_Error;
  28.   UBYTE                    ptmt_ActChar;     /* Handler private */
  29.   UBYTE                    ptmt_Pri;
  30.   const CHAR              *ptmt_String;      /* Handler private */
  31.   ULONG                    ptmt_UserData[2];
  32.  
  33.   struct pOS_ParseObject *(*ptmt_Parse)(struct pOS_Parse*,UBYTE priLevel);
  34.  
  35.   UBYTE ptmt_Reserved[16];
  36. };
  37.  
  38.  
  39. /*----------------------------------
  40. -----------------------------------*/
  41. struct pOS_ParseObject
  42. {
  43.   struct pOS_ParseObject *ptob_Left;
  44.   struct pOS_ParseObject *ptob_Right;
  45.   struct pOS_ParseObject *ptob_Parent;
  46. };
  47.  
  48.  
  49. VOID pOS_PUSHPARSESTK(struct pOS_Parse*,struct pOS_ParseObject*);
  50. struct pOS_ParseObject* pOS_POPPARSESTK(struct pOS_Parse*);
  51. BOOL pOS_EMPTYPARSESTK(struct pOS_Parse*);
  52. BOOL pOS_FULLPARSESTK(struct pOS_Parse*);
  53.  
  54. #define pOS_PUSHPARSESTK(parse,nd)  ( *--(parse)->ptmt_Stack=nd )
  55. #define pOS_POPPARSESTK(parse)      ( *(parse)->ptmt_Stack++ )
  56. #define pOS_EMPTYPARSESTK(parse)    ( (parse)->ptmt_Stack[0]==NULL )
  57. #define pOS_FULLPARSESTK(parse)     ( (ULONG)(parse)->ptmt_Stack<=(ULONG)(parse)->ptmt_StackLower )
  58.  
  59.  
  60. #endif
  61.