Ignore:
Timestamp:
02/19/06 17:17:28 (8 years ago)
Author:
xi
Message:

Parser is done. Add iterator interfaces for Scanner and Parser.

File:
1 edited

Legend:

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

    r39 r51  
     1 
     2from reader import Reader 
     3from scanner import Scanner 
     4from parser import Parser 
     5 
     6from tokens import * 
     7from events import * 
     8 
     9def scan(data, Reader=Reader, Scanner=Scanner): 
     10    reader = Reader(data) 
     11    scanner = Scanner(reader) 
     12    return iter(scanner) 
     13 
     14def parse(data, Reader=Reader, Scanner=Scanner, Parser=Parser): 
     15    reader = Reader(data) 
     16    scanner = Scanner(reader) 
     17    parser = Parser(scanner) 
     18    return iter(parser) 
     19 
Note: See TracChangeset for help on using the changeset viewer.