Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 1 | %{ |
| 2 | |
| 3 | /** |
| 4 | * Thrift parser. |
| 5 | * |
| 6 | * This parser is used on a thrift definition file. |
| 7 | * |
| 8 | * @author Mark Slee <mcslee@facebook.com> |
| 9 | */ |
| 10 | |
| 11 | #include <stdio.h> |
| 12 | #include "main.h" |
| 13 | #include "globals.h" |
| 14 | #include "parse/t_program.h" |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 15 | #include "parse/t_scope.h" |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 16 | |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 17 | /** |
| 18 | * This global variable is used for automatic numbering of field indices etc. |
| 19 | * when parsing the members of a struct. Field values are automatically |
| 20 | * assigned starting from -1 and working their way down. |
| 21 | */ |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 22 | int y_field_val = -1; |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 23 | |
| 24 | %} |
| 25 | |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 26 | /** |
| 27 | * This structure is used by the parser to hold the data types associated with |
| 28 | * various parse nodes. |
| 29 | */ |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 30 | %union { |
Mark Slee | 3015287 | 2006-11-28 01:24:07 +0000 | [diff] [blame] | 31 | char* id; |
| 32 | int iconst; |
| 33 | double dconst; |
| 34 | bool tbool; |
| 35 | t_type* ttype; |
| 36 | t_typedef* ttypedef; |
| 37 | t_enum* tenum; |
| 38 | t_enum_value* tenumv; |
| 39 | t_const* tconst; |
| 40 | t_const_value* tconstv; |
| 41 | t_struct* tstruct; |
| 42 | t_service* tservice; |
| 43 | t_function* tfunction; |
| 44 | t_field* tfield; |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 45 | } |
| 46 | |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 47 | /** |
| 48 | * Strings identifier |
| 49 | */ |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 50 | %token<id> tok_identifier |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 51 | %token<id> tok_literal |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 52 | |
| 53 | /** |
Mark Slee | 3015287 | 2006-11-28 01:24:07 +0000 | [diff] [blame] | 54 | * Constant values |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 55 | */ |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 56 | %token<iconst> tok_int_constant |
Mark Slee | 3015287 | 2006-11-28 01:24:07 +0000 | [diff] [blame] | 57 | %token<dconst> tok_dub_constant |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 58 | |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 59 | /** |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 60 | * Header keywoards |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 61 | */ |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 62 | %token tok_include |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 63 | %token tok_namespace |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 64 | %token tok_cpp_namespace |
| 65 | %token tok_cpp_include |
| 66 | %token tok_cpp_type |
Mark Slee | e888b37 | 2007-01-12 01:06:24 +0000 | [diff] [blame] | 67 | %token tok_php_namespace |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 68 | %token tok_java_package |
Mark Slee | 782abbb | 2007-01-19 00:17:02 +0000 | [diff] [blame] | 69 | %token tok_xsd_all |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 70 | %token tok_xsd_optional |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 71 | |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 72 | /** |
| 73 | * Base datatype keywords |
| 74 | */ |
| 75 | %token tok_void |
Mark Slee | 78f58e2 | 2006-09-02 04:17:07 +0000 | [diff] [blame] | 76 | %token tok_bool |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 77 | %token tok_byte |
| 78 | %token tok_string |
Mark Slee | b6200d8 | 2007-01-19 19:14:36 +0000 | [diff] [blame] | 79 | %token tok_slist |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 80 | %token tok_i16 |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 81 | %token tok_i32 |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 82 | %token tok_i64 |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 83 | %token tok_double |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 84 | |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 85 | /** |
| 86 | * Complex type keywords |
| 87 | */ |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 88 | %token tok_map |
| 89 | %token tok_list |
| 90 | %token tok_set |
| 91 | |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 92 | /** |
| 93 | * Function modifiers |
| 94 | */ |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 95 | %token tok_async |
| 96 | |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 97 | /** |
| 98 | * Thrift language keywords |
| 99 | */ |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 100 | %token tok_typedef |
| 101 | %token tok_struct |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 102 | %token tok_xception |
| 103 | %token tok_throws |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 104 | %token tok_extends |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 105 | %token tok_service |
| 106 | %token tok_enum |
Mark Slee | 3015287 | 2006-11-28 01:24:07 +0000 | [diff] [blame] | 107 | %token tok_const |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 108 | |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 109 | /** |
| 110 | * Grammar nodes |
| 111 | */ |
| 112 | |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 113 | %type<ttype> BaseType |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 114 | %type<ttype> ContainerType |
| 115 | %type<ttype> MapType |
| 116 | %type<ttype> SetType |
| 117 | %type<ttype> ListType |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 118 | |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 119 | %type<ttype> TypeDefinition |
| 120 | |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 121 | %type<ttypedef> Typedef |
| 122 | %type<ttype> DefinitionType |
| 123 | |
| 124 | %type<tfield> Field |
| 125 | %type<ttype> FieldType |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 126 | %type<tstruct> FieldList |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 127 | |
| 128 | %type<tenum> Enum |
| 129 | %type<tenum> EnumDefList |
Mark Slee | 3015287 | 2006-11-28 01:24:07 +0000 | [diff] [blame] | 130 | %type<tenumv> EnumDef |
| 131 | |
| 132 | %type<tconst> Const |
| 133 | %type<tconstv> ConstValue |
| 134 | %type<tconstv> ConstList |
| 135 | %type<tconstv> ConstListContents |
| 136 | %type<tconstv> ConstMap |
| 137 | %type<tconstv> ConstMapContents |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 138 | |
| 139 | %type<tstruct> Struct |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 140 | %type<tstruct> Xception |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 141 | %type<tservice> Service |
| 142 | |
| 143 | %type<tfunction> Function |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 144 | %type<ttype> FunctionType |
| 145 | %type<tservice> FunctionList |
| 146 | |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 147 | %type<tstruct> Throws |
| 148 | %type<tservice> Extends |
| 149 | %type<tbool> Async |
| 150 | %type<tbool> XsdAll |
| 151 | %type<tbool> XsdOptional |
| 152 | %type<id> CppType |
Mark Slee | 52f643d | 2006-08-09 00:03:43 +0000 | [diff] [blame] | 153 | |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 154 | %% |
| 155 | |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 156 | /** |
| 157 | * Thrift Grammar Implementation. |
| 158 | * |
| 159 | * For the most part this source file works its way top down from what you |
| 160 | * might expect to find in a typical .thrift file, i.e. type definitions and |
| 161 | * namespaces up top followed by service definitions using those types. |
| 162 | */ |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 163 | |
| 164 | Program: |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 165 | HeaderList DefinitionList |
| 166 | { |
| 167 | pdebug("Program -> Headers DefinitionList"); |
| 168 | } |
| 169 | |
| 170 | HeaderList: |
| 171 | HeaderList Header |
| 172 | { |
| 173 | pdebug("HeaderList -> HeaderList Header"); |
| 174 | } |
| 175 | | |
| 176 | { |
| 177 | pdebug("HeaderList -> "); |
| 178 | } |
| 179 | |
| 180 | Header: |
| 181 | Include |
| 182 | { |
| 183 | pdebug("Header -> Include"); |
| 184 | } |
| 185 | | tok_namespace tok_identifier |
| 186 | { |
| 187 | pwarning(1, "'namespace' is deprecated. Use 'cpp_namespace' and/or 'java_package' instead"); |
| 188 | if (g_parse_mode == PROGRAM) { |
| 189 | g_program->set_cpp_namespace($2); |
| 190 | g_program->set_java_package($2); |
| 191 | } |
| 192 | } |
| 193 | | tok_cpp_namespace tok_identifier |
| 194 | { |
| 195 | pdebug("Header -> tok_cpp_namespace tok_identifier"); |
| 196 | if (g_parse_mode == PROGRAM) { |
| 197 | g_program->set_cpp_namespace($2); |
| 198 | } |
| 199 | } |
| 200 | | tok_cpp_include tok_literal |
| 201 | { |
| 202 | pdebug("Header -> tok_cpp_include tok_literal"); |
| 203 | if (g_parse_mode == PROGRAM) { |
| 204 | g_program->add_cpp_include($2); |
| 205 | } |
| 206 | } |
Mark Slee | e888b37 | 2007-01-12 01:06:24 +0000 | [diff] [blame] | 207 | | tok_php_namespace tok_identifier |
| 208 | { |
| 209 | pdebug("Header -> tok_php_namespace tok_identifier"); |
| 210 | if (g_parse_mode == PROGRAM) { |
| 211 | g_program->set_php_namespace($2); |
| 212 | } |
| 213 | } |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 214 | | tok_java_package tok_identifier |
| 215 | { |
| 216 | pdebug("Header -> tok_java_package tok_identifier"); |
| 217 | if (g_parse_mode == PROGRAM) { |
| 218 | g_program->set_java_package($2); |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | Include: |
| 223 | tok_include tok_literal |
| 224 | { |
| 225 | pdebug("Include -> tok_include tok_literal"); |
| 226 | if (g_parse_mode == INCLUDES) { |
| 227 | std::string path = include_file(std::string($2)); |
| 228 | if (!path.empty()) { |
| 229 | g_program->add_include(path); |
| 230 | } |
| 231 | } |
| 232 | } |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 233 | |
| 234 | DefinitionList: |
| 235 | DefinitionList Definition |
| 236 | { |
| 237 | pdebug("DefinitionList -> DefinitionList Definition"); |
| 238 | } |
| 239 | | |
| 240 | { |
| 241 | pdebug("DefinitionList -> "); |
| 242 | } |
| 243 | |
| 244 | Definition: |
Mark Slee | 3015287 | 2006-11-28 01:24:07 +0000 | [diff] [blame] | 245 | Const |
| 246 | { |
| 247 | pdebug("Definition -> Const"); |
| 248 | if (g_parse_mode == PROGRAM) { |
| 249 | g_program->add_const($1); |
| 250 | } |
| 251 | } |
| 252 | | TypeDefinition |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 253 | { |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 254 | pdebug("Definition -> TypeDefinition"); |
| 255 | if (g_parse_mode == PROGRAM) { |
| 256 | g_scope->add_type($1->get_name(), $1); |
| 257 | if (g_parent_scope != NULL) { |
| 258 | g_parent_scope->add_type(g_parent_prefix + $1->get_name(), $1); |
| 259 | } |
| 260 | } |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 261 | } |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 262 | | Service |
| 263 | { |
| 264 | pdebug("Definition -> Service"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 265 | if (g_parse_mode == PROGRAM) { |
| 266 | g_scope->add_service($1->get_name(), $1); |
| 267 | if (g_parent_scope != NULL) { |
| 268 | g_parent_scope->add_service(g_parent_prefix + $1->get_name(), $1); |
| 269 | } |
| 270 | g_program->add_service($1); |
| 271 | } |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 272 | } |
| 273 | |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 274 | TypeDefinition: |
| 275 | Typedef |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 276 | { |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 277 | pdebug("TypeDefinition -> Typedef"); |
| 278 | if (g_parse_mode == PROGRAM) { |
| 279 | g_program->add_typedef($1); |
| 280 | } |
| 281 | } |
| 282 | | Enum |
| 283 | { |
| 284 | pdebug("TypeDefinition -> Enum"); |
| 285 | if (g_parse_mode == PROGRAM) { |
| 286 | g_program->add_enum($1); |
| 287 | } |
| 288 | } |
| 289 | | Struct |
| 290 | { |
| 291 | pdebug("TypeDefinition -> Struct"); |
| 292 | if (g_parse_mode == PROGRAM) { |
| 293 | g_program->add_struct($1); |
| 294 | } |
| 295 | } |
| 296 | | Xception |
| 297 | { |
| 298 | pdebug("TypeDefinition -> Xception"); |
| 299 | if (g_parse_mode == PROGRAM) { |
| 300 | g_program->add_xception($1); |
| 301 | } |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 302 | } |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 303 | |
| 304 | Typedef: |
| 305 | tok_typedef DefinitionType tok_identifier |
| 306 | { |
| 307 | pdebug("TypeDef -> tok_typedef DefinitionType tok_identifier"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 308 | t_typedef *td = new t_typedef(g_program, $2, $3); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 309 | $$ = td; |
| 310 | } |
| 311 | |
| 312 | Enum: |
| 313 | tok_enum tok_identifier '{' EnumDefList '}' |
| 314 | { |
| 315 | pdebug("Enum -> tok_enum tok_identifier { EnumDefList }"); |
| 316 | $$ = $4; |
| 317 | $$->set_name($2); |
| 318 | } |
| 319 | |
Mark Slee | 207cb46 | 2006-11-02 18:43:12 +0000 | [diff] [blame] | 320 | CommaOrSemicolonOptional: |
| 321 | ',' |
| 322 | {} |
| 323 | | ';' |
| 324 | {} |
| 325 | | |
| 326 | {} |
| 327 | |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 328 | EnumDefList: |
Mark Slee | 207cb46 | 2006-11-02 18:43:12 +0000 | [diff] [blame] | 329 | EnumDefList EnumDef |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 330 | { |
| 331 | pdebug("EnumDefList -> EnumDefList EnumDef"); |
| 332 | $$ = $1; |
Mark Slee | 207cb46 | 2006-11-02 18:43:12 +0000 | [diff] [blame] | 333 | $$->append($2); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 334 | } |
| 335 | | |
| 336 | { |
| 337 | pdebug("EnumDefList -> "); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 338 | $$ = new t_enum(g_program); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 339 | } |
| 340 | |
| 341 | EnumDef: |
Mark Slee | 207cb46 | 2006-11-02 18:43:12 +0000 | [diff] [blame] | 342 | tok_identifier '=' tok_int_constant CommaOrSemicolonOptional |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 343 | { |
Mark Slee | 3015287 | 2006-11-28 01:24:07 +0000 | [diff] [blame] | 344 | pdebug("EnumDef -> tok_identifier = tok_int_constant"); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 345 | if ($3 < 0) { |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 346 | pwarning(1, "Negative value supplied for enum %s.\n", $1); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 347 | } |
Mark Slee | 3015287 | 2006-11-28 01:24:07 +0000 | [diff] [blame] | 348 | $$ = new t_enum_value($1, $3); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 349 | } |
| 350 | | |
Mark Slee | 04cc605 | 2006-11-15 21:25:34 +0000 | [diff] [blame] | 351 | tok_identifier CommaOrSemicolonOptional |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 352 | { |
Mark Slee | 3015287 | 2006-11-28 01:24:07 +0000 | [diff] [blame] | 353 | pdebug("EnumDef -> tok_identifier"); |
| 354 | $$ = new t_enum_value($1); |
| 355 | } |
| 356 | |
| 357 | Const: |
| 358 | tok_const FieldType tok_identifier '=' ConstValue CommaOrSemicolonOptional |
| 359 | { |
| 360 | pdebug("Const -> tok_const FieldType tok_identifier = ConstValue"); |
Mark Slee | aa7671d | 2006-11-29 03:19:31 +0000 | [diff] [blame] | 361 | if (g_parse_mode == PROGRAM) { |
| 362 | $$ = new t_const($2, $3, $5); |
| 363 | validate_const_type($$); |
| 364 | } else { |
| 365 | $$ = NULL; |
| 366 | } |
Mark Slee | 3015287 | 2006-11-28 01:24:07 +0000 | [diff] [blame] | 367 | } |
| 368 | |
| 369 | ConstValue: |
| 370 | tok_int_constant |
| 371 | { |
| 372 | pdebug("ConstValue => tok_int_constant"); |
| 373 | $$ = new t_const_value(); |
| 374 | $$->set_integer($1); |
| 375 | } |
| 376 | | tok_dub_constant |
| 377 | { |
| 378 | pdebug("ConstValue => tok_dub_constant"); |
| 379 | $$ = new t_const_value(); |
| 380 | $$->set_double($1); |
| 381 | } |
| 382 | | tok_literal |
| 383 | { |
| 384 | pdebug("ConstValue => tok_literal"); |
| 385 | $$ = new t_const_value(); |
| 386 | $$->set_string($1); |
| 387 | } |
Mark Slee | 67fc634 | 2006-11-29 03:37:04 +0000 | [diff] [blame] | 388 | | tok_identifier |
| 389 | { |
| 390 | pdebug("ConstValue => tok_identifier"); |
| 391 | $$ = new t_const_value(); |
| 392 | $$->set_string($1); |
| 393 | } |
Mark Slee | 3015287 | 2006-11-28 01:24:07 +0000 | [diff] [blame] | 394 | | ConstList |
| 395 | { |
| 396 | pdebug("ConstValue => ConstList"); |
| 397 | $$ = $1; |
| 398 | } |
| 399 | | ConstMap |
| 400 | { |
| 401 | pdebug("ConstValue => ConstMap"); |
| 402 | $$ = $1; |
| 403 | } |
| 404 | |
| 405 | ConstList: |
| 406 | '[' ConstListContents ']' |
| 407 | { |
| 408 | pdebug("ConstList => [ ConstListContents ]"); |
| 409 | $$ = $2; |
| 410 | } |
| 411 | |
| 412 | ConstListContents: |
| 413 | ConstListContents ConstValue CommaOrSemicolonOptional |
| 414 | { |
| 415 | pdebug("ConstListContents => ConstListContents ConstValue CommaOrSemicolonOptional"); |
| 416 | $$ = $1; |
| 417 | $$->add_list($2); |
| 418 | } |
| 419 | | |
| 420 | { |
| 421 | pdebug("ConstListContents =>"); |
| 422 | $$ = new t_const_value(); |
| 423 | $$->set_list(); |
| 424 | } |
| 425 | |
| 426 | ConstMap: |
| 427 | '{' ConstMapContents '}' |
| 428 | { |
| 429 | pdebug("ConstMap => { ConstMapContents }"); |
| 430 | $$ = $2; |
| 431 | } |
| 432 | |
| 433 | ConstMapContents: |
| 434 | ConstMapContents ConstValue ':' ConstValue CommaOrSemicolonOptional |
| 435 | { |
| 436 | pdebug("ConstMapContents => ConstMapContents ConstValue CommaOrSemicolonOptional"); |
| 437 | $$ = $1; |
| 438 | $$->add_map($2, $4); |
| 439 | } |
| 440 | | |
| 441 | { |
| 442 | pdebug("ConstMapContents =>"); |
| 443 | $$ = new t_const_value(); |
| 444 | $$->set_map(); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 445 | } |
| 446 | |
| 447 | Struct: |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 448 | tok_struct tok_identifier XsdAll '{' FieldList '}' |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 449 | { |
| 450 | pdebug("Struct -> tok_struct tok_identifier { FieldList }"); |
Mark Slee | 782abbb | 2007-01-19 00:17:02 +0000 | [diff] [blame] | 451 | $5->set_name($2); |
| 452 | $5->set_xsd_all($3); |
| 453 | $$ = $5; |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 454 | y_field_val = -1; |
| 455 | } |
| 456 | |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 457 | XsdAll: |
Mark Slee | 782abbb | 2007-01-19 00:17:02 +0000 | [diff] [blame] | 458 | tok_xsd_all |
| 459 | { |
| 460 | $$ = true; |
| 461 | } |
| 462 | | |
| 463 | { |
| 464 | $$ = false; |
| 465 | } |
| 466 | |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 467 | XsdOptional: |
| 468 | tok_xsd_optional |
| 469 | { |
| 470 | $$ = true; |
| 471 | } |
| 472 | | |
| 473 | { |
| 474 | $$ = false; |
| 475 | } |
| 476 | |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 477 | Xception: |
| 478 | tok_xception tok_identifier '{' FieldList '}' |
| 479 | { |
| 480 | pdebug("Xception -> tok_xception tok_identifier { FieldList }"); |
| 481 | $4->set_name($2); |
| 482 | $4->set_xception(true); |
| 483 | $$ = $4; |
| 484 | y_field_val = -1; |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 485 | } |
| 486 | |
| 487 | Service: |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 488 | tok_service tok_identifier Extends '{' FunctionList '}' |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 489 | { |
| 490 | pdebug("Service -> tok_service tok_identifier { FunctionList }"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 491 | $$ = $5; |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 492 | $$->set_name($2); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 493 | $$->set_extends($3); |
| 494 | } |
| 495 | |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 496 | Extends: |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 497 | tok_extends tok_identifier |
| 498 | { |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 499 | pdebug("Extends -> tok_extends tok_identifier"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 500 | $$ = NULL; |
| 501 | if (g_parse_mode == PROGRAM) { |
| 502 | $$ = g_scope->get_service($2); |
| 503 | if ($$ == NULL) { |
| 504 | yyerror("Service \"%s\" has not been defined.", $2); |
| 505 | exit(1); |
| 506 | } |
| 507 | } |
| 508 | } |
| 509 | | |
| 510 | { |
| 511 | $$ = NULL; |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 512 | } |
| 513 | |
| 514 | FunctionList: |
Mark Slee | 207cb46 | 2006-11-02 18:43:12 +0000 | [diff] [blame] | 515 | FunctionList Function |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 516 | { |
| 517 | pdebug("FunctionList -> FunctionList Function"); |
| 518 | $$ = $1; |
| 519 | $1->add_function($2); |
| 520 | } |
| 521 | | |
| 522 | { |
| 523 | pdebug("FunctionList -> "); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 524 | $$ = new t_service(g_program); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 525 | } |
| 526 | |
| 527 | Function: |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 528 | Async FunctionType tok_identifier '(' FieldList ')' Throws CommaOrSemicolonOptional |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 529 | { |
Mark Slee | b15a68b | 2006-06-07 06:46:24 +0000 | [diff] [blame] | 530 | $5->set_name(std::string($3) + "_args"); |
Mark Slee | 4e755ca | 2006-09-12 00:46:08 +0000 | [diff] [blame] | 531 | $$ = new t_function($2, $3, $5, $7, $1); |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 532 | y_field_val = -1; |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 533 | } |
| 534 | |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 535 | Async: |
Mark Slee | 52f643d | 2006-08-09 00:03:43 +0000 | [diff] [blame] | 536 | tok_async |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 537 | { |
Mark Slee | 52f643d | 2006-08-09 00:03:43 +0000 | [diff] [blame] | 538 | $$ = true; |
| 539 | } |
| 540 | | |
| 541 | { |
| 542 | $$ = false; |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 543 | } |
| 544 | |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 545 | Throws: |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 546 | tok_throws '(' FieldList ')' |
| 547 | { |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 548 | pdebug("Throws -> tok_throws ( FieldList )"); |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 549 | $$ = $3; |
| 550 | } |
| 551 | | |
| 552 | { |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 553 | $$ = new t_struct(g_program); |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 554 | } |
| 555 | |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 556 | FieldList: |
Mark Slee | 207cb46 | 2006-11-02 18:43:12 +0000 | [diff] [blame] | 557 | FieldList Field |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 558 | { |
| 559 | pdebug("FieldList -> FieldList , Field"); |
| 560 | $$ = $1; |
Mark Slee | 207cb46 | 2006-11-02 18:43:12 +0000 | [diff] [blame] | 561 | $$->append($2); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 562 | } |
| 563 | | |
| 564 | { |
| 565 | pdebug("FieldList -> "); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 566 | $$ = new t_struct(g_program); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 567 | } |
| 568 | |
| 569 | Field: |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 570 | tok_int_constant ':' FieldType tok_identifier XsdOptional CommaOrSemicolonOptional |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 571 | { |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 572 | pdebug("tok_int_constant : Field -> FieldType tok_identifier"); |
| 573 | if ($1 <= 0) { |
| 574 | pwarning(1, "Nonpositive value (%d) not allowed as a field key for '%s'.\n", $1, $4); |
| 575 | $1 = y_field_val--; |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 576 | } |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 577 | $$ = new t_field($3, $4, $1); |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 578 | $$->set_xsd_optional($5); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 579 | } |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 580 | | FieldType tok_identifier XsdOptional CommaOrSemicolonOptional |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 581 | { |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 582 | pdebug("Field -> FieldType tok_identifier"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 583 | pwarning(2, "No field key specified for '%s', resulting protocol may have conflicts or not be backwards compatible!\n", $2); |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 584 | $$ = new t_field($1, $2, y_field_val--); |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 585 | $$->set_xsd_optional($3); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 586 | } |
Mark Slee | 2329a83 | 2006-11-09 00:23:30 +0000 | [diff] [blame] | 587 | | FieldType tok_identifier '=' tok_int_constant CommaOrSemicolonOptional |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 588 | { |
Mark Slee | 2329a83 | 2006-11-09 00:23:30 +0000 | [diff] [blame] | 589 | pwarning(1, "Trailing = id notation is deprecated. Use 'Id: Type Name' notation instead"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 590 | pdebug("Field -> FieldType tok_identifier = tok_int_constant"); |
| 591 | if ($4 <= 0) { |
| 592 | pwarning(1, "Nonpositive value (%d) not allowed as a field key for '%s'.\n", $4, $2); |
| 593 | $4 = y_field_val--; |
| 594 | } |
| 595 | $$ = new t_field($1, $2, $4); |
| 596 | } |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 597 | |
| 598 | DefinitionType: |
| 599 | BaseType |
| 600 | { |
| 601 | pdebug("DefinitionType -> BaseType"); |
| 602 | $$ = $1; |
| 603 | } |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 604 | | ContainerType |
| 605 | { |
| 606 | pdebug("DefinitionType -> ContainerType"); |
| 607 | $$ = $1; |
| 608 | } |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 609 | |
| 610 | FunctionType: |
| 611 | FieldType |
| 612 | { |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 613 | pdebug("FunctionType -> FieldType"); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 614 | $$ = $1; |
| 615 | } |
| 616 | | tok_void |
| 617 | { |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 618 | pdebug("FunctionType -> tok_void"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 619 | $$ = g_type_void; |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 620 | } |
| 621 | |
| 622 | FieldType: |
| 623 | tok_identifier |
| 624 | { |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 625 | pdebug("FieldType -> tok_identifier"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 626 | if (g_parse_mode == INCLUDES) { |
| 627 | // Ignore identifiers in include mode |
| 628 | $$ = NULL; |
| 629 | } else { |
| 630 | // Lookup the identifier in the current scope |
| 631 | $$ = g_scope->get_type($1); |
| 632 | if ($$ == NULL) { |
| 633 | yyerror("Type \"%s\" has not been defined.", $1); |
| 634 | exit(1); |
| 635 | } |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 636 | } |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 637 | } |
| 638 | | BaseType |
| 639 | { |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 640 | pdebug("FieldType -> BaseType"); |
| 641 | $$ = $1; |
| 642 | } |
| 643 | | ContainerType |
| 644 | { |
| 645 | pdebug("FieldType -> ContainerType"); |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 646 | $$ = $1; |
| 647 | } |
| 648 | |
| 649 | BaseType: |
| 650 | tok_string |
| 651 | { |
| 652 | pdebug("BaseType -> tok_string"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 653 | $$ = g_type_string; |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 654 | } |
Mark Slee | b6200d8 | 2007-01-19 19:14:36 +0000 | [diff] [blame] | 655 | | tok_slist |
| 656 | { |
| 657 | pdebug("BaseType -> tok_slist"); |
| 658 | $$ = g_type_slist; |
| 659 | } |
Mark Slee | 78f58e2 | 2006-09-02 04:17:07 +0000 | [diff] [blame] | 660 | | tok_bool |
| 661 | { |
| 662 | pdebug("BaseType -> tok_bool"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 663 | $$ = g_type_bool; |
Mark Slee | 78f58e2 | 2006-09-02 04:17:07 +0000 | [diff] [blame] | 664 | } |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 665 | | tok_byte |
| 666 | { |
| 667 | pdebug("BaseType -> tok_byte"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 668 | $$ = g_type_byte; |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 669 | } |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 670 | | tok_i16 |
| 671 | { |
| 672 | pdebug("BaseType -> tok_i16"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 673 | $$ = g_type_i16; |
Mark Slee | 9cb7c61 | 2006-09-01 22:17:45 +0000 | [diff] [blame] | 674 | } |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 675 | | tok_i32 |
| 676 | { |
| 677 | pdebug("BaseType -> tok_i32"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 678 | $$ = g_type_i32; |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 679 | } |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 680 | | tok_i64 |
| 681 | { |
| 682 | pdebug("BaseType -> tok_i64"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 683 | $$ = g_type_i64; |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 684 | } |
Mark Slee | c98d050 | 2006-09-06 02:42:25 +0000 | [diff] [blame] | 685 | | tok_double |
| 686 | { |
| 687 | pdebug("BaseType -> tok_double"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 688 | $$ = g_type_double; |
Mark Slee | c98d050 | 2006-09-06 02:42:25 +0000 | [diff] [blame] | 689 | } |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 690 | |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 691 | ContainerType: |
| 692 | MapType |
| 693 | { |
| 694 | pdebug("ContainerType -> MapType"); |
| 695 | $$ = $1; |
| 696 | } |
| 697 | | SetType |
| 698 | { |
| 699 | pdebug("ContainerType -> SetType"); |
| 700 | $$ = $1; |
| 701 | } |
| 702 | | ListType |
| 703 | { |
| 704 | pdebug("ContainerType -> ListType"); |
| 705 | $$ = $1; |
| 706 | } |
| 707 | |
| 708 | MapType: |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 709 | tok_map CppType '<' FieldType ',' FieldType '>' |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 710 | { |
| 711 | pdebug("MapType -> tok_map <FieldType, FieldType>"); |
Mark Slee | 4f8da1d | 2006-10-12 02:47:27 +0000 | [diff] [blame] | 712 | $$ = new t_map($4, $6); |
| 713 | if ($2 != NULL) { |
| 714 | ((t_container*)$$)->set_cpp_name(std::string($2)); |
| 715 | } |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 716 | } |
| 717 | |
| 718 | SetType: |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 719 | tok_set CppType '<' FieldType '>' |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 720 | { |
| 721 | pdebug("SetType -> tok_set<FieldType>"); |
Mark Slee | 4f8da1d | 2006-10-12 02:47:27 +0000 | [diff] [blame] | 722 | $$ = new t_set($4); |
| 723 | if ($2 != NULL) { |
| 724 | ((t_container*)$$)->set_cpp_name(std::string($2)); |
| 725 | } |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 726 | } |
| 727 | |
| 728 | ListType: |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 729 | tok_list '<' FieldType '>' CppType |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 730 | { |
| 731 | pdebug("ListType -> tok_list<FieldType>"); |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 732 | $$ = new t_list($3); |
| 733 | if ($5 != NULL) { |
| 734 | ((t_container*)$$)->set_cpp_name(std::string($5)); |
Mark Slee | 4f8da1d | 2006-10-12 02:47:27 +0000 | [diff] [blame] | 735 | } |
| 736 | } |
| 737 | |
Mark Slee | 36bfa2e | 2007-01-19 20:09:51 +0000 | [diff] [blame] | 738 | CppType: |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 739 | '[' tok_cpp_type tok_literal ']' |
Mark Slee | 4f8da1d | 2006-10-12 02:47:27 +0000 | [diff] [blame] | 740 | { |
Mark Slee | f0712dc | 2006-10-25 19:03:57 +0000 | [diff] [blame] | 741 | $$ = $3; |
Mark Slee | 4f8da1d | 2006-10-12 02:47:27 +0000 | [diff] [blame] | 742 | } |
| 743 | | |
| 744 | { |
| 745 | $$ = NULL; |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 746 | } |
| 747 | |
Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 748 | %% |