+/* Possible results from a parse. */
+enum {
+ T_OK, /* Successful: results returned */
+ T_EOL, /* End-of-line found immediately */
+ T_ERROR, /* Some kind of error occurred */
+ T_EOF /* End-of-file found immediately */
+};
+
+/* A context for parsing a policy file. */
+struct policy_file {
+ FILE *fp; /* The file to read from */
+ const struct query *q; /* A query to use for logging */
+ const char *name; /* The name of the file */
+ const char *what; /* A description of the file */
+ int err; /* Have there been any errors? */
+ int lno; /* The current line number */
+ struct policy p; /* Parsed policy rule goes here */
+};