source: pyyaml/trunk/lib/yaml/loader.py @ 137

Revision 137, 1.1 KB checked in by xi, 9 years ago (diff)

Refactor resolver.

RevLine 
[136]1
2__all__ = ['BaseLoader', 'SafeLoader', 'Loader']
3
4from reader import *
5from scanner import *
6from parser import *
7from composer import *
8from constructor import *
[137]9from resolver import *
[136]10
[137]11class BaseLoader(Reader, Scanner, Parser, Composer, BaseConstructor, BaseResolver):
[136]12
13    def __init__(self, stream):
14        Reader.__init__(self, stream)
15        Scanner.__init__(self)
16        Parser.__init__(self)
[137]17        Composer.__init__(self)
[136]18        BaseConstructor.__init__(self)
[137]19        BaseResolver.__init__(self)
[136]20
[137]21class SafeLoader(Reader, Scanner, Parser, Composer, SafeConstructor, Resolver):
[136]22
23    def __init__(self, stream):
24        Reader.__init__(self, stream)
25        Scanner.__init__(self)
26        Parser.__init__(self)
27        Composer.__init__(self)
28        SafeConstructor.__init__(self)
[137]29        Resolver.__init__(self)
[136]30
[137]31class Loader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
[136]32
33    def __init__(self, stream):
34        Reader.__init__(self, stream)
35        Scanner.__init__(self)
36        Parser.__init__(self)
37        Composer.__init__(self)
38        Constructor.__init__(self)
[137]39        Resolver.__init__(self)
[136]40
Note: See TracBrowser for help on using the repository browser.