Add missing _Imaginary type
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 13 Apr 2011 22:11:24 +0000 (18:11 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 13 Apr 2011 22:11:24 +0000 (18:11 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/metadata/ctf-ast.h
formats/ctf/metadata/ctf-parser.y
formats/ctf/metadata/ctf-visitor-generate-io-struct.c
formats/ctf/metadata/ctf-visitor-parent-links.c
formats/ctf/metadata/ctf-visitor-xml.c

index 3d86f99c84cb7c7a5f7bf4e9895bddddfe4273dc..8b5ad887b6df6ea16334b7b86e6e88435751ec07 100644 (file)
@@ -152,6 +152,7 @@ struct ctf_node {
                                TYPESPEC_UNSIGNED,
                                TYPESPEC_BOOL,
                                TYPESPEC_COMPLEX,
+                               TYPESPEC_IMAGINARY,
                                TYPESPEC_CONST,
                                TYPESPEC_ID_TYPE,
                        } type;
index 8d8c29ce1e4826841f819c8438a5f8f78f5d1afa..2ded0aeff0c9945368dbec4a9c307a7627519fb2 100644 (file)
@@ -877,6 +877,8 @@ keywords:
                {       $$ = yylval.gs;         }
        |       _COMPLEX
                {       $$ = yylval.gs;         }
+       |       _IMAGINARY
+               {       $$ = yylval.gs;         }
        |       FLOATING_POINT
                {       $$ = yylval.gs;         }
        |       INTEGER
@@ -1306,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);
index 3ba0a7fed1b9f5f28b619ee6f2b453851c1b5c42..a6773eeaab4d7d11236fa8c054323afc9605a822 100644 (file)
@@ -72,7 +72,10 @@ int ctf_visitor_print_type_specifier(FILE *fd, int depth, struct ctf_node *node)
                fprintf(fd, "bool");
                break;
        case TYPESPEC_COMPLEX:
-               fprintf(fd, "complex");
+               fprintf(fd, "_Complex");
+               break;
+       case TYPESPEC_IMAGINARY:
+               fprintf(fd, "_Imaginary");
                break;
        case TYPESPEC_CONST:
                fprintf(fd, "const");
index 99d1ca044b4062f2a1e839ad77dd6eac795eda72..f23458d5aefebeb008d4fc4c92a5c44fe7a068f7 100644 (file)
@@ -92,6 +92,7 @@ int ctf_visitor_type_specifier(FILE *fd, int depth, struct ctf_node *node)
        case TYPESPEC_UNSIGNED:
        case TYPESPEC_BOOL:
        case TYPESPEC_COMPLEX:
+       case TYPESPEC_IMAGINARY:
        case TYPESPEC_CONST:
        case TYPESPEC_ID_TYPE:
                break;
index 1e474781ce92462ffa75c02f0ab2702cca9f5872..68a2e55436eb78cef033073399d3814cc739747d 100644 (file)
@@ -153,7 +153,10 @@ int ctf_visitor_print_type_specifier(FILE *fd, int depth, struct ctf_node *node)
                fprintf(fd, "bool");
                break;
        case TYPESPEC_COMPLEX:
-               fprintf(fd, "complex");
+               fprintf(fd, "_Complex");
+               break;
+       case TYPESPEC_IMAGINARY:
+               fprintf(fd, "_Imaginary");
                break;
        case TYPESPEC_CONST:
                fprintf(fd, "const");
This page took 0.027757 seconds and 4 git commands to generate.