5 #include <helpers/list.h>
9 // the parameter name (of the reentrant 'yyparse' function)
10 // data is a pointer to a 'SParserParam' structure
11 //#define YYPARSE_PARAM scanner
13 // the argument for the 'yylex' function
14 #define YYLEX_PARAM ((struct ctf_scanner *) scanner)->scanner
33 NODE_DECLARATION_SPECIFIER
,
42 NODE_STRUCT_OR_VARIANT_DECLARATION
,
50 struct ctf_node
*parent
;
51 struct cds_list_head siblings
;
52 struct cds_list_head gc
;
62 * Children nodes are ctf_expression, typedef or
65 struct cds_list_head _typedef
;
66 struct cds_list_head typealias
;
67 struct cds_list_head ctf_expression
;
71 * Children nodes are ctf_expression, typedef or
74 struct cds_list_head _typedef
;
75 struct cds_list_head typealias
;
76 struct cds_list_head ctf_expression
;
80 * Children nodes are ctf_expression, typedef or
83 struct cds_list_head _typedef
;
84 struct cds_list_head typealias
;
85 struct cds_list_head ctf_expression
;
95 struct ctf_node
*type
;
99 struct ctf_node
*declaration_specifier
;
100 struct cds_list_head type_declarator
;
103 /* new type is "alias", existing type "target" */
104 struct ctf_node
*target_declaration_specifier
;
105 struct cds_list_head target_type_declarator
;
106 struct ctf_node
*alias_declaration_specifier
;
107 struct cds_list_head alias_type_declarator
;
124 TYPESPEC_FLOATING_POINT
,
132 struct ctf_node
*floating_point
;
133 struct ctf_node
*integer
;
134 struct ctf_node
*string
;
135 struct ctf_node
*_enum
;
136 struct ctf_node
*variant
;
137 struct ctf_node
*_struct
;
141 /* drop "const" specifier */
142 /* Children nodes are type_specifiers */
143 struct cds_list_head type_specifiers
;
144 } declaration_specifier
;
148 struct cds_list_head pointers
;
150 TYPEDEC_ID
, /* identifier */
151 TYPEDEC_TYPEDEC
,/* nested with () */
152 TYPEDEC_DIRECT
, /* array or sequence */
156 struct ctf_node
*typedec
;
158 /* typedec has no pointer list */
159 struct ctf_node
*typedec
;
162 TYPEDEC_TYPE_VALUE
, /* must be > 0 */
167 struct ctf_node
*declaration_specifier
;
174 /* Children nodes are ctf_expression. */
175 struct cds_list_head expressions
;
178 /* Children nodes are ctf_expression. */
179 struct cds_list_head expressions
;
182 /* Children nodes are ctf_expression. */
183 struct cds_list_head expressions
;
187 union { /* inclusive start/end of range */
200 ENUM_TYPE_VALUE
, /* must be > 0 */
205 struct ctf_node
*declaration_specifier
;
208 struct cds_list_head enumerator_list
;
211 struct ctf_node
*declaration_specifier
;
212 } struct_or_variant_declaration
;
214 struct cds_list_head _typedef
;
215 struct cds_list_head typealias
;
216 struct cds_list_head declaration_list
;
219 struct cds_list_head _typedef
;
220 struct cds_list_head typealias
;
221 struct cds_list_head declaration_list
;
227 struct ctf_node root
;
230 #endif /* _CTF_PARSER_H */