KDevelop API Documentation

perlparser.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           perlparser.h  -  description
00003                              -------------------
00004     begin                : Sun Nov 2 2003
00005     copyright            : (C) 2003 by luc
00006     email                : luc@lieve
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef PERLPARSER_H
00019 #define PERLPARSER_H
00020 
00021 #include "kdevlanguagesupport.h"
00022 #include <codemodel.h>
00023 
00024 
00029 class perlparser {
00030   public: 
00031   perlparser(KDevCore* core,CodeModel* model, QString interpreter);
00032   perlparser();
00033   ~perlparser();
00034 
00035   void initialParse();
00036   void parse(const QString &fileName);
00037   void parseLines(QStringList* lines,const QString& fileName);
00038   const QStringList UseFiles();
00039   QString findLib( const QString& lib);
00040 
00041   private:
00042   //global functions to add to ClassStore
00043   void addPackage(const QString& fileName ,int lineNr , const QString& name);
00044   void addAttributetoScript(const QString& fileName ,int lineNr ,const QString& name);
00045   void addAttributetoPackage(const QString& fileName ,int lineNr ,const QString& name);
00046   void addClass(const QString& fileName ,int lineNr );
00047   void addConstructor(const QString& fileName ,int lineNr ,const QString& methodname);
00048   void addGlobalSub(const QString& fileName ,int lineNr , const QString& name, bool privatesub);
00049   void addScriptSub(const QString& fileName ,int lineNr , const QString& name, bool privatesub);
00050   void addClassMethod(const QString& fileName ,int lineNr , const QString& name , bool privatesub);
00051   void addPackageSub(const QString& fileName ,int lineNr , const QString& name, bool privatesub);
00052   void addParentClass(const QString& parent);
00053   void addScript(const QString& fileName ,int lineNr , const QString& name);
00054   void addUseLib(const QString& lib);
00055   void getPerlINC();
00056 
00057   bool    m_inpackage;
00058   bool    m_inscript;
00059   bool    m_inclass;
00060 
00061   QString m_lastsub;
00062   QString m_lastparentclass;
00063   QString m_lastattr;
00064   QString m_lastpackagename;
00065   QString m_lastscriptname;
00066 
00067   NamespaceDom m_lastscript;
00068   NamespaceDom m_lastpackage;
00069   ClassDom m_lastclass;
00070 
00071   //CodeModel
00072   CodeModel* m_model;
00073   KDevCore* m_core;
00074   FileDom m_file;
00075 
00076   //this willhav a list of INC paths
00077   QStringList m_INClist;
00078   //this will get a list off all files "use" in the perl files
00079   //and need additional parsing to include the classes in the classview
00080   QStringList m_usefiles;
00081 
00082   QString m_interpreter;
00083   
00084   
00085 };
00086 
00087 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:22:33 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003