-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
42 lines (33 loc) · 1.21 KB
/
main.cpp
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
#include <iostream>
#include <string>
#include <list>
#include "tokenizador.h"
#include <chrono>
using namespace std;
///////// Comprobaci�n de que vac�e la lista resultado
void imprimirListaSTL(const list<string> &cadena)
{
list<string>::const_iterator itCadena;
for (itCadena = cadena.begin(); itCadena != cadena.end(); itCadena++)
{
cout << (*itCadena) << ", ";
}
cout << endl;
}
int main(void)
{
bool kCasosEspeciales = true, kpasarAminusculas = false;
list<string> lt1, lt2;
Tokenizador a(".-#", true, false);
list<string> tokens;
auto start = std::chrono::system_clock::now();
a.Tokenizar("AA-U.S.A-B-C#A-B.C.D-AA-U.S.A-B-C#A-B.C.D-AA-U.S.A-B-C#A-B.C.D-AA-U.S.A-B-C#A-B.C.D-AA-U.S.A-B-C#A-B.C.D-AA-U.S.A-B-C#A-B.C.D-", tokens);
auto end = std::chrono::system_clock::now();
std::chrono::duration<float, std::milli> duration = end - start;
//std::cout << duration.count() << "ms " << std::endl;
imprimirListaSTL(tokens);
a.Tokenizar("--ANDER-DORADO-A--A", tokens);
imprimirListaSTL(tokens);
a.Tokenizar("u.s.a", tokens);
imprimirListaSTL(tokens);
}