6 * Function: parse_enumeration
10 * A data type containing that enumeration definition
12 data_type_t *parse_enumeration(void);
15 * Function: parse_union
19 * A data type containing that union definition
21 data_type_t *parse_union(void);
24 * Function: parse_structure
28 * A data type containing that structure definition
30 data_type_t *parse_structure(void);
33 * Fucntion: parse_typeof
34 * Parse typeof operator
37 * The data type that represents the type of the expression supplied
38 * as the operand to the typeof operator.
40 data_type_t *parse_typeof(void);
43 * Function: parse_typedef_find
44 * Search the parser typedef table for a typedef
47 * string - The key of the type to search in the typedef table
50 * The data type representing that typedef if found, otherwise NULL.
52 data_type_t *parse_typedef_find(const char *string);
56 * Main entry point for the parser.
59 * Will produce a list of AST toplevel expressions which can be handed
60 * down to the code generator one at a time.
62 list_t *parse_run(void);
65 * Function: parse_init
66 * Main initialization for the global parser context.
69 * This must be called before calling <parse_run>.
71 void parse_init(void);
74 * Function: parse_expect
75 * When expecting language punctuation, this function is assumed to
76 * ensure that the following lexer state does indeed contain that
80 * punct - A character literal of the punctuation.
83 * If the passed punctuator isn't resolved as the current lexer state
84 * a lexer error is raised.
86 void parse_expect(char punct);
89 * Function: parse_next
90 * Reads the next token in the token stream and determines if it's
91 * the token specified by the argument, ungetting the token if it is,
92 * ignoring it if it isn't.
95 * ch - The token to check
98 * true if the token passed matches the next token in the token stream,
102 * This will advance lexer state only if the token specified as a
103 * parameter isn't determined as the next token in the token stream.
105 bool parse_next(int ch);
108 * Function: parse_expression_evaluate
109 * Reads a conditional expression and evaluates it as an integer constant
110 * expression if it one.
113 * An integer constant value of the evaluation of the integer constant
117 * Will raise a compilation error if it isn't a valid integer constant
120 int parse_expression_evaluate(void);
123 void parse_semantic_assignable(data_type_t *to, data_type_t *from);
124 ast_t *parse_expression_assignment(void);