syntaxanalizer.h 884 Bytes
Newer Older
victor's avatar
 
victor committed
1 2 3 4 5 6
#ifndef SYNTAXANALIZER_H
#define SYNTAXANALIZER_H

#include <QtCore>
#include "statement.h"

victor's avatar
 
victor committed
7 8
#include "dataformats/ast.h"
#include "dataformats/ast_algorhitm.h"
victor's avatar
 
victor committed
9 10 11 12 13 14 15 16 17 18

typedef AST::Data AST_Data;
typedef AST::Algorhitm AST_Algorhitm;

namespace KumirAnalizer {

class SyntaxAnalizer : public QObject
{
    Q_OBJECT
public:
Victor Yacovlev's avatar
Victor Yacovlev committed
19
    explicit SyntaxAnalizer(class Lexer * lexer, const QStringList & alwaysEnabledModules, QObject *parent = 0);
victor's avatar
 
victor committed
20
    void init(QList<Statement*> & statements
victor's avatar
 
victor committed
21 22
              , AST_Data * ast
              , AST_Algorhitm *algorhitm);
victor's avatar
 
victor committed
23
    void syncStatements();
victor's avatar
 
victor committed
24
    QStringList unresolvedImports() const;
25
    void setSourceDirName(const QString & dirName);
Victor Yacovlev's avatar
Victor Yacovlev committed
26
    void buildTables(bool allowOperatorsDeclaration);
victor's avatar
 
victor committed
27 28 29 30 31 32 33 34 35
    void processAnalisys();
    ~SyntaxAnalizer();
private:
    struct SyntaxAnalizerPrivate * d;
};

} // namespace KumirAnalizer

#endif // SYNTAXANALIZER_H