1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r3431: Allow optional semicolon after interface definitions

This commit is contained in:
Jelmer Vernooij 2004-11-01 12:26:59 +00:00 committed by Gerald (Jerry) Carter
parent fe381c3ebc
commit edbd789abb
2 changed files with 201 additions and 178 deletions

View File

@ -974,7 +974,13 @@ sub new {
DEFAULT => -15 DEFAULT => -15
}, },
{#State 65 {#State 65
DEFAULT => -3 ACTIONS => {
";" => 76
},
DEFAULT => -70,
GOTOS => {
'optional_semicolon' => 75
}
}, },
{#State 66 {#State 66
DEFAULT => -7 DEFAULT => -7
@ -984,7 +990,7 @@ sub new {
'IDENTIFIER' => 7 'IDENTIFIER' => 7
}, },
GOTOS => { GOTOS => {
'identifier' => 75 'identifier' => 77
} }
}, },
{#State 68 {#State 68
@ -992,7 +998,7 @@ sub new {
'IDENTIFIER' => 7 'IDENTIFIER' => 7
}, },
GOTOS => { GOTOS => {
'identifier' => 76 'identifier' => 78
} }
}, },
{#State 69 {#State 69
@ -1005,7 +1011,7 @@ sub new {
GOTOS => { GOTOS => {
'identifier' => 18, 'identifier' => 18,
'text' => 19, 'text' => 19,
'anytext' => 77, 'anytext' => 79,
'constant' => 22 'constant' => 22
} }
}, },
@ -1019,7 +1025,7 @@ sub new {
GOTOS => { GOTOS => {
'identifier' => 18, 'identifier' => 18,
'text' => 19, 'text' => 19,
'anytext' => 78, 'anytext' => 80,
'constant' => 22 'constant' => 22
} }
}, },
@ -1028,41 +1034,47 @@ sub new {
'IDENTIFIER' => 7 'IDENTIFIER' => 7
}, },
GOTOS => { GOTOS => {
'identifier' => 79, 'identifier' => 81,
'enum_element' => 80, 'enum_element' => 82,
'enum_elements' => 81 'enum_elements' => 83
} }
}, },
{#State 72 {#State 72
ACTIONS => { ACTIONS => {
"{" => 82 "{" => 84
} }
}, },
{#State 73 {#State 73
ACTIONS => { ACTIONS => {
"{" => 83 "{" => 85
} }
}, },
{#State 74 {#State 74
ACTIONS => { ACTIONS => {
"[" => 85 "[" => 87
}, },
DEFAULT => -41, DEFAULT => -41,
GOTOS => { GOTOS => {
'array_len' => 84 'array_len' => 86
} }
}, },
{#State 75 {#State 75
ACTIONS => { DEFAULT => -3
"(" => 86
}
}, },
{#State 76 {#State 76
ACTIONS => { DEFAULT => -71
"=" => 87
}
}, },
{#State 77 {#State 77
ACTIONS => {
"(" => 88
}
},
{#State 78
ACTIONS => {
"=" => 89
}
},
{#State 79
ACTIONS => { ACTIONS => {
"-" => 27, "-" => 27,
"+" => 28, "+" => 28,
@ -1076,87 +1088,73 @@ sub new {
}, },
DEFAULT => -53 DEFAULT => -53
}, },
{#State 78
DEFAULT => -66
},
{#State 79
ACTIONS => {
"=" => 88
},
DEFAULT => -22
},
{#State 80 {#State 80
DEFAULT => -20 DEFAULT => -66
}, },
{#State 81 {#State 81
ACTIONS => { ACTIONS => {
"}" => 89, "=" => 90
"," => 90 },
} DEFAULT => -22
}, },
{#State 82 {#State 82
ACTIONS => { DEFAULT => -20
"[" => 93
},
GOTOS => {
'union_elements' => 91,
'union_element' => 92
}
}, },
{#State 83 {#State 83
DEFAULT => -35, ACTIONS => {
GOTOS => { "}" => 91,
'element_list1' => 94 "," => 92
} }
}, },
{#State 84 {#State 84
ACTIONS => { ACTIONS => {
";" => 95 "[" => 95
},
GOTOS => {
'union_elements' => 93,
'union_element' => 94
} }
}, },
{#State 85 {#State 85
ACTIONS => { DEFAULT => -35,
'IDENTIFIER' => 7,
'CONSTANT' => 23,
'TEXT' => 17,
"]" => 97
},
DEFAULT => -54,
GOTOS => { GOTOS => {
'identifier' => 18, 'element_list1' => 96
'text' => 19,
'anytext' => 96,
'constant' => 22
} }
}, },
{#State 86 {#State 86
ACTIONS => { ACTIONS => {
"void" => 100, ";" => 97
"," => -37,
")" => -37
},
DEFAULT => -44,
GOTOS => {
'base_element' => 98,
'element_list2' => 101,
'property_list' => 99
} }
}, },
{#State 87 {#State 87
ACTIONS => { ACTIONS => {
'IDENTIFIER' => 7, 'IDENTIFIER' => 7,
'CONSTANT' => 23, 'CONSTANT' => 23,
'TEXT' => 17 'TEXT' => 17,
"]" => 99
}, },
DEFAULT => -54, DEFAULT => -54,
GOTOS => { GOTOS => {
'identifier' => 18, 'identifier' => 18,
'text' => 19, 'text' => 19,
'anytext' => 102, 'anytext' => 98,
'constant' => 22 'constant' => 22
} }
}, },
{#State 88 {#State 88
ACTIONS => {
"void" => 102,
"," => -37,
")" => -37
},
DEFAULT => -44,
GOTOS => {
'base_element' => 100,
'element_list2' => 103,
'property_list' => 101
}
},
{#State 89
ACTIONS => { ACTIONS => {
'IDENTIFIER' => 7, 'IDENTIFIER' => 7,
'CONSTANT' => 23, 'CONSTANT' => 23,
@ -1166,54 +1164,68 @@ sub new {
GOTOS => { GOTOS => {
'identifier' => 18, 'identifier' => 18,
'text' => 19, 'text' => 19,
'anytext' => 103, 'anytext' => 104,
'constant' => 22 'constant' => 22
} }
}, },
{#State 89 {#State 90
ACTIONS => {
'IDENTIFIER' => 7,
'CONSTANT' => 23,
'TEXT' => 17
},
DEFAULT => -54,
GOTOS => {
'identifier' => 18,
'text' => 19,
'anytext' => 105,
'constant' => 22
}
},
{#State 91
DEFAULT => -19 DEFAULT => -19
}, },
{#State 90 {#State 92
ACTIONS => { ACTIONS => {
'IDENTIFIER' => 7 'IDENTIFIER' => 7
}, },
GOTOS => { GOTOS => {
'identifier' => 79, 'identifier' => 81,
'enum_element' => 104 'enum_element' => 106
} }
}, },
{#State 91
ACTIONS => {
"}" => 105,
"[" => 93
},
GOTOS => {
'union_element' => 106
}
},
{#State 92
DEFAULT => -26
},
{#State 93 {#State 93
ACTIONS => { ACTIONS => {
"case" => 107, "}" => 107,
"default" => 108 "[" => 95
},
GOTOS => {
'union_element' => 108
} }
}, },
{#State 94 {#State 94
DEFAULT => -26
},
{#State 95
ACTIONS => { ACTIONS => {
"}" => 109 "case" => 109,
"default" => 110
}
},
{#State 96
ACTIONS => {
"}" => 111
}, },
DEFAULT => -44, DEFAULT => -44,
GOTOS => { GOTOS => {
'base_element' => 110, 'base_element' => 112,
'property_list' => 99 'property_list' => 101
} }
}, },
{#State 95 {#State 97
DEFAULT => -13 DEFAULT => -13
}, },
{#State 96 {#State 98
ACTIONS => { ACTIONS => {
"-" => 27, "-" => 27,
"+" => 28, "+" => 28,
@ -1223,17 +1235,17 @@ sub new {
"|" => 31, "|" => 31,
"*" => 33, "*" => 33,
"." => 34, "." => 34,
"]" => 111, "]" => 113,
">" => 35 ">" => 35
} }
}, },
{#State 97 {#State 99
DEFAULT => -42 DEFAULT => -42
}, },
{#State 98 {#State 100
DEFAULT => -39 DEFAULT => -39
}, },
{#State 99 {#State 101
ACTIONS => { ACTIONS => {
'IDENTIFIER' => 7, 'IDENTIFIER' => 7,
"enum" => 57, "enum" => 57,
@ -1245,27 +1257,27 @@ sub new {
'identifier' => 60, 'identifier' => 60,
'struct' => 61, 'struct' => 61,
'enum' => 62, 'enum' => 62,
'type' => 112, 'type' => 114,
'union' => 64, 'union' => 64,
'property_list' => 59 'property_list' => 59
} }
}, },
{#State 100 {#State 102
DEFAULT => -38 DEFAULT => -38
}, },
{#State 101 {#State 103
ACTIONS => { ACTIONS => {
"," => 113, "," => 115,
")" => 114 ")" => 116
} }
}, },
{#State 102 {#State 104
ACTIONS => { ACTIONS => {
"-" => 27, "-" => 27,
"|" => 31, "|" => 31,
"(" => 32, "(" => 32,
"*" => 33, "*" => 33,
";" => 115, ";" => 117,
"+" => 28, "+" => 28,
"&" => 29, "&" => 29,
"/" => 30, "/" => 30,
@ -1273,7 +1285,7 @@ sub new {
">" => 35 ">" => 35
} }
}, },
{#State 103 {#State 105
ACTIONS => { ACTIONS => {
"-" => 27, "-" => 27,
"+" => 28, "+" => 28,
@ -1287,58 +1299,58 @@ sub new {
}, },
DEFAULT => -23 DEFAULT => -23
}, },
{#State 104 {#State 106
DEFAULT => -21 DEFAULT => -21
}, },
{#State 105 {#State 107
DEFAULT => -25 DEFAULT => -25
}, },
{#State 106 {#State 108
DEFAULT => -27 DEFAULT => -27
}, },
{#State 107
ACTIONS => {
"(" => 116
}
},
{#State 108
ACTIONS => {
"]" => 117
}
},
{#State 109 {#State 109
DEFAULT => -24 ACTIONS => {
"(" => 118
}
}, },
{#State 110 {#State 110
ACTIONS => { ACTIONS => {
";" => 118 "]" => 119
} }
}, },
{#State 111 {#State 111
DEFAULT => -43 DEFAULT => -24
}, },
{#State 112 {#State 112
DEFAULT => -33, ACTIONS => {
GOTOS => { ";" => 120
'pointers' => 119
} }
}, },
{#State 113 {#State 113
DEFAULT => -44, DEFAULT => -43
GOTOS => {
'base_element' => 120,
'property_list' => 99
}
}, },
{#State 114 {#State 114
ACTIONS => { DEFAULT => -33,
";" => 121 GOTOS => {
'pointers' => 121
} }
}, },
{#State 115 {#State 115
DEFAULT => -11 DEFAULT => -44,
GOTOS => {
'base_element' => 122,
'property_list' => 101
}
}, },
{#State 116 {#State 116
ACTIONS => {
";" => 123
}
},
{#State 117
DEFAULT => -11
},
{#State 118
ACTIONS => { ACTIONS => {
'IDENTIFIER' => 7, 'IDENTIFIER' => 7,
'CONSTANT' => 23, 'CONSTANT' => 23,
@ -1348,39 +1360,39 @@ sub new {
GOTOS => { GOTOS => {
'identifier' => 18, 'identifier' => 18,
'text' => 19, 'text' => 19,
'anytext' => 122, 'anytext' => 124,
'constant' => 22 'constant' => 22
} }
}, },
{#State 117 {#State 119
ACTIONS => { ACTIONS => {
";" => 123 ";" => 125
}, },
DEFAULT => -44, DEFAULT => -44,
GOTOS => { GOTOS => {
'base_element' => 124, 'base_element' => 126,
'property_list' => 99 'property_list' => 101
}
},
{#State 118
DEFAULT => -36
},
{#State 119
ACTIONS => {
'IDENTIFIER' => 7,
"*" => 126
},
GOTOS => {
'identifier' => 125
} }
}, },
{#State 120 {#State 120
DEFAULT => -40 DEFAULT => -36
}, },
{#State 121 {#State 121
DEFAULT => -12 ACTIONS => {
'IDENTIFIER' => 7,
"*" => 128
},
GOTOS => {
'identifier' => 127
}
}, },
{#State 122 {#State 122
DEFAULT => -40
},
{#State 123
DEFAULT => -12
},
{#State 124
ACTIONS => { ACTIONS => {
"-" => 27, "-" => 27,
"+" => 28, "+" => 28,
@ -1390,60 +1402,60 @@ sub new {
"|" => 31, "|" => 31,
"*" => 33, "*" => 33,
"." => 34, "." => 34,
")" => 127, ")" => 129,
">" => 35 ">" => 35
} }
}, },
{#State 123 {#State 125
DEFAULT => -31 DEFAULT => -31
}, },
{#State 124
ACTIONS => {
";" => 128
}
},
{#State 125
ACTIONS => {
"[" => 85
},
DEFAULT => -41,
GOTOS => {
'array_len' => 129
}
},
{#State 126 {#State 126
DEFAULT => -34 ACTIONS => {
";" => 130
}
}, },
{#State 127 {#State 127
ACTIONS => { ACTIONS => {
"]" => 130 "[" => 87
},
DEFAULT => -41,
GOTOS => {
'array_len' => 131
} }
}, },
{#State 128 {#State 128
DEFAULT => -30 DEFAULT => -34
}, },
{#State 129 {#State 129
DEFAULT => -32
},
{#State 130
ACTIONS => { ACTIONS => {
";" => 131 "]" => 132
},
DEFAULT => -44,
GOTOS => {
'base_element' => 132,
'property_list' => 99
} }
}, },
{#State 130
DEFAULT => -30
},
{#State 131 {#State 131
DEFAULT => -29 DEFAULT => -32
}, },
{#State 132 {#State 132
ACTIONS => { ACTIONS => {
";" => 133 ";" => 133
},
DEFAULT => -44,
GOTOS => {
'base_element' => 134,
'property_list' => 101
} }
}, },
{#State 133 {#State 133
DEFAULT => -29
},
{#State 134
ACTIONS => {
";" => 135
}
},
{#State 135
DEFAULT => -28 DEFAULT => -28
} }
], ],
@ -1464,7 +1476,7 @@ sub
} }
], ],
[#Rule 3 [#Rule 3
'interface', 7, 'interface', 8,
sub sub
#line 25 "build/pidl/idl.yp" #line 25 "build/pidl/idl.yp"
{$_[3] => { {$_[3] => {
@ -1854,13 +1866,19 @@ sub
sub sub
#line 225 "build/pidl/idl.yp" #line 225 "build/pidl/idl.yp"
{ "\"$_[1]\"" } { "\"$_[1]\"" }
],
[#Rule 70
'optional_semicolon', 0, undef
],
[#Rule 71
'optional_semicolon', 1, undef
] ]
], ],
@_); @_);
bless($self,$class); bless($self,$class);
} }
#line 231 "build/pidl/idl.yp" #line 236 "build/pidl/idl.yp"
use util; use util;

View File

@ -21,7 +21,7 @@ idl:
} }
; ;
interface: property_list 'interface' identifier base_interface '{' definitions '}' interface: property_list 'interface' identifier base_interface '{' definitions '}' optional_semicolon
{$_[3] => { {$_[3] => {
"TYPE" => "INTERFACE", "TYPE" => "INTERFACE",
"PROPERTIES" => $_[1], "PROPERTIES" => $_[1],
@ -225,6 +225,11 @@ constant: CONSTANT
text: TEXT { "\"$_[1]\"" } text: TEXT { "\"$_[1]\"" }
; ;
optional_semicolon:
#empty
| ';'
;
##################################### #####################################
# start code # start code