-
Notifications
You must be signed in to change notification settings - Fork 0
/
main copy.cpp
48 lines (36 loc) · 1.08 KB
/
main copy.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
43
44
45
46
47
48
#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)
{
Tokenizador a;
a.CasosEspeciales(true);
string test1 = "https:a.com";
list<string> tokens;
a.Tokenizar(test1, tokens);
imprimirListaSTL(tokens);
cout << a << endl;
#if 0
// a.Tokenizar(test1, tokens);
auto start = std::chrono::system_clock::now();
a.TokenizarListaFicheros("listaFicheros.txt");
auto end = std::chrono::system_clock::now();
std::chrono::duration<float, std::milli> duration = end - start;
std::cout << duration.count() << "s" << std::endl;
// imprimirListaSTL(tokens);
#endif
return 0;
}