-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautomata.h
More file actions
53 lines (48 loc) · 1.42 KB
/
automata.h
File metadata and controls
53 lines (48 loc) · 1.42 KB
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
46
47
48
49
50
51
52
#ifndef AUTOMATA_H
#define AUTOMATA_H
#include "estado.h"
#include "lista.h"
#include "pila.h"
class Automata {
private:
string Nombre;
Estado *edoInicial;
Estado *edoAceptacion;
public:
// Constructores
Automata();
Automata(char simbolo);
Automata(string Nom, Estado *Inicial, Estado *Aceptacion);
// Destructor
~Automata();
// Modifcaciones sobre automatas
Automata *unir(Automata *afn);
Automata *concatenar(Automata *afn);
Automata *cerraduraPositiva();
Automata *cerraduraEstrella();
Automata *cerraduraInterrogacion();
// Metodos de despliegue
void displayTerminal();
void displayAfdTabular();
// Metodos de ayuda
Estado *buscarEstado(int EdoId);
Lista<Estado*> cerraduraEpsilon(Lista<int> EdoId);
Lista<Estado*> cerraduraEpsilon(Lista<Estado*> Edos);
Lista<Estado*> moverA(Lista<Estado*> E, char Simbolo);
Lista<Estado*> Dtran(Lista<Estado*> E, char Simbolo);
bool sonIguales(Lista<Estado*> L1, Lista<Estado*> L2);
bool listaTiene(Lista< Lista<Estado*> > LE, Lista<Estado*> L);
int listaEstaEn(Lista< Lista<Estado*> > LE, Lista<Estado*> L);
Lista<char> getSimbolos();
// Metodo de evaluacion
bool evaluaCadena(string cadena);
// 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