From aba7014e41b120e8c4bac5d5dab91655b46a2175 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 27 May 2005 14:01:22 +0000 Subject: r7022: Add support for parsing definitions of multi-dimension arrays. This will also be required for supporting parsing pointers to arrays and arrays of pointers simultaneously. (This used to be commit a34f848b02a6e8284d62532a792a5136e846fe8f) --- source4/build/pidl/idl.yp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source4/build/pidl/idl.yp') diff --git a/source4/build/pidl/idl.yp b/source4/build/pidl/idl.yp index d58dc9d023..f81316cd9f 100644 --- a/source4/build/pidl/idl.yp +++ b/source4/build/pidl/idl.yp @@ -183,6 +183,7 @@ empty_element: property_list ';' "TYPE" => "EMPTY", "PROPERTIES" => $_[1], "POINTERS" => 0, + "ARRAY_LEN" => [], "FILE" => $_[0]->YYData->{INPUT_FILENAME}, "LINE" => $_[0]->YYData->{LINE}, }} @@ -238,9 +239,9 @@ element_list2: ; array_len: - #empty - | '[' ']' { "*" } - | '[' anytext ']' { "$_[2]" } + #empty { [] } + | '[' ']' array_len { push(@{$_[3]}, "*"); $_[3] } + | '[' anytext ']' array_len { push(@{$_[4]}, "$_[2]"); $_[4] } ; -- cgit