4 * Ullrich von Bassewitz, 20.06.1998
19 /*****************************************************************************/
21 /*****************************************************************************/
25 /* Masks for the Flags field in DeclSpec */
26 #define DS_DEF_STORAGE 0x0001U /* Default storage class used */
27 #define DS_DEF_TYPE 0x0002U /* Default type used */
28 #define DS_EXTRA_TYPE 0x0004U /* Extra type declared */
30 /* Result of ParseDeclSpec */
31 typedef struct DeclSpec DeclSpec;
33 unsigned StorageClass; /* One of the SC_xxx flags */
34 type Type [MAXTYPELEN]; /* Type of the declaration spec */
35 unsigned Flags; /* Bitmapped flags */
38 /* Result of ParseDecl */
39 typedef struct Declaration Declaration;
41 ident Ident; /* The identifier if any, else empty */
42 type Type [MAXTYPELEN]; /* The type */
44 /* Working variables */
45 type* T; /* Used to build Type */
48 /* Modes for ParseDecl */
49 #define DM_NEED_IDENT 0U /* We must have an identifier */
50 #define DM_NO_IDENT 1U /* We won't read an identifier */
51 #define DM_ACCEPT_IDENT 2U /* We will accept an id if there is one */
55 /*****************************************************************************/
57 /*****************************************************************************/
61 type* ParseType (type* Type);
62 /* Parse a complete type specification */
64 void ParseDecl (const DeclSpec* Spec, Declaration* D, unsigned Mode);
65 /* Parse a variable, type or function declaration */
67 void ParseDeclSpec (DeclSpec* D, unsigned DefStorage, int DefType);
68 /* Parse a declaration specification */
70 void CheckEmptyDecl (const DeclSpec* D);
71 /* Called after an empty type declaration (that is, a type declaration without
72 * a variable). Checks if the declaration does really make sense and issues a
76 void ParseInit (type* tptr);
77 /* Parse initialization of variables. */
81 /* End of declare.h */