-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathanalyseur_lexical.h
More file actions
160 lines (140 loc) · 2.3 KB
/
analyseur_lexical.h
File metadata and controls
160 lines (140 loc) · 2.3 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#ifndef ANALYSEUR_LEXICAL_H
#define ANALYSEUR_LEXICAL_H
#include "global.h"
#include "errors.h"
static char keywords[TOKEN_LIST_SIZE][20] = {
// Real key words of the language
"abort",
"abs",
"abstract",
"accept",
"access",
"aliased",
"all",
"and",
"array",
"at",
"begin",
"body",
"case",
"constant",
"declare",
"delay",
"delta",
"digits",
"do",
"else",
"elsif",
"end",
"entry",
"exception",
"exit",
"for",
"function",
"generic",
"goto",
"if",
"in",
"inout",
"interface",
"is",
"limited",
"loop",
"mod",
"new",
"not",
"null",
"of",
"or",
"others",
"out",
"overriding",
"package",
"pragma",
"private",
"procedure",
"protected",
"raise",
"range",
"record",
"rem",
"renames",
"requeue",
"return",
"reverse",
"select",
"separate",
"some",
"subtype",
"synchronized",
"tagged",
"task",
"terminate",
"then",
"type",
"until",
"use",
"when",
"while",
"with",
"xor",
// Symbols used in the language
"=",
"+",
"-",
"*",
"/",
":=",
">",
">=",
"<",
"<=",
"(",
")",
";",
":",
"/=",
"=>",
// Added keywords
"Put",
"Get",
"Integer",
"Float",
"Character",
".."
};
void read_word();
static void read_number();
static void read_minus_or_comment();
static void read_special();
static void read_separator();
static void read_comment();
static void read_error();
static void read_string();
static void read_character();
static void read_end_of_file();
static void read_new_line();
static boolean is_minus_or_comment();
static boolean is_special();
static boolean is_char();
static boolean is_numeric();
static boolean is_separator();
static boolean is_comment();
static boolean is_double_quote();
static boolean is_single_quote();
static boolean is_end_of_file();
static boolean is_new_line();
static boolean is_point_char();
static boolean is_second_special();
static void assign_token(token);
static void next_char();
static void flush_word();
void next_symbol();
void init_symbol();
/*
*functions relative to a read_number function
*/
static void read_numeral();
static void read_decimal_literal();
static void point_point_char();
#endif