-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscanner.hpp
executable file
·70 lines (55 loc) · 1.31 KB
/
scanner.hpp
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef SCANNER_HPP
#define SCANNER_HPP
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
//FUNCTIONS
typedef enum{_identifier,_eof,_err,_resv_word,_oct,_hex,_rea,_leftp,_rightp,_leftb,_rightb,_sum,_sub,_mult,_div,_coma,_semicolon,_colons,_comment} sequential;
sequential next();
/////////////
bool EOFF();
int read();
bool wsp();
void fail();
void sucess();
void full_back();
/////////////
void open(const char*);
///////////////
int automaton_One_id();
int S(int,char);
int automaton_Two_delta();
int S2(int,char);
int automaton_Three_delta_op();
int S3(int,char);
int automaton_Four_comments();
int S4(int,char);
int tokenError();
int S5(int,char);
int length(char[]);
int compare(char[]);
int compare1(char[]);
int compare2(char[]);
int lines();
bool comments();
//int line();
void word();
void clear_word();
bool automaton_One_reserved_word();
bool automaton_One_reserved_word1();
bool automaton_One_reserved_word2();
/*
UNSOLVED TASKS
message when the analysis had finished
SOLVED
token error
the carather and the line
number of lines of the file
11. Espacios en blanco
Se contempla el uso de espacios, tabuladores y saltos de línea.
12. La marca de fin de archivo ( EOF )
6. Comentarios
Un comentario es cualquier secuencia de caracteres que inicia con la marca # (hash) y termina con el fin de
línea.
*/
#endif