-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomata.h
47 lines (41 loc) · 1.1 KB
/
automata.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef AUTOMATA_H
#define AUTOMATA_H
#include "estado.h"
#include "lista.h"
#include "pila.h"
class Automata {
private:
string Nombre;
static int contador;
Estado *edoInicial;
Estado *edoAceptacion;
public:
// Constructores
Automata();
Automata(string Nom, Estado *Inicial, Estado *Aceptacion);
Automata(char simbolo);
// Otros Metodos
bool expresionReg(char simbolo);
bool unionAfn(Automata *afn);
bool concatena(Automata *afn);
bool cerraduraPositiva();
bool cerraduraEstrella();
bool cerraduraInterrogacion();
void displayTerminal();
void displayAfdTabular();
Estado *buscarEstado(int EdoId);
Lista<Estado*> cerraduraEpsilon(Lista<int> EdoId);
Lista<Estado*> cerraduraEpsilon(Lista<Estado*> Edos);
Lista<Estado*> moverA(Lista<Estado*> E, char Simbolo);
bool evaluaCadena(string cadena);
Lista<char> getSimbolos();
// Metodos Set
void setEdoInicial(Estado *Inicial);
void setEdoAceptacion(Estado *Aceptacion);
void setNombre(string Nom);
// Metodos Get
Estado *getEdoInicial() const;
Estado *getEdoAceptacion() const;
string getNombre() const;
};
#endif