class_nodes = NULL;
nodes = g_list_append(nodes,class);
}
+ | classdec '{' '}' {
+ ((Class *)class)->nodes = NULL;
+ class_nodes = NULL;
+ nodes = g_list_append(nodes,class);
+ }
;
classdec: CLASS TYPETOKEN FROM TYPETOKEN {
| '*' { stars++; }
;
+optpublic: { ; }
+ | PUBLIC { ; }
+ ;
+
fullsigtype: PRIVATE TOKEN sigtype {
if(strcmp($<id>2,"first")==0)
$<sigtype>$ = PRIVATE_SIGNAL_FIRST_METHOD;
| PRIVATE sigtype {
$<sigtype>$ = PRIVATE_SIGNAL_LAST_METHOD;
}
- | TOKEN sigtype {
+ | TOKEN sigtype {
+ if(strcmp($<id>1,"first")==0)
+ $<sigtype>$ = SIGNAL_FIRST_METHOD;
+ else if(strcmp($<id>1,"last")==0)
+ $<sigtype>$ = SIGNAL_LAST_METHOD;
+ else {
+ yyerror(_("signal must be 'first' or 'last'"));
+ g_free($<id>1);
+ YYERROR;
+ }
+ g_free($<id>1);
+ }
+ | PUBLIC TOKEN sigtype {
+ if(strcmp($<id>2,"first")==0)
+ $<sigtype>$ = SIGNAL_FIRST_METHOD;
+ else if(strcmp($<id>2,"last")==0)
+ $<sigtype>$ = SIGNAL_LAST_METHOD;
+ else {
+ yyerror(_("signal must be 'first' or 'last'"));
+ g_free($<id>2);
+ YYERROR;
+ }
+ g_free($<id>2);
+ }
+ | TOKEN PUBLIC sigtype {
if(strcmp($<id>1,"first")==0)
$<sigtype>$ = SIGNAL_FIRST_METHOD;
else if(strcmp($<id>1,"last")==0)
}
g_free($<id>1);
}
+ | PUBLIC sigtype {
+ $<sigtype>$ = SIGNAL_LAST_METHOD;
+ }
| sigtype {
$<sigtype>$ = SIGNAL_LAST_METHOD;
}
$<id>8, $<cbuf>9,$<line>1,
ccode_line,vararg);
}
- | VIRTUAL type TOKEN '(' funcargs ')' onerror codenocode {
+ | VIRTUAL optpublic type TOKEN '(' funcargs ')' onerror codenocode {
if(!has_self) {
yyerror(_("virtual method without 'self' as "
"first parameter"));
YYERROR;
}
- push_function(VIRTUAL_METHOD, NULL, $<id>3,
- $<id>7, $<cbuf>8,$<line>1,
+ push_function(VIRTUAL_METHOD, NULL, $<id>4,
+ $<id>8, $<cbuf>9,$<line>1,
ccode_line,vararg);
}
| OVERRIDE '(' TYPETOKEN ')' type TOKEN '(' funcargs ')' onerror '{' CCODE {