+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ *++yyvsp = yylval;
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2:
+
+/* Line 1464 of yacc.c */
+#line 704 "parse.y"
+ { ; }
+ break;
+
+ case 3:
+
+/* Line 1464 of yacc.c */
+#line 705 "parse.y"
+ { ; }
+ break;
+
+ case 4:
+
+/* Line 1464 of yacc.c */
+#line 706 "parse.y"
+ { ; }
+ break;
+
+ case 5:
+
+/* Line 1464 of yacc.c */
+#line 707 "parse.y"
+ { ; }
+ break;
+
+ case 6:
+
+/* Line 1464 of yacc.c */
+#line 710 "parse.y"
+ {
+ Node *node = node_new (CCODE_NODE,
+ "cctype", C_CCODE,
+ "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
+ "line_no", ccode_line,
+ NULL);
+ nodes = g_list_append(nodes,node);
+ g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
+ }
+ break;
+
+ case 7:
+
+/* Line 1464 of yacc.c */
+#line 719 "parse.y"
+ {
+ Node *node = node_new (CCODE_NODE,
+ "cctype", AD_CCODE,
+ "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
+ "line_no", ccode_line,
+ NULL);
+ nodes = g_list_append(nodes,node);
+ g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
+ }
+ break;
+
+ case 8:
+
+/* Line 1464 of yacc.c */
+#line 728 "parse.y"
+ {
+ Node *node = node_new (CCODE_NODE,
+ "cctype", H_CCODE,
+ "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
+ "line_no", ccode_line,
+ NULL);
+ nodes = g_list_append(nodes,node);
+ g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
+ }
+ break;
+
+ case 9:
+
+/* Line 1464 of yacc.c */
+#line 737 "parse.y"
+ {
+ Node *node = node_new (CCODE_NODE,
+ "cctype", HT_CCODE,
+ "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
+ "line_no", ccode_line,
+ NULL);
+ nodes = g_list_append(nodes,node);
+ g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
+ }
+ break;
+
+ case 10:
+
+/* Line 1464 of yacc.c */
+#line 746 "parse.y"
+ {
+ Node *node = node_new (CCODE_NODE,
+ "cctype", PH_CCODE,
+ "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
+ "line_no", ccode_line,
+ NULL);
+ nodes = g_list_append(nodes,node);
+ g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
+ }
+ break;
+
+ case 11:
+
+/* Line 1464 of yacc.c */
+#line 755 "parse.y"
+ {
+ Node *node = node_new (CCODE_NODE,
+ "cctype", A_CCODE,
+ "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
+ "line_no", ccode_line,
+ NULL);
+ nodes = g_list_append(nodes,node);
+ g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
+ }
+ break;
+
+ case 12:
+
+/* Line 1464 of yacc.c */
+#line 764 "parse.y"
+ {
+ Node *node = node_new (CCODE_NODE,
+ "cctype", AT_CCODE,
+ "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
+ "line_no", ccode_line,
+ NULL);
+ nodes = g_list_append(nodes,node);
+ g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
+ }
+ break;
+
+ case 13:
+
+/* Line 1464 of yacc.c */
+#line 773 "parse.y"
+ {
+ Node *node = node_new (CCODE_NODE,
+ "cctype", CT_CCODE,
+ "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
+ "line_no", ccode_line,
+ NULL);
+ nodes = g_list_append(nodes,node);
+ g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
+ }
+ break;
+
+ case 14:
+
+/* Line 1464 of yacc.c */
+#line 784 "parse.y"
+ { ; }
+ break;
+
+ case 15:
+
+/* Line 1464 of yacc.c */
+#line 785 "parse.y"
+ { ; }
+ break;
+
+ case 16:
+
+/* Line 1464 of yacc.c */
+#line 786 "parse.y"
+ { ; }
+ break;
+
+ case 17:
+
+/* Line 1464 of yacc.c */
+#line 787 "parse.y"
+ { ; }
+ break;
+
+ case 18:
+
+/* Line 1464 of yacc.c */
+#line 788 "parse.y"
+ { ; }
+ break;
+
+ case 19:
+
+/* Line 1464 of yacc.c */
+#line 789 "parse.y"
+ { ; }
+ break;
+
+ case 20:
+
+/* Line 1464 of yacc.c */
+#line 790 "parse.y"
+ { ; }
+ break;
+
+ case 21:
+
+/* Line 1464 of yacc.c */
+#line 791 "parse.y"
+ { ; }
+ break;
+
+ case 22:
+
+/* Line 1464 of yacc.c */
+#line 794 "parse.y"
+ {
+ ((Class *)class)->nodes = class_nodes;
+ class_nodes = NULL;
+ nodes = g_list_append(nodes,class);
+ }
+ break;
+
+ case 23:
+
+/* Line 1464 of yacc.c */
+#line 799 "parse.y"
+ {
+ ((Class *)class)->nodes = NULL;
+ class_nodes = NULL;
+ nodes = g_list_append(nodes,class);
+ }
+ break;
+
+ case 24:
+
+/* Line 1464 of yacc.c */
+#line 806 "parse.y"
+ {
+ class = node_new (CLASS_NODE,
+ "otype:steal", (yyvsp[(2) - (5)].id),
+ "ptype:steal", (yyvsp[(4) - (5)].id),
+ "bonobo_object_class:steal", bonobo_object_class,
+ "glade_xml", glade_xml,
+ "interfaces:steal", interfaces,
+ "chunk_size:steal", chunk_size,
+ "abstract", abstract,
+ NULL);
+ bonobo_object_class = NULL;
+ glade_xml = FALSE;
+ chunk_size = NULL;
+ interfaces = NULL;
+ }
+ break;
+
+ case 26:
+
+/* Line 1464 of yacc.c */
+#line 824 "parse.y"
+ {
+ if(strcmp((yyvsp[(2) - (4)].id),"abstract") == 0) {
+ abstract = TRUE;
+ } else {
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+ }
+ break;
+
+ case 27:
+
+/* Line 1464 of yacc.c */
+#line 832 "parse.y"
+ {
+ if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
+ g_free (chunk_size);
+ chunk_size = g_strdup((yyvsp[(3) - (5)].id));
+ } else if(strcmp((yyvsp[(2) - (5)].id),"BonoboObject") == 0) {
+ g_free (bonobo_object_class);
+ bonobo_object_class = g_strdup((yyvsp[(3) - (5)].id));
+ } else {
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+ }
+ break;
+
+ case 28:
+
+/* Line 1464 of yacc.c */
+#line 844 "parse.y"
+ {
+ if (strcmp ((yyvsp[(2) - (5)].id), "interface") == 0) {
+ interfaces = g_list_append (interfaces,
+ g_strdup ((yyvsp[(3) - (5)].id)));
+ } else {
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+ }
+ break;
+
+ case 29:
+
+/* Line 1464 of yacc.c */
+#line 853 "parse.y"
+ {
+ if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
+ g_free (chunk_size);
+ if(atoi((yyvsp[(3) - (5)].id)) != 0)
+ chunk_size = g_strdup((yyvsp[(3) - (5)].id));
+ else
+ chunk_size = NULL;
+ } else {
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+ }
+ break;
+
+ case 30:
+
+/* Line 1464 of yacc.c */
+#line 865 "parse.y"
+ {
+ if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
+ glade_xml = TRUE;
+ add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
+ } else {
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+ }
+ break;
+
+ case 31:
+
+/* Line 1464 of yacc.c */
+#line 874 "parse.y"
+ {
+ if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
+ glade_xml = TRUE;
+ add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
+ } else {
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+ }
+ break;
+
+ case 32:
+
+/* Line 1464 of yacc.c */
+#line 883 "parse.y"
+ {
+ if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
+ glade_xml = TRUE;
+ add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
+ } else {
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+ }
+ break;
+
+ case 33:
+
+/* Line 1464 of yacc.c */
+#line 892 "parse.y"
+ {
+ if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
+ glade_xml = TRUE;
+ add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
+ } else {
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+ }
+ break;
+
+ case 34:
+
+/* Line 1464 of yacc.c */
+#line 903 "parse.y"
+ { ; }
+ break;
+
+ case 35:
+
+/* Line 1464 of yacc.c */
+#line 904 "parse.y"
+ { ; }
+ break;
+
+ case 36:
+
+/* Line 1464 of yacc.c */
+#line 907 "parse.y"
+ { ; }
+ break;
+
+ case 37:
+
+/* Line 1464 of yacc.c */
+#line 908 "parse.y"
+ {
+ if (strcmp ((yyvsp[(1) - (2)].id), "BonoboObject") != 0) {
+ g_free ((yyvsp[(1) - (2)].id));
+ yyerror (_("parse error"));
+ YYERROR;
+ }
+ g_free ((yyvsp[(1) - (2)].id));
+ last_added_method->bonobo_object_func = TRUE;
+ }
+ break;
+
+ case 38:
+
+/* Line 1464 of yacc.c */
+#line 917 "parse.y"
+ {
+ if (strcmp ((yyvsp[(1) - (3)].id), "interface") != 0) {
+ g_free ((yyvsp[(1) - (3)].id));
+ g_free ((yyvsp[(2) - (3)].id));
+ yyerror (_("parse error"));
+ YYERROR;
+ }
+ g_free ((yyvsp[(1) - (3)].id));
+ node_set ((Node *)last_added_method,
+ "interface:steal", (yyvsp[(2) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 39:
+
+/* Line 1464 of yacc.c */
+#line 929 "parse.y"
+ { ; }
+ break;
+
+ case 40:
+
+/* Line 1464 of yacc.c */
+#line 930 "parse.y"
+ { ; }
+ break;
+
+ case 41:
+
+/* Line 1464 of yacc.c */
+#line 931 "parse.y"
+ { ; }
+ break;
+
+ case 42:
+
+/* Line 1464 of yacc.c */
+#line 932 "parse.y"
+ { ; }
+ break;
+
+ case 43:
+
+/* Line 1464 of yacc.c */
+#line 935 "parse.y"
+ { the_scope = PUBLIC_SCOPE; }
+ break;
+
+ case 44:
+
+/* Line 1464 of yacc.c */
+#line 936 "parse.y"
+ { the_scope = PRIVATE_SCOPE; }
+ break;
+
+ case 45:
+
+/* Line 1464 of yacc.c */
+#line 937 "parse.y"
+ { the_scope = PROTECTED_SCOPE; }
+ break;
+
+ case 46:
+
+/* Line 1464 of yacc.c */
+#line 938 "parse.y"
+ { the_scope = CLASS_SCOPE; }
+ break;
+
+ case 47:
+
+/* Line 1464 of yacc.c */
+#line 941 "parse.y"
+ {
+ if (strcmp ((yyvsp[(1) - (2)].id), "destroywith") == 0) {
+ g_free ((yyvsp[(1) - (2)].id));
+ destructor_unref = FALSE;
+ destructor = (yyvsp[(2) - (2)].id);
+ destructor_line = line_no;
+ destructor_simple = TRUE;
+ } else if (strcmp ((yyvsp[(1) - (2)].id), "unrefwith") == 0) {
+ g_free ((yyvsp[(1) - (2)].id));
+ destructor_unref = TRUE;
+ destructor = (yyvsp[(2) - (2)].id);
+ destructor_line = line_no;
+ destructor_simple = TRUE;
+ } else {
+ g_free ((yyvsp[(1) - (2)].id));
+ g_free ((yyvsp[(2) - (2)].id));
+ yyerror (_("parse error"));
+ YYERROR;
+ }
+ }
+ break;
+
+ case 48:
+
+/* Line 1464 of yacc.c */
+#line 961 "parse.y"
+ {
+ if (strcmp ((yyvsp[(1) - (3)].id), "destroy") == 0) {
+ g_free((yyvsp[(1) - (3)].id));
+ destructor_unref = FALSE;
+ destructor = ((yyvsp[(3) - (3)].cbuf))->str;
+ g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
+ destructor_line = ccode_line;
+ destructor_simple = FALSE;
+ } else if (strcmp ((yyvsp[(1) - (3)].id), "unref") == 0) {
+ g_free ((yyvsp[(1) - (3)].id));
+ destructor_unref = TRUE;
+ destructor = ((yyvsp[(3) - (3)].cbuf))->str;
+ g_string_free ((yyvsp[(3) - (3)].cbuf), FALSE);
+ destructor_line = ccode_line;
+ destructor_simple = FALSE;
+ } else {
+ g_free ((yyvsp[(1) - (3)].id));
+ g_string_free ((yyvsp[(3) - (3)].cbuf), TRUE);
+ yyerror (_("parse error"));
+ YYERROR;
+ }
+ }
+ break;
+
+ case 49:
+
+/* Line 1464 of yacc.c */
+#line 985 "parse.y"
+ {
+ initializer = (yyvsp[(2) - (2)].id);
+ initializer_line = ccode_line;
+ }
+ break;
+
+ case 50:
+
+/* Line 1464 of yacc.c */
+#line 989 "parse.y"
+ {
+ initializer = ((yyvsp[(3) - (3)].cbuf))->str;
+ initializer_line = ccode_line;
+ g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
+ }
+ break;
+
+ case 51:
+
+/* Line 1464 of yacc.c */
+#line 997 "parse.y"
+ { ; }
+ break;
+
+ case 52:
+
+/* Line 1464 of yacc.c */
+#line 998 "parse.y"
+ { ; }
+ break;
+
+ case 53:
+
+/* Line 1464 of yacc.c */
+#line 999 "parse.y"
+ { destructor = NULL; }
+ break;
+
+ case 54:
+
+/* Line 1464 of yacc.c */
+#line 1000 "parse.y"
+ { initializer = NULL; }
+ break;
+
+ case 55:
+
+/* Line 1464 of yacc.c */
+#line 1001 "parse.y"
+ {
+ if (strcmp ((yyvsp[(1) - (1)].id), "GladeXML") == 0) {
+ glade_widget = TRUE;
+ } else {
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+ }
+ break;
+
+ case 56:
+
+/* Line 1464 of yacc.c */
+#line 1009 "parse.y"
+ {
+ destructor = NULL;
+ initializer = NULL;
+ }
+ break;
+
+ case 57:
+
+/* Line 1464 of yacc.c */
+#line 1015 "parse.y"
+ {
+ push_variable((yyvsp[(3) - (5)].id), the_scope,(yyvsp[(1) - (5)].line), NULL);
+ }
+ break;
+
+ case 58:
+
+/* Line 1464 of yacc.c */
+#line 1018 "parse.y"
+ {
+ push_variable((yyvsp[(3) - (6)].id), the_scope, (yyvsp[(1) - (6)].line), (yyvsp[(4) - (6)].id));
+ }
+ break;
+
+ case 59:
+
+/* Line 1464 of yacc.c */
+#line 1023 "parse.y"
+ {
+ Node *node = NULL;
+ if(strcmp((yyvsp[(6) - (12)].id),"get")==0 &&
+ strcmp((yyvsp[(9) - (12)].id),"set")==0) {
+ Type *type = pop_type();
+ g_free ((yyvsp[(6) - (12)].id));
+ g_free ((yyvsp[(9) - (12)].id));
+ node = node_new (ARGUMENT_NODE,
+ "gtktype:steal", (yyvsp[(3) - (12)].id),
+ "atype:steal", type,
+ "flags:steal", (yyvsp[(2) - (12)].list),
+ "name:steal", (yyvsp[(4) - (12)].id),
+ "get:steal", ((yyvsp[(8) - (12)].cbuf))->str,
+ "get_line", (yyvsp[(7) - (12)].line),
+ "set:steal", ((yyvsp[(11) - (12)].cbuf))->str,
+ "set_line", (yyvsp[(10) - (12)].line),
+ "line_no", (yyvsp[(1) - (12)].line),
+ NULL);
+
+ class_nodes = g_list_append(class_nodes,node);
+
+ g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
+ g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
+
+ } else if(strcmp((yyvsp[(6) - (12)].id),"set")==0 &&
+ strcmp((yyvsp[(9) - (12)].id),"get")==0) {
+ Type *type = pop_type();
+ g_free ((yyvsp[(6) - (12)].id));
+ g_free ((yyvsp[(9) - (12)].id));
+ node = node_new (ARGUMENT_NODE,
+ "gtktype:steal", (yyvsp[(3) - (12)].id),
+ "atype:steal", type,
+ "flags:steal", (yyvsp[(2) - (12)].list),
+ "name:steal", (yyvsp[(4) - (12)].id),
+ "get:steal", ((yyvsp[(11) - (12)].cbuf))->str,
+ "get_line", (yyvsp[(10) - (12)].line),
+ "set:steal", ((yyvsp[(8) - (12)].cbuf))->str,
+ "set_line", (yyvsp[(7) - (12)].line),
+ "line_no", (yyvsp[(1) - (12)].line),
+ NULL);
+ g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
+ g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
+ class_nodes = g_list_append(class_nodes,node);
+ } else {
+ g_free ((yyvsp[(3) - (12)].id));
+ g_free ((yyvsp[(4) - (12)].id));
+ g_free ((yyvsp[(6) - (12)].id));
+ g_free ((yyvsp[(9) - (12)].id));
+ g_list_foreach ((yyvsp[(2) - (12)].list), (GFunc)g_free, NULL);
+ g_list_free ((yyvsp[(2) - (12)].list));
+ g_string_free ((yyvsp[(11) - (12)].cbuf), TRUE);
+ g_string_free ((yyvsp[(8) - (12)].cbuf), TRUE);
+ yyerror (_("parse error"));
+ YYERROR;
+ }
+
+ if ((yyvsp[(5) - (12)].id) != NULL) {
+ Argument *arg = (Argument *)node;
+ export_accessors (arg->name,
+ arg->get != NULL, arg->get_line,
+ arg->set != NULL, arg->set_line,
+ arg->atype,
+ arg->gtktype,
+ arg->line_no);
+ g_free ((yyvsp[(5) - (12)].id));
+ }
+
+ }
+ break;
+
+ case 60:
+
+/* Line 1464 of yacc.c */
+#line 1091 "parse.y"
+ {
+ Node *node = NULL;
+ if(strcmp((yyvsp[(6) - (9)].id), "get") == 0) {
+ Type *type = pop_type();
+ g_free ((yyvsp[(6) - (9)].id));
+ node = node_new (ARGUMENT_NODE,
+ "gtktype:steal", (yyvsp[(3) - (9)].id),
+ "atype:steal", type,
+ "flags:steal", (yyvsp[(2) - (9)].list),
+ "name:steal", (yyvsp[(4) - (9)].id),
+ "get:steal", ((yyvsp[(8) - (9)].cbuf))->str,
+ "get_line", (yyvsp[(7) - (9)].line),
+ "line_no", (yyvsp[(1) - (9)].line),
+ NULL);
+
+ g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
+ class_nodes = g_list_append(class_nodes, node);
+ } else if(strcmp((yyvsp[(6) - (9)].id), "set") == 0) {
+ Type *type = pop_type();
+ g_free ((yyvsp[(6) - (9)].id));
+ node = node_new (ARGUMENT_NODE,
+ "gtktype:steal", (yyvsp[(3) - (9)].id),
+ "atype:steal", type,
+ "flags:steal", (yyvsp[(2) - (9)].list),
+ "name:steal", (yyvsp[(4) - (9)].id),
+ "set:steal", ((yyvsp[(8) - (9)].cbuf))->str,
+ "set_line", (yyvsp[(7) - (9)].line),
+ "line_no", (yyvsp[(1) - (9)].line),
+ NULL);
+
+ g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
+ class_nodes = g_list_append (class_nodes, node);
+ } else {
+ g_free ((yyvsp[(6) - (9)].id));
+ g_free ((yyvsp[(3) - (9)].id));
+ g_free ((yyvsp[(4) - (9)].id));
+ g_list_foreach ((yyvsp[(2) - (9)].list), (GFunc)g_free, NULL);
+ g_list_free ((yyvsp[(2) - (9)].list));
+ g_string_free ((yyvsp[(8) - (9)].cbuf), TRUE);
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+
+ if ((yyvsp[(5) - (9)].id) != NULL) {
+ Argument *arg = (Argument *)node;
+ export_accessors (arg->name,
+ arg->get != NULL, arg->get_line,
+ arg->set != NULL, arg->set_line,
+ arg->atype,
+ arg->gtktype,
+ arg->line_no);
+ g_free ((yyvsp[(5) - (9)].id));
+ }
+ }
+ break;
+
+ case 61:
+
+/* Line 1464 of yacc.c */
+#line 1145 "parse.y"
+ {
+ Node *node;
+ char *get, *set = NULL;
+ Variable *var;
+ Type *type;
+ const char *root;
+
+ if(strcmp((yyvsp[(6) - (6)].id), "link")!=0 &&
+ strcmp((yyvsp[(6) - (6)].id), "stringlink")!=0 &&
+ strcmp((yyvsp[(6) - (6)].id), "objectlink")!=0) {
+ g_free((yyvsp[(6) - (6)].id));
+ g_free((yyvsp[(3) - (6)].id));
+ g_free((yyvsp[(4) - (6)].id));
+ g_list_foreach((yyvsp[(2) - (6)].list),(GFunc)g_free,NULL);
+ g_list_free((yyvsp[(2) - (6)].list));
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+
+ type = pop_type();
+
+ var = find_var_or_die((yyvsp[(4) - (6)].id), (yyvsp[(1) - (6)].line));
+ if(var->scope == PRIVATE_SCOPE) {
+ root = "self->_priv";
+ } else if(var->scope == CLASS_SCOPE) {
+ root = "SELF_GET_CLASS(self)";
+ if(no_self_alias)
+ error_print(GOB_ERROR, (yyvsp[(1) - (6)].line),
+ _("Self aliases needed when autolinking to a classwide member"));
+ } else {
+ root = "self";
+ }
+
+ if(strcmp((yyvsp[(6) - (6)].id), "link")==0) {
+ set = g_strdup_printf("%s->%s = ARG;",
+ root, (yyvsp[(4) - (6)].id));
+ } else if(strcmp((yyvsp[(6) - (6)].id), "stringlink")==0) {
+ set = g_strdup_printf("g_free (%s->%s); "
+ "%s->%s = g_strdup (ARG);",
+ root, (yyvsp[(4) - (6)].id),
+ root, (yyvsp[(4) - (6)].id));
+ } else if(strcmp((yyvsp[(6) - (6)].id), "objectlink")==0) {
+ set = g_strdup_printf(
+ "if (ARG != NULL) "
+ "g_object_ref (G_OBJECT (ARG)); "
+ "if (%s->%s != NULL) "
+ "g_object_unref (G_OBJECT (%s->%s)); "
+ "%s->%s = ARG;",
+ root, (yyvsp[(4) - (6)].id),
+ root, (yyvsp[(4) - (6)].id),
+ root, (yyvsp[(4) - (6)].id));
+ } else {
+ g_assert_not_reached();
+ }
+
+ get = g_strdup_printf("ARG = %s->%s;", root, (yyvsp[(4) - (6)].id));
+
+ g_free ((yyvsp[(6) - (6)].id));
+
+ if (type == NULL)
+ type = (Type *)node_copy ((Node *)var->vtype);
+
+ node = node_new (ARGUMENT_NODE,
+ "gtktype:steal", (yyvsp[(3) - (6)].id),
+ "atype:steal", type,
+ "flags:steal", (yyvsp[(2) - (6)].list),
+ "name:steal", (yyvsp[(4) - (6)].id),
+ "get:steal", get,
+ "get_line", (yyvsp[(1) - (6)].line),
+ "set:steal", set,
+ "set_line", (yyvsp[(1) - (6)].line),
+ "line_no", (yyvsp[(1) - (6)].line),
+ NULL);
+
+ if ((yyvsp[(5) - (6)].id) != NULL) {
+ Argument *arg = (Argument *)node;
+ export_accessors (arg->name,
+ arg->get != NULL, arg->get_line,
+ arg->set != NULL, arg->set_line,
+ arg->atype,
+ arg->gtktype,
+ arg->line_no);
+ g_free ((yyvsp[(5) - (6)].id));
+ }
+
+ class_nodes = g_list_append (class_nodes, node);
+ }
+ break;
+
+ case 62:
+
+/* Line 1464 of yacc.c */
+#line 1234 "parse.y"
+ {
+ if (strcmp ((yyvsp[(2) - (3)].id), "export")!=0) {
+ g_free ((yyvsp[(2) - (3)].id));
+ yyerror (_("parse error"));
+ YYERROR;
+ }
+ (yyval.id) = (yyvsp[(2) - (3)].id);
+ }
+ break;
+
+ case 63:
+
+/* Line 1464 of yacc.c */
+#line 1242 "parse.y"
+ {
+ (yyval.id) = NULL;
+ }
+ break;
+
+ case 64:
+
+/* Line 1464 of yacc.c */
+#line 1247 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "line_no", (yyvsp[(1) - (11)].line),
+ "gtktype:steal", debool ((yyvsp[(2) - (11)].id)),
+ "name:steal", (yyvsp[(3) - (11)].id),
+ NULL);
+ if (strcmp ((yyvsp[(5) - (11)].id), "get") == 0 &&
+ strcmp ((yyvsp[(8) - (11)].id), "set") == 0) {
+ node_set ((Node *)property,
+ "get:steal", ((yyvsp[(7) - (11)].cbuf))->str,
+ "get_line", (yyvsp[(6) - (11)].line),
+ "set:steal", ((yyvsp[(10) - (11)].cbuf))->str,
+ "set_line", (yyvsp[(9) - (11)].line),
+ NULL);
+ g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
+ g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
+ g_free ((yyvsp[(5) - (11)].id));
+ g_free ((yyvsp[(8) - (11)].id));
+ } else if (strcmp ((yyvsp[(5) - (11)].id), "set") == 0 &&
+ strcmp ((yyvsp[(8) - (11)].id), "get") == 0) {
+ node_set ((Node *)property,
+ "get:steal", ((yyvsp[(10) - (11)].cbuf))->str,
+ "get_line", (yyvsp[(9) - (11)].line),
+ "set:steal", ((yyvsp[(7) - (11)].cbuf))->str,
+ "set_line", (yyvsp[(6) - (11)].line),
+ NULL);
+ g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
+ g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
+ g_free ((yyvsp[(5) - (11)].id));
+ g_free ((yyvsp[(8) - (11)].id));
+ } else {
+ g_string_free ((yyvsp[(7) - (11)].cbuf), TRUE);
+ g_string_free ((yyvsp[(10) - (11)].cbuf), TRUE);
+ g_free ((yyvsp[(5) - (11)].id));
+ g_free ((yyvsp[(8) - (11)].id));
+ node_free ((Node *)property);
+ property = NULL;
+ yyerror (_("parse error"));
+ YYERROR;
+ }
+ property_link_and_export ((Node *)property);
+ if (property != NULL) {
+ class_nodes = g_list_append (class_nodes,
+ property);
+ property = NULL;
+ }
+ }
+ break;
+
+ case 65:
+
+/* Line 1464 of yacc.c */
+#line 1295 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "line_no", (yyvsp[(1) - (8)].line),
+ "gtktype:steal", debool ((yyvsp[(2) - (8)].id)),
+ "name:steal", (yyvsp[(3) - (8)].id),
+ NULL);
+ if (strcmp ((yyvsp[(5) - (8)].id), "get") == 0) {
+ node_set ((Node *)property,
+ "get:steal", ((yyvsp[(7) - (8)].cbuf))->str,
+ "get_line", (yyvsp[(6) - (8)].line),
+ NULL);
+ g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
+ g_free ((yyvsp[(5) - (8)].id));
+ } else if (strcmp ((yyvsp[(5) - (8)].id), "set") == 0) {
+ node_set ((Node *)property,
+ "set:steal", ((yyvsp[(7) - (8)].cbuf))->str,
+ "set_line", (yyvsp[(6) - (8)].line),
+ NULL);
+ g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
+ g_free ((yyvsp[(5) - (8)].id));
+ } else {
+ g_string_free ((yyvsp[(7) - (8)].cbuf), TRUE);
+ g_free ((yyvsp[(5) - (8)].id));
+ node_free ((Node *)property);
+ property = NULL;
+ yyerror (_("parse error"));
+ YYERROR;
+ }
+ property_link_and_export ((Node *)property);
+ if (property != NULL) {
+ class_nodes = g_list_append (class_nodes,
+ property);
+ property = NULL;
+ }
+ }
+ break;
+
+ case 66:
+
+/* Line 1464 of yacc.c */
+#line 1331 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "line_no", (yyvsp[(1) - (5)].line),
+ "gtktype:steal", debool ((yyvsp[(2) - (5)].id)),
+ "name:steal", (yyvsp[(3) - (5)].id),
+ NULL);
+ property_link_and_export ((Node *)property);
+ if (property != NULL) {
+ class_nodes = g_list_append (class_nodes,
+ property);
+ property = NULL;
+ }
+ }
+ break;
+
+ case 67:
+
+/* Line 1464 of yacc.c */
+#line 1347 "parse.y"
+ { ; }
+ break;
+
+ case 68:
+
+/* Line 1464 of yacc.c */
+#line 1348 "parse.y"
+ { ; }
+ break;
+
+ case 69:
+
+/* Line 1464 of yacc.c */
+#line 1351 "parse.y"
+ { ; }
+ break;
+
+ case 70:
+
+/* Line 1464 of yacc.c */
+#line 1352 "parse.y"
+ { ; }
+ break;
+
+ case 71:
+
+/* Line 1464 of yacc.c */
+#line 1355 "parse.y"
+ { (yyval.id) = (yyvsp[(1) - (1)].id); }
+ break;
+
+ case 72:
+
+/* Line 1464 of yacc.c */
+#line 1356 "parse.y"
+ {
+ if (strcmp ((yyvsp[(1) - (4)].id), "_") != 0) {
+ g_free ((yyvsp[(1) - (4)].id));
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+ g_free ((yyvsp[(1) - (4)].id));
+ (yyval.id) = g_strconcat ("_(", (yyvsp[(3) - (4)].id), ")", NULL);
+ g_free ((yyvsp[(3) - (4)].id));
+ }
+ break;
+
+ case 73:
+
+/* Line 1464 of yacc.c */
+#line 1368 "parse.y"
+ { (yyval.id) = (yyvsp[(1) - (1)].id); }
+ break;
+
+ case 74:
+
+/* Line 1464 of yacc.c */
+#line 1369 "parse.y"
+ { (yyval.id) = (yyvsp[(1) - (1)].id); }
+ break;
+
+ case 75:
+
+/* Line 1464 of yacc.c */
+#line 1372 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "nick:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 76:
+
+/* Line 1464 of yacc.c */
+#line 1378 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "blurb:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 77:
+
+/* Line 1464 of yacc.c */
+#line 1384 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "maximum:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 78:
+
+/* Line 1464 of yacc.c */
+#line 1390 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "minimum:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 79:
+
+/* Line 1464 of yacc.c */
+#line 1396 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "default_value:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 80:
+
+/* Line 1464 of yacc.c */
+#line 1402 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "flags:steal", (yyvsp[(3) - (3)].list),
+ NULL);
+ }
+ break;
+
+ case 81:
+
+/* Line 1464 of yacc.c */
+#line 1408 "parse.y"
+ {
+ Type *type = pop_type ();
+ ensure_property ();
+ node_set ((Node *)property,
+ "ptype:steal", type,
+ NULL);
+ }
+ break;
+
+ case 82:
+
+/* Line 1464 of yacc.c */
+#line 1415 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 83:
+
+/* Line 1464 of yacc.c */
+#line 1421 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 84:
+
+/* Line 1464 of yacc.c */
+#line 1427 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 85:
+
+/* Line 1464 of yacc.c */
+#line 1433 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 86:
+
+/* Line 1464 of yacc.c */
+#line 1439 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 87:
+
+/* Line 1464 of yacc.c */
+#line 1445 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 88:
+
+/* Line 1464 of yacc.c */
+#line 1451 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 89:
+
+/* Line 1464 of yacc.c */
+#line 1457 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 90:
+
+/* Line 1464 of yacc.c */
+#line 1463 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 91:
+
+/* Line 1464 of yacc.c */
+#line 1469 "parse.y"
+ {
+ ensure_property ();
+ node_set ((Node *)property,
+ "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
+ NULL);
+ }
+ break;
+
+ case 92:
+
+/* Line 1464 of yacc.c */
+#line 1475 "parse.y"
+ {
+ ensure_property ();
+ if (strcmp ((yyvsp[(1) - (1)].id), "override") == 0) {
+ g_free((yyvsp[(1) - (1)].id));
+ node_set ((Node *)property,
+ "override", TRUE,
+ NULL);
+ } else if (strcmp ((yyvsp[(1) - (1)].id), "link") == 0) {
+ g_free((yyvsp[(1) - (1)].id));
+ node_set ((Node *)property,
+ "link", TRUE,
+ NULL);
+ } else if (strcmp ((yyvsp[(1) - (1)].id), "export") == 0) {
+ g_free((yyvsp[(1) - (1)].id));
+ node_set ((Node *)property,
+ "export", TRUE,
+ NULL);
+ } else {
+ g_free((yyvsp[(1) - (1)].id));
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+ }
+ break;
+
+ case 93:
+
+/* Line 1464 of yacc.c */
+#line 1500 "parse.y"
+ {
+ if(strcmp((yyvsp[(3) - (5)].id),"type")!=0) {
+ g_free((yyvsp[(1) - (5)].id));
+ g_free((yyvsp[(3) - (5)].id));
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+ (yyval.id) = debool ((yyvsp[(1) - (5)].id));
+ }
+ break;
+
+ case 94:
+
+/* Line 1464 of yacc.c */
+#line 1509 "parse.y"
+ {
+ (yyval.id) = debool ((yyvsp[(1) - (1)].id));
+ typestack = g_list_prepend(typestack,NULL);
+ }
+ break;
+
+ case 95:
+
+/* Line 1464 of yacc.c */
+#line 1515 "parse.y"
+ { (yyval.list) = (yyvsp[(2) - (3)].list); }
+ break;
+
+ case 96:
+
+/* Line 1464 of yacc.c */
+#line 1516 "parse.y"
+ { (yyval.list) = NULL; }
+ break;
+
+ case 97:
+
+/* Line 1464 of yacc.c */
+#line 1519 "parse.y"
+ {
+ (yyval.list) = g_list_append((yyvsp[(3) - (3)].list),(yyvsp[(1) - (3)].id));
+ }
+ break;
+
+ case 98:
+
+/* Line 1464 of yacc.c */
+#line 1522 "parse.y"
+ {
+ (yyval.list) = g_list_append(NULL,(yyvsp[(1) - (1)].id));
+ }
+ break;
+
+ case 99:
+
+/* Line 1464 of yacc.c */
+#line 1528 "parse.y"
+ {
+ Node *node = node_new (TYPE_NODE,
+ "name:steal", (yyvsp[(1) - (2)].id),
+ "pointer:steal", (yyvsp[(2) - (2)].id),
+ NULL);
+ typestack = g_list_prepend(typestack,node);
+ }
+ break;
+
+ case 100:
+
+/* Line 1464 of yacc.c */
+#line 1535 "parse.y"
+ {
+ Node *node = node_new (TYPE_NODE,
+ "name:steal", (yyvsp[(1) - (1)].id),
+ NULL);
+ typestack = g_list_prepend(typestack,node);
+ }
+ break;
+
+ case 101:
+
+/* Line 1464 of yacc.c */
+#line 1544 "parse.y"
+ {
+ (yyval.id) = (yyvsp[(1) - (1)].id);
+ }
+ break;
+
+ case 102:
+
+/* Line 1464 of yacc.c */
+#line 1547 "parse.y"
+ {
+ (yyval.id) = (yyvsp[(1) - (1)].id);
+ }
+ break;
+
+ case 103:
+
+/* Line 1464 of yacc.c */
+#line 1550 "parse.y"
+ {
+ (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (2)].id), NULL);
+ g_free((yyvsp[(2) - (2)].id));
+ }
+ break;
+
+ case 104:
+
+/* Line 1464 of yacc.c */
+#line 1554 "parse.y"
+ {
+ (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
+ g_free((yyvsp[(1) - (2)].id));
+ }
+ break;