diff options
Diffstat (limited to 'source4/build/pidl/idl.yp')
-rw-r--r-- | source4/build/pidl/idl.yp | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/source4/build/pidl/idl.yp b/source4/build/pidl/idl.yp index 186f003396..d58dc9d023 100644 --- a/source4/build/pidl/idl.yp +++ b/source4/build/pidl/idl.yp @@ -26,6 +26,8 @@ coclass: property_list 'coclass' identifier '{' interface_names '}' optional_sem "PROPERTIES" => $_[1], "NAME" => $_[3], "DATA" => $_[5], + "FILE" => $_[0]->YYData->{INPUT_FILENAME}, + "LINE" => $_[0]->YYData->{LINE}, }} ; @@ -41,6 +43,8 @@ interface: property_list 'interface' identifier base_interface '{' definitions ' "NAME" => $_[3], "BASE" => $_[4], "DATA" => $_[6], + "FILE" => $_[0]->YYData->{INPUT_FILENAME}, + "LINE" => $_[0]->YYData->{LINE}, }} ; @@ -63,7 +67,9 @@ const: 'const' identifier identifier '=' anytext ';' "TYPE" => "CONST", "DTYPE" => $_[2], "NAME" => $_[3], - "VALUE" => $_[5] + "VALUE" => $_[5], + "FILE" => $_[0]->YYData->{INPUT_FILENAME}, + "LINE" => $_[0]->YYData->{LINE}, }} | 'const' identifier identifier array_len '=' anytext ';' {{ @@ -72,6 +78,8 @@ const: 'const' identifier identifier '=' anytext ';' "NAME" => $_[3], "ARRAY_LEN" => $_[4], "VALUE" => $_[6], + "FILE" => $_[0]->YYData->{INPUT_FILENAME}, + "LINE" => $_[0]->YYData->{LINE}, }} ; @@ -82,8 +90,10 @@ function: property_list type identifier '(' element_list2 ')' ';' "NAME" => $_[3], "RETURN_TYPE" => $_[2], "PROPERTIES" => $_[1], - "ELEMENTS" => $_[5] - }} + "ELEMENTS" => $_[5], + "FILE" => $_[0]->YYData->{INPUT_FILENAME}, + "LINE" => $_[0]->YYData->{LINE}, + }} ; declare: 'declare' property_list decl_type identifier';' @@ -92,6 +102,8 @@ declare: 'declare' property_list decl_type identifier';' "PROPERTIES" => $_[2], "NAME" => $_[4], "DATA" => $_[3], + "FILE" => $_[0]->YYData->{INPUT_FILENAME}, + "LINE" => $_[0]->YYData->{LINE}, }} ; @@ -116,7 +128,9 @@ typedef: 'typedef' property_list type identifier array_len ';' "PROPERTIES" => $_[2], "NAME" => $_[4], "DATA" => $_[3], - "ARRAY_LEN" => $_[5] + "ARRAY_LEN" => $_[5], + "FILE" => $_[0]->YYData->{INPUT_FILENAME}, + "LINE" => $_[0]->YYData->{LINE}, }} ; @@ -127,7 +141,7 @@ type: struct | union | enum | bitmap | identifier enum: 'enum' '{' enum_elements '}' {{ - "TYPE" => "ENUM", + "TYPE" => "ENUM", "ELEMENTS" => $_[3] }} ; @@ -168,7 +182,9 @@ empty_element: property_list ';' "NAME" => "", "TYPE" => "EMPTY", "PROPERTIES" => $_[1], - "POINTERS" => 0 + "POINTERS" => 0, + "FILE" => $_[0]->YYData->{INPUT_FILENAME}, + "LINE" => $_[0]->YYData->{LINE}, }} ; @@ -196,7 +212,9 @@ base_element: property_list type pointers identifier array_len "TYPE" => $_[2], "PROPERTIES" => $_[1], "POINTERS" => $_[3], - "ARRAY_LEN" => $_[5] + "ARRAY_LEN" => $_[5], + "FILE" => $_[0]->YYData->{INPUT_FILENAME}, + "LINE" => $_[0]->YYData->{LINE}, }} ; @@ -287,7 +305,7 @@ optional_semicolon: use util; sub _Error { - if (exists $_[0]->YYData->{ERRMSG}) { + if (exists $_[0]->YYData->{ERRMSG}) { print $_[0]->YYData->{ERRMSG}; delete $_[0]->YYData->{ERRMSG}; return; @@ -373,20 +391,5 @@ sub parse_idl($$) my $idl = $self->YYParse( yylex => \&_Lexer, yyerror => \&_Error ); - foreach my $x (@{$idl}) { - # Do the inheritance - if (defined($x->{BASE}) and $x->{BASE} ne "") { - my $parent = util::get_interface($idl, $x->{BASE}); - - if(not defined($parent)) { - die("No such parent interface " . $x->{BASE}); - } - - @{$x->{INHERITED_DATA}} = (@{$parent->{INHERITED_DATA}}, @{$x->{DATA}}); - } else { - $x->{INHERITED_DATA} = $x->{DATA}; - } - } - return util::CleanData($idl); } |