File indexing completed on 2024-04-28 16:26:26

0001 /**************************************************************************
0002 *   Copyright (C) 2011-2022 by Michel Ludwig (michel.ludwig@kdemail.net)       *
0003 ***************************************************************************/
0004 
0005 /***************************************************************************
0006  *                                                                         *
0007  *   This program is free software; you can redistribute it and/or modify  *
0008  *   it under the terms of the GNU General Public License as published by  *
0009  *   the Free Software Foundation; either version 2 of the License, or     *
0010  *   (at your option) any later version.                                   *
0011  *                                                                         *
0012  ***************************************************************************/
0013 
0014 #ifndef BIBTEXPARSER_H
0015 #define BIBTEXPARSER_H
0016 
0017 #include "documentinfo.h"
0018 #include "kileconstants.h"
0019 #include "kileextensions.h"
0020 #include "parser.h"
0021 
0022 namespace KileParser {
0023 
0024 class BibTeXParserInput : public ParserInput
0025 {
0026 public:
0027     BibTeXParserInput(const QUrl &url, const QStringList &textLines);
0028 
0029     QStringList textLines;
0030 };
0031 
0032 class BibTeXParserOutput : public ParserOutput {
0033 public:
0034     BibTeXParserOutput();
0035     virtual ~BibTeXParserOutput();
0036 
0037     QStringList bibItems;
0038 };
0039 
0040 
0041 class BibTeXParser : public Parser
0042 {
0043     Q_OBJECT
0044 
0045 public:
0046     BibTeXParser(ParserThread *parserThread, BibTeXParserInput *input, QObject *parent = Q_NULLPTR);
0047     virtual ~BibTeXParser();
0048 
0049     ParserOutput* parse() override;
0050 
0051 protected:
0052     QStringList m_textLines;
0053 };
0054 
0055 }
0056 
0057 #endif