1 #ifndef PDF_FOX_PARSE_H 2 #define PDF_FOX_PARSE_H 3 4 #include "foxdebug.h" 5 6 /**Definition of nodetype for tree searches... 7 * Not currently used. 8 */ 9 typedef enum {BRANCH, TERMINAL} NodeType; 10 11 /**Main defintion of a syntax tree node. 12 * Contains pointers to optional child nodes (node of higher grammatical precedence) 13 * as well as one to a sibling node (node of equal or lower precedence). 14 * Also contains pointer to an associated token. 15 */ 16 typedef struct _PDFSyntaxNode { 17 struct _PDFSyntaxNode *sibling; 18 struct _PDFSyntaxNode *child[3]; 19 NodeType type; 20 PDFToken *token; 21 } PDFSyntaxNode; 22 23 /**Parser utility functions. 24 */ 25 extern PDFSyntaxNode *getNewNode(); 26 extern bool createPDFTree(FILE *); 27 28 #endif 29