1
/***************************************************************************
2
* Copyright (C) 2005 by Alexander Dymo *
5
* Copyright (c) 2005 by Matt Rogers *
8
* This program is free software; you can redistribute it and/or modify *
9
* it under the terms of the GNU Library General Public License as *
10
* published by the Free Software Foundation; either version 2 of the *
11
* License, or (at your option) any later version. *
13
* This program is distributed in the hope that it will be useful, *
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16
* GNU General Public License for more details. *
18
* You should have received a copy of the GNU Library General Public *
19
* License along with this program; if not, write to the *
20
* Free Software Foundation, Inc., *
21
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22
***************************************************************************/
23
#ifndef QMAKEQMAKEDRIVER_H
24
#define QMAKEQMAKEDRIVER_H
26
#include <qvaluelist.h>
32
@file autotoolsdriver.h
33
Driver for a qmake parser.
40
* Use methods of this class to lauch parsing and build the AST.
46
* Parses the file @p fileName and stores the resulting ProjectAST root
47
* into @p ast. @p ast should not be initialized before. Driver will
48
* initialize it on its own.
49
* @return The result of parsing. Result is 0 on success and <> 0 on failure.
51
static int parseFile(const char *fileName, ProjectAST **ast);
52
static int parseFile(QString fileName, ProjectAST **ast);
53
static int parseFile(KURL fileName, ProjectAST **ast);
56
static void walkAST(Op &op, const ProjectAST *ast)
59
for (QValueList<QMake::AST*>::const_iterator it = ast->statements.constBegin();
60
it != ast->statements.constEnd(); ++it)
62
const AST *child = *it;
63
if (child->nodeType() == AST::ProjectAST)
64
walkAST<Op>(op, static_cast<const QMake::ProjectAST*>(child));
76
// kate: indent-mode csands; tab-width 4; space-indent off; auto-insert-doxygen on;