/***************************************************************************
 *   Copyright (C) 2005 by Juergen Thies                                   *
 *   layout@juergenthies.de                                                *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed 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.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef returnValue
#define returnValue variant
#endif



/**
@author Juergen Thies
*/


   includes include[1000];
   keywords *globals;
   int includeCount;
   QString getFileName(int *row);
   void includeFile(int start, int end,QString fn);
   QString message(int row);
   errorreport *error;
   QString code;
   QString fileName;
   parserValue next(int *counter); 
   int tmpVarCounter;
   int lastCounter;
   QString addTmpKeyword(keywords **keywordLocal,variant r);
   void nextLine(int *counter);
   void nextCommand(int *counter);
   void endComment(int *counter);
   int row (int *counter);
   void closeBrace(int *counter);
   void closeParen(int *counter);
   void compute(returnValue *r,int *counter,keywords *keyword); 
   variant calculate(int *counter,keywords *keyword); 
   variant calculate(QString s,keywords **keyword); 
   void cleanKeywords(keywords **keywordLocal,keywords *keyword_);
   void generalTypeProcessing(int *counter,keywords **keywordLocal,varType ptrtype,varType t,bool single);
   void testParenOpen(int *counter);
   void testParenClose(int *counter);
   void testBracketOpen(int *counter);
   void testBracketClose(int *counter);
   void testDot(int *counter);
   void testComma(int *counter);
   void testSemicolon(int *counter);
   void testClassPointer(int *counter);
   bool checkClassPointer(int *counter);
   bool checkDot(int *counter);
   bool checkComma(int *counter);
   bool checkStaticClass(int *counter);
   bool checkParenClose(int *counter);
   bool checkParenOpen(int *counter);
   bool checkBracketClose(int *counter);
   bool checkBracketOpen(int *counter);
   bool checkSemicolon(int *counter);
   variant funcHandler (int *counter,int *funcCode,int *parameter, keywords *keyword, varType type);
   void run(int *counter,variant *r,keywords *globals,bool single=false,bool deleteKeywords=true);
   bool returnState;

