X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=secnet.git;a=blobdiff_plain;f=conffile_internal.h;h=44d0ac7d4ba7dcc864248e7805321fb4f9dc2be8;hp=4c2cb36bc6714776ddb16e3f380be7a375329d5d;hb=0a6cbadea08d824e26838a18bb75745c78f27461;hpb=ff05a229397c75142725f45cad191ce4a00625ce diff --git a/conffile_internal.h b/conffile_internal.h index 4c2cb36..44d0ac7 100644 --- a/conffile_internal.h +++ b/conffile_internal.h @@ -4,9 +4,7 @@ #include #include "secnet.h" -extern FILE *yyin; - -typedef string_t atom_t; +typedef cstring_t atom_t; /* Parse tree for configuration file */ @@ -25,6 +23,8 @@ typedef string_t atom_t; #define T_ALIST 17 #define T_ERROR 20 +#define T_IS_PRIMITIVE(NTYPE) ((NTYPE) < T_ASSIGNMENT) + struct p_node { uint32_t type; struct cloc loc; @@ -37,13 +37,13 @@ struct p_node { struct p_node *r; }; -extern int yylex(void); -extern string_t config_file; -extern uint32_t config_lineno; +extern cstring_t config_file; +extern int config_lineno; +extern int yynerrs; /* Keys in dictionaries are 'atoms', which are constructed from strings using this call. Atoms may be compared using '=='. */ -extern atom_t intern(string_t string); +extern atom_t intern(cstring_t string); extern struct p_node *parse_conffile(FILE *conffile);