Add missing _Imaginary type
[babeltrace.git] / formats / ctf / metadata / ctf-parser.y
index f3b40d75b0b508d256290eea06b24a3e50b426f7..2ded0aeff0c9945368dbec4a9c307a7627519fb2 100644 (file)
 #include "ctf-parser.h"
 #include "ctf-ast.h"
 
+/*
+ * TODO: support enum, variant and struct declarations in scopes.
+ */
+
 /* Join two lists, put "add" at the end of "head".  */
 static inline void
 _cds_list_splice_tail (struct cds_list_head *add, struct cds_list_head *head)
@@ -873,6 +877,8 @@ keywords:
                {       $$ = yylval.gs;         }
        |       _COMPLEX
                {       $$ = yylval.gs;         }
+       |       _IMAGINARY
+               {       $$ = yylval.gs;         }
        |       FLOATING_POINT
                {       $$ = yylval.gs;         }
        |       INTEGER
@@ -1302,6 +1308,11 @@ type_specifier:
                        $$ = make_node(scanner, NODE_TYPE_SPECIFIER);
                        $$->u.type_specifier.type = TYPESPEC_COMPLEX;
                }
+       |       _IMAGINARY
+               {
+                       $$ = make_node(scanner, NODE_TYPE_SPECIFIER);
+                       $$->u.type_specifier.type = TYPESPEC_IMAGINARY;
+               }
        |       ID_TYPE
                {
                        $$ = make_node(scanner, NODE_TYPE_SPECIFIER);
This page took 0.023362 seconds and 4 git commands to generate.