/* * depend.aikido * * Aikido Language System, * export version: 1.00 * Copyright (c) 2002-2003 Sun Microsystems, Inc. * * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version 1.0 (the "License"). You * may not use this file except in compliance with the License. A copy of the License is available * at http://www.opensource.org/licenses/sunpublic.php * * The Original Code is Aikido. * The Initial Developer of the Original Code is David Allison on behalf of Sun Microsystems, Inc. * Copyright (C) Sun Microsystems, Inc. 2000-2003. All Rights Reserved. * * * Contributor(s): dallison * * Version: 1.2 * Created by dallison on 4/19/2002 * Last modified by dallison on 03/07/29 */ package CParser { extend Parser { public function findFunction (name) { foreach func functions { if (func.getName() == name) { return func.getDetails() } } return null } public function printFunctions { foreach func functions { var details = func.getDetails() if (details != null) { details.showDependencies() } else { println (func.getName(), ":") } func.getType().print (stdout, 0) if (details != null) { details.print (stdout, 0) } else { println() } } } public function dumpTree (root, stream) { if (numErrors != 0) { return } foreach v variables { v.dump (stream) } var body = root.getBody() if (body != null) { body.dump (stream) } '\n' -> stream } } }