00001 /* 00002 * File: re_node.cc 00003 * $Id: re_node.cc,v 1.2 2002/04/29 09:34:10 alec Exp $ 00004 * 00005 * Author: Alec Panoviciu (alecu@email.com) 00006 * 00007 * Comments: 00008 * 00009 * Revision history: 00010 * 00011 * $Log: re_node.cc,v $ 00012 * Revision 1.2 2002/04/29 09:34:10 alec 00013 * scanner ptree building compiles 00014 * 00015 */ 00016 00017 /* 00018 Copyright (C) 2002 Alexandru Panoviciu (alecu@email.com) 00019 00020 This program is free software; you can redistribute it and/or modify 00021 it under the terms of the GNU General Public License as published by 00022 the Free Software Foundation; either version 2 of the License, or 00023 (at your option) any later version. 00024 00025 This program is distributed in the hope that it will be useful, 00026 but WITHOUT ANY WARRANTY; without even the implied warranty of 00027 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00028 GNU General Public License for more details. 00029 00030 You should have received a copy of the GNU General Public License 00031 along with this program; if not, write to the Free Software 00032 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00033 00034 */ 00035 00036 #include "re_node.hh" 00037 #include "re_node_algo.hh" 00038 00039 bool ReNode::dfTraverse (ReNodeAlgo &algo) 00040 { 00041 for (int i = 0; i < getChildCount(); i++) 00042 if (!(*this)[i].dfTraverse(algo)) 00043 return false; 00044 00045 return algo(*this); 00046 }