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
30 NODE_TYPEALIAS_TARGET
,
35 NODE_DECLARATION_SPECIFIER
,
44 NODE_STRUCT_OR_VARIANT_DECLARATION
,
52 struct ctf_node
*parent
;
53 struct cds_list_head siblings
;
54 struct cds_list_head gc
;
61 struct cds_list_head _typedef
;
62 struct cds_list_head typealias
;
63 struct cds_list_head declaration_specifier
;
64 struct cds_list_head trace
;
65 struct cds_list_head stream
;
66 struct cds_list_head event
;
70 * Children nodes are ctf_expression, typedef or
73 struct cds_list_head _typedef
;
74 struct cds_list_head typealias
;
75 struct cds_list_head ctf_expression
;
76 struct cds_list_head declaration_specifier
;
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
;
86 struct cds_list_head declaration_specifier
;
90 * Children nodes are ctf_expression, typedef or
93 struct cds_list_head _typedef
;
94 struct cds_list_head typealias
;
95 struct cds_list_head ctf_expression
;
96 struct cds_list_head declaration_specifier
;
107 struct ctf_node
*type
;
111 struct ctf_node
*declaration_specifier
;
112 struct cds_list_head type_declarators
;
114 /* new type is "alias", existing type "target" */
116 struct ctf_node
*declaration_specifier
;
117 struct cds_list_head type_declarators
;
120 struct ctf_node
*declaration_specifier
;
121 struct cds_list_head type_declarators
;
124 struct ctf_node
*target
;
125 struct ctf_node
*alias
;
129 TYPESPEC_UNKNOWN
= 0,
143 TYPESPEC_FLOATING_POINT
,
151 struct ctf_node
*floating_point
;
152 struct ctf_node
*integer
;
153 struct ctf_node
*string
;
154 struct ctf_node
*_enum
;
155 struct ctf_node
*variant
;
156 struct ctf_node
*_struct
;
160 /* drop "const" specifier */
161 /* Children nodes are type_specifiers */
162 struct cds_list_head type_specifiers
;
163 } declaration_specifier
;
167 struct cds_list_head pointers
;
170 TYPEDEC_ID
, /* identifier */
171 TYPEDEC_NESTED
, /* (), array or sequence */
176 /* typedec has no pointer list */
177 struct ctf_node
*type_declarator
;
180 TYPEDEC_TYPE_UNKNOWN
= 0,
181 TYPEDEC_TYPE_VALUE
, /* must be > 0 */
186 struct ctf_node
*declaration_specifier
;
193 /* Children nodes are ctf_expression. */
194 struct cds_list_head expressions
;
197 /* Children nodes are ctf_expression. */
198 struct cds_list_head expressions
;
201 /* Children nodes are ctf_expression. */
202 struct cds_list_head expressions
;
206 union { /* inclusive start/end of range */
219 ENUM_TYPE_UNKNOWN
= 0,
220 ENUM_TYPE_VALUE
, /* must be > 0 */
225 struct ctf_node
*declaration_specifier
;
228 struct cds_list_head enumerator_list
;
231 struct ctf_node
*declaration_specifier
;
232 struct cds_list_head type_declarators
;
233 } struct_or_variant_declaration
;
235 struct cds_list_head _typedef
;
236 struct cds_list_head typealias
;
237 struct cds_list_head declaration_list
;
240 struct cds_list_head _typedef
;
241 struct cds_list_head typealias
;
242 struct cds_list_head declaration_list
;
248 struct ctf_node root
;
249 struct cds_list_head allocated_nodes
;
252 #endif /* _CTF_PARSER_H */