blob: 55e3f388cacd6ff741969208c47ad448a6fc8fba [file] [log] [blame] [edit]
from error import *
from reader import *
from scanner import *
from parser import *
from composer import *
from resolver import *
from constructor import *
from tokens import *
from events import *
from nodes import *
def parse(data, Reader=Reader, Scanner=Scanner, Parser=Parser):
reader = Reader(data)
scanner = Scanner(reader)
parser = Parser(scanner)
return parser
def load(data, Reader=Reader, Scanner=Scanner, Parser=Parser,
Composer=Composer, Resolver=Resolver, Constructor=Constructor):
reader = Reader(data)
scanner = Scanner(reader)
parser = Parser(scanner)
composer = Composer(parser)
resolver = Resolver(composer)
constructor = Constructor(resolver)
return constructor
def load_document(*args, **kwds):
for document in load(*args, **kwds):
return document