OLD | NEW |
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | ExceptionField | 247 | ExceptionField |
248 | Attribute | 248 | Attribute |
249 | ExceptionOperation""" | 249 | ExceptionOperation""" |
250 # Standard is (no Attribute, no ExceptionOperation): | 250 # Standard is (no Attribute, no ExceptionOperation): |
251 # ExceptionMember : Const | 251 # ExceptionMember : Const |
252 # | ExceptionField | 252 # | ExceptionField |
253 # FIXME: In DOMException.idl, Attributes should be changed to | 253 # FIXME: In DOMException.idl, Attributes should be changed to |
254 # ExceptionFields, and Attribute removed from this rule. | 254 # ExceptionFields, and Attribute removed from this rule. |
255 p[0] = p[1] | 255 p[0] = p[1] |
256 | 256 |
257 # [b47.1] | 257 # [b47.1] FIXME: rename to ExceptionAttribute |
| 258 def p_Attribute(self, p): |
| 259 """Attribute : ReadOnly ATTRIBUTE Type identifier ';'""" |
| 260 p[0] = self.BuildNamed('Attribute', p, 4, |
| 261 ListFromConcat(p[1], p[3])) |
| 262 |
| 263 # [b47.2] |
258 def p_ExceptionOperation(self, p): | 264 def p_ExceptionOperation(self, p): |
259 """ExceptionOperation : Type identifier '(' ')' ';'""" | 265 """ExceptionOperation : Type identifier '(' ')' ';'""" |
260 # Needed to handle one case in DOMException.idl: | 266 # Needed to handle one case in DOMException.idl: |
261 # // Override in a Mozilla compatible format | 267 # // Override in a Mozilla compatible format |
262 # [NotEnumerable] DOMString toString(); | 268 # [NotEnumerable] DOMString toString(); |
263 # Limited form of Operation to prevent others from being added. | 269 # Limited form of Operation to prevent others from being added. |
264 # FIXME: Should be a stringifier instead. | 270 # FIXME: Should be a stringifier instead. |
265 p[0] = self.BuildNamed('ExceptionOperation', p, 2, p[1]) | 271 p[0] = self.BuildNamed('ExceptionOperation', p, 2, p[1]) |
266 | 272 |
267 # Extended attributes | 273 # Extended attributes |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 return 1 | 441 return 1 |
436 blink_idl_lexer.main(argv) | 442 blink_idl_lexer.main(argv) |
437 # Important: rewrite_tables=True causes the cache file to be deleted if it | 443 # Important: rewrite_tables=True causes the cache file to be deleted if it |
438 # exists, thus making sure that PLY doesn't load it instead of regenerating | 444 # exists, thus making sure that PLY doesn't load it instead of regenerating |
439 # the parse table. | 445 # the parse table. |
440 parser = BlinkIDLParser(outputdir=outputdir, rewrite_tables=True) | 446 parser = BlinkIDLParser(outputdir=outputdir, rewrite_tables=True) |
441 | 447 |
442 | 448 |
443 if __name__ == '__main__': | 449 if __name__ == '__main__': |
444 sys.exit(main(sys.argv)) | 450 sys.exit(main(sys.argv)) |
OLD | NEW |