1/*****************************************************************************
    2 * This file is part of the Prolog Development Tool (PDT)
    3 * 
    4 * WWW: http://sewiki.iai.uni-bonn.de/research/pdt/start
    5 * Mail: pdt@lists.iai.uni-bonn.de
    6 * Copyright (C): 2004-2012, CS Dept. III, University of Bonn
    7 * 
    8 * All rights reserved. This program is  made available under the terms
    9 * of the Eclipse Public License v1.0 which accompanies this distribution,
   10 * and is available at http://www.eclipse.org/legal/epl-v10.html
   11 * 
   12 ****************************************************************************/
   13
   14%:- module(new_builder,[consult_entry_point_and_parse/2]).
   15
   16:- use_module(parse_util).   17
   18
   19/*
   20 * consult_entry_point_and_parse(+File, +Project)
   21 *    - loades the file represented by Arg1 and everything that has to 
   22 *   	be loaded together with it.
   23 *    - after that parses every file that was loaded in the first step inside 
   24 *      of the directory represented by Arg2 and builds the PEF-AST together
   25 *      with the edge informations 
   26 *      (see generate_facts/1 from parse_util_quick.pl).
   27 **/
   28consult_entry_point_and_parse(File, Project):-
   29    load_files(File,silent(true)),         
   30    %consult(File),
   31    findall(ToParse, 
   32    		(	source_file(ToParse),
   33				Project = Lc_Project,
   34      			atom_concat(Lc_Project,_,ToParse)
   35      		),
   36      		ParseList),
   37 %   	not(library_directory(Directory)),
   38    writeln(ParseList),
   39    generate_facts(ParseList).
   40%consult_entry_point_and_parse(_,_).