• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

Analitza

  • sources
  • kde-4.14
  • kdeedu
  • analitza
  • analitza
expressionparser.h
Go to the documentation of this file.
1 
2 #line 52 "exp.g"
3 
4 /*************************************************************************************
5  * Copyright (C) 2008 by Aleix Pol <aleixpol@kde.org> *
6  * *
7  * This program is free software; you can redistribute it and/or *
8  * modify it under the terms of the GNU General Public License *
9  * as published by the Free Software Foundation; either version 2 *
10  * of the License, or (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program; if not, write to the Free Software *
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
20  *************************************************************************************/
21 
22 #ifndef EXPRESSIONPARSER_H
23 #define EXPRESSIONPARSER_H
24 
25 #include <QtCore/QStringList>
26 #include <QtCore/QVector>
27 #include "expressiontable_p.h"
28 #include "analitzaexport.h"
29 class AbstractLexer;
30 
31 class ANALITZA_EXPORT ExpressionParser : protected ExpressionTable
32 {
33  public:
34  ExpressionParser();
35  ~ExpressionParser();
36 
37  bool parse(AbstractLexer *lexer);
38 
39  bool isCorrect() const { return m_err.isEmpty(); }
40  int errorLineNumber() const { return m_errorLineNumber; }
41  QStringList error() const { return m_err; }
42  QString mathML() const { return m_exp; }
43  QStringList comments() const { return m_comments; }
44 
45  private:
46  void reallocateStack();
47 
48  inline QString &sym(int index)
49  { return m_symStack[m_tos + index - 1]; }
50 
51  int m_tos;
52  QVector<int> m_stateStack;
53  QVector<QString> m_symStack;
54  int m_errorLineNumber;
55  QStringList m_err;
56  QString m_exp;
57  QStringList m_comments;
58 };
59 
60 #endif
61 
ExpressionParser::isCorrect
bool isCorrect() const
Definition: expressionparser.h:39
ExpressionParser::mathML
QString mathML() const
Definition: expressionparser.h:42
ExpressionParser::error
QStringList error() const
Definition: expressionparser.h:41
QString
QStringList
ExpressionParser::comments
QStringList comments() const
Definition: expressionparser.h:43
ExpressionParser::errorLineNumber
int errorLineNumber() const
Definition: expressionparser.h:40
analitzaexport.h
QVector< int >
ANALITZA_EXPORT
#define ANALITZA_EXPORT
Definition: analitzaexport.h:31
ExpressionParser
Definition: expressionparser.h:31
ExpressionTable
AbstractLexer
Definition: abstractlexer.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:37 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Analitza

Skip menu "Analitza"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal