diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-20 00:57:00 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-20 00:57:00 +0000 |
commit | fd15fc58e7b4dbe0d4eda81f979c8de97e9ac7ee (patch) | |
tree | 7dac35a824edf404097bb088d10425ed8cf73bfc /source4/build/pidl/idl.gram | |
parent | 940ce958a6914fb9b70de3cf95a0c062063e2253 (diff) | |
download | samba-fd15fc58e7b4dbe0d4eda81f979c8de97e9ac7ee.tar.gz samba-fd15fc58e7b4dbe0d4eda81f979c8de97e9ac7ee.tar.bz2 samba-fd15fc58e7b4dbe0d4eda81f979c8de97e9ac7ee.zip |
* added support for empty case elements (including default cases)
* changed to midl syntax using [case(x)] instead of case(x)
(This used to be commit 6ecdb25e137c25e6bf9a7037a4eb602ae1afc514)
Diffstat (limited to 'source4/build/pidl/idl.gram')
-rw-r--r-- | source4/build/pidl/idl.gram | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source4/build/pidl/idl.gram b/source4/build/pidl/idl.gram index 9b265b8cba..d90c2238b4 100644 --- a/source4/build/pidl/idl.gram +++ b/source4/build/pidl/idl.gram @@ -54,24 +54,29 @@ union: property_list(s?) 'union' <commit> '{' union_element(s?) '}' }} | <error?> -union_element: '[' 'case' '(' constant ')' ']' base_element ';' +union_element: + '[' 'case' '(' constant ')' ']' base_element ';' {{ "TYPE" => "UNION_ELEMENT", "CASE" => $item{constant}, "DATA" => $item{base_element} }} - | 'case' '(' constant ')' base_element ';' + | '[' 'case' '(' constant ')' ']' ';' {{ - "TYPE" => "UNION_ELEMENT", + "TYPE" => "EMPTY", "CASE" => $item{constant}, - "DATA" => $item{base_element} }} - | 'default' base_element ';' + | '[' 'default' ']' base_element ';' {{ "TYPE" => "UNION_ELEMENT", "CASE" => "default", "DATA" => $item{base_element} }} + | '[' 'default' ']' ';' + {{ + "TYPE" => "EMPTY", + "CASE" => "default", + }} base_element: property_list(s?) type pointer(s?) identifier array_len(?) {{ |