Changeset 57


Ignore:
Timestamp:
02/24/06 16:16:14 (9 years ago)
Author:
xi
Message:

Fix a few bugs.

Location:
branches/pyyaml3000
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/pyyaml3000/lib/yaml/__init__.py

    r55 r57  
    11 
    2 from error import YAMLError 
    3 from reader import Reader 
    4 from scanner import Scanner 
    5 from parser import Parser 
    6 from composer import Composer 
    7 from resolver import Resolver 
    8 from constructor import Constructor 
     2from error import * 
     3from reader import * 
     4from scanner import * 
     5from parser import * 
     6from composer import * 
     7from resolver import * 
     8from constructor import * 
    99 
    1010from tokens import * 
  • branches/pyyaml3000/lib/yaml/composer.py

    r55 r57  
     1 
     2__all__ = ['Composer', 'ComposerError'] 
    13 
    24from error import MarkedYAMLError 
  • branches/pyyaml3000/lib/yaml/constructor.py

    r56 r57  
     1 
     2__all__ = ['BaseConstructor', 'Constructor', 'ConstructorError', 
     3    'YAMLObject', 'YAMLObjectMetaclass'] 
    14 
    25from error import * 
     
    325328        return self.construct_mapping(node) 
    326329 
     330    def construct_undefined(self, node): 
     331        raise ConstructorError(None, None, 
     332                "could not determine a constructor for the tag %r" % node.tag.encode('utf-8'), 
     333                node.start_marker) 
     334 
    327335Constructor.add_constructor( 
    328336        u'tag:yaml.org,2002:null', 
     
    368376        u'tag:yaml.org,2002:map', 
    369377        Constructor.construct_yaml_map) 
     378 
     379Constructor.add_constructor(None, 
     380        Constructor.construct_undefined) 
    370381 
    371382class YAMLObjectMetaclass(type): 
  • branches/pyyaml3000/lib/yaml/parser.py

    r55 r57  
    6161# flow_sequence_entry: { ALIAS ANCHOR TAG SCALAR FLOW-SEQUENCE-START FLOW-MAPPING-START KEY } 
    6262# flow_mapping_entry: { ALIAS ANCHOR TAG SCALAR FLOW-SEQUENCE-START FLOW-MAPPING-START KEY } 
     63 
     64__all__ = ['Parser', 'ParserError'] 
    6365 
    6466from error import MarkedYAMLError 
  • branches/pyyaml3000/lib/yaml/resolver.py

    r56 r57  
    11 
     2__all__ = ['BaseResolver', 'Resolver', 'ResolverError'] 
     3 
     4from error import MarkedYAMLError 
    25from nodes import * 
    36 
    47import re 
     8 
     9# Not really used. 
     10class ResolverError(MarkedYAMLError): 
     11    pass 
    512 
    613class BaseResolver: 
  • branches/pyyaml3000/lib/yaml/scanner.py

    r55 r57  
    2020# TAG(value) 
    2121# SCALAR(value, plain) 
     22# 
     23# Read comments in the Scanner code for more details. 
     24# 
    2225 
    2326__all__ = ['Scanner', 'ScannerError'] 
  • branches/pyyaml3000/tests/data/spec-08-09.data

    r38 r57  
    66    double: "some text" 
    77collections: 
    8   sequence: !!seq [ !str entry, 
     8  sequence: !!seq [ !!str entry, 
    99    # Mapping entry: 
    1010      key: value ] 
  • branches/pyyaml3000/tests/test_structure.py

    r55 r57  
    22import test_appliance 
    33 
    4 from yaml.reader import Reader 
    5 from yaml.scanner import Scanner 
    6 from yaml.parser import * 
    7 from yaml.composer import * 
    8 from yaml.resolver import * 
    9 from yaml.constructor import * 
    10 from yaml.nodes import * 
     4from yaml import * 
    115 
    126class TestStructure(test_appliance.TestAppliance): 
     
    161155        return pairs 
    162156 
     157MyConstructor.add_constructor(None, MyConstructor.construct_scalar) 
     158 
    163159class TestConstructor(test_appliance.TestAppliance): 
    164160 
Note: See TracChangeset for help on using the changeset viewer.