/* load.pl:  load all the code needed for regex program.
 * Set any environment flags, search paths, etc.
 */

/* Copyright (c) 2008 World Wide Web Consortium, 
 * (Massachusetts Institute of Technology, European Research 
 * Consortium for Informatics and Mathematics, Keio University). 
 * All Rights Reserved. This work is distributed under the 
 * W3C(TM) Software License [1] in the hope that it will be 
 * useful, but WITHOUT ANY WARRANTY; without even the implied 
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
 */

/* This file is part of Xerophily, a parser for XSD regular expressions. */

/* Revisions:
 * 2009-12-30 : CMSMcQ : suppress reference to license.pl again
 *                       (makes dual licensing too complicated)
 * 2009-11-07 : CMSMcQ : add reference to license.pl
 * 2008-03-28 : CMSMcQ : made file 
 */

:- prolog_load_context(directory, Dir),
   asserta(user:file_search_path(regexes, Dir)).

/* :- ensure_loaded('license.pl'). */
:- ensure_loaded('regex.dcg.pl').
:- ensure_loaded('readxsd.pl').
:- use_module('g_opts.pl').
:- use_module('testgenerator1.pl').
:- use_module('parseregex.pl').
:- use_module('ast.pl').

/*
portray(parse(G,AST)) :-
	print('parse('),
	print(G),
	print(','),
	nl,
	print_ast(AST).
*/
portray(parse(G,AST)) :-
	xml_ast(parse(G,AST)).
portray(parses(G,AST)) :-
	xml_ast(parses(G,AST)).
	     
