efl/src/lib/eolian/eo_lexer.c

4569 lines
137 KiB
C
Raw Normal View History

#line 1 "lib/eolian/eo_lexer.rl"
#include <stdio.h>
#include <stdlib.h>
#include <Eina.h>
#include "Eolian.h"
#
#include "eo_lexer.h"
#include "eolian_database.h"
static int _eo_tokenizer_log_dom = -1;
#ifdef CRITICAL
#undef CRITICAL
#endif
#define CRITICAL(...) EINA_LOG_DOM_CRIT(_eo_tokenizer_log_dom, __VA_ARGS__)
#ifdef ERR
#undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_eo_tokenizer_log_dom, __VA_ARGS__)
#ifdef WRN
#undef WRN
#endif
#define WRN(...) EINA_LOG_DOM_WARN(_eo_tokenizer_log_dom, __VA_ARGS__)
#ifdef INF
#undef INF
#endif
#define INF(...) EINA_LOG_DOM_INFO(_eo_tokenizer_log_dom, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_eo_tokenizer_log_dom, __VA_ARGS__)
static int _init_counter = 0;
int
eo_tokenizer_init()
{
if (!_init_counter)
{
eina_init();
eina_log_color_disable_set(EINA_FALSE);
_eo_tokenizer_log_dom = eina_log_domain_register("eo_toknz", EINA_COLOR_CYAN);
}
return _init_counter++;
}
int
eo_tokenizer_shutdown()
{
if (_init_counter <= 0) return 0;
_init_counter--;
if (!_init_counter)
{
eina_log_domain_unregister(_eo_tokenizer_log_dom);
_eo_tokenizer_log_dom = -1;
eina_shutdown();
}
return _init_counter;
}
static void
_eo_tokenizer_abort(Eo_Tokenizer *toknz,
const char *file, const char* fct, int line,
const char *fmt, ...)
{
va_list ap;
va_start (ap, fmt);
eina_log_vprint(_eo_tokenizer_log_dom, EINA_LOG_LEVEL_ERR,
file, fct, line, fmt, ap);
va_end(ap);
fprintf(stderr, "File:%s\n toknz[%d] n:%d l:%d p:%d pe:%d ts:%s te:%s act:%d\n",
toknz->source,
toknz->cs, toknz->current_nesting, toknz->current_line,
(int)(toknz->p - toknz->buf), (int)(toknz->pe - toknz->buf),
toknz->ts, toknz->te, toknz->act);
exit(EXIT_FAILURE);
}
#define ABORT(toknz, ...) \
_eo_tokenizer_abort(toknz, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__);
static void _eo_tokenizer_normalize_buf(char *buf)
{
int c;
char *s, *d;
Eina_Bool in_space = EINA_TRUE;
Eina_Bool in_newline = EINA_FALSE;
/* ' '+ -> ' '
* '\n' ' '* '*' ' '* -> '\n'
*/
for (s = buf, d = buf; *s != '\0'; s++)
{
c = *s;
*d = c;
if (!in_space || (c != ' '))
d++;
if (c == ' ')
in_space = EINA_TRUE;
else
in_space = EINA_FALSE;
if (c == '\n')
{
in_newline = EINA_TRUE;
in_space = EINA_TRUE;
}
else if (in_newline && c == '*' )
{
in_space = EINA_TRUE;
in_newline = EINA_FALSE;
d--;
}
}
/* ' '+$ -> $ */
d--;
while (*d == ' ') d--;
d++;
if (d < buf) return;
*d = '\0';
}
static const char*
_eo_tokenizer_token_get(Eo_Tokenizer *toknz, char *p)
{
if (toknz->saved.tok == NULL) ABORT(toknz, "toknz->saved.tok is NULL");
char d[BUFSIZE];
int l = (p - toknz->saved.tok);
memcpy(d, toknz->saved.tok, l);
d[l] = '\0';
_eo_tokenizer_normalize_buf(d);
toknz->saved.tok = NULL;
DBG("token : >%s<", d);
return eina_stringshare_add(d);
}
static Eo_Class_Def*
_eo_tokenizer_class_get(Eo_Tokenizer *toknz, char *p)
{
Eo_Class_Def *kls = calloc(1, sizeof(Eo_Class_Def));
if (kls == NULL) ABORT(toknz, "calloc Eo_Class_Def failure");
kls->name = _eo_tokenizer_token_get(toknz, p);
return kls;
}
static Eo_Property_Def*
_eo_tokenizer_property_get(Eo_Tokenizer *toknz, char *p)
{
Eo_Property_Def *prop = calloc(1, sizeof(Eo_Property_Def));
if (prop == NULL) ABORT(toknz, "calloc Eo_Property_Def failure");
prop->name = _eo_tokenizer_token_get(toknz, p);
return prop;
}
static Eo_Method_Def*
_eo_tokenizer_method_get(Eo_Tokenizer *toknz, char *p)
{
Eo_Method_Def *meth = calloc(1, sizeof(Eo_Method_Def));
if (meth == NULL) ABORT(toknz, "calloc Eo_Method_Def failure");
meth->name = _eo_tokenizer_token_get(toknz, p);
return meth;
}
static Eo_Param_Def*
_eo_tokenizer_param_get(Eo_Tokenizer *toknz, char *p)
{
char *s;
Eo_Param_Def *param = calloc(1, sizeof(Eo_Param_Def));
if (param == NULL) ABORT(toknz, "calloc Eo_Param_Def failure");
/* The next code part tries to identify the different tags of the
parameter.
First, we set the ';' to '\0', to search only inside this section.
We then strstr the different tags and if found, we update the internal
flag and clear the zone of the text. In this way, during the
determination of the type/variable, we will not be disturbed by the
flags.
We have to put back the ';' at the end.
*/
*p = '\0';
s = strstr(toknz->saved.tok, "@nonull");
if (s)
{
param->nonull = EINA_TRUE;
memset(s, ' ', 7);
}
s = strstr(toknz->saved.tok, "@own");
if (s)
{
param->own = EINA_TRUE;
memset(s, ' ', 4);
}
*p = ';';
s = p - 1; /* Don't look at the character ';' */
/* Remove any space between the param name and ';'/@nonull
* This loop fixes the case where "char *name ;" becomes the type of the param.
*/
while (*s == ' ') s--;
for (; s >= toknz->saved.tok; s--)
{
if ((*s == ' ') || (*s == '*'))
break;
}
if (s == toknz->saved.tok)
ABORT(toknz, "wrong parameter: %s", _eo_tokenizer_token_get(toknz, p));
s++;
param->way = PARAM_IN;
if (strncmp(toknz->saved.tok, "@in ", 4) == 0)
{
toknz->saved.tok += 3;
param->way = PARAM_IN;
}
else if (strncmp(toknz->saved.tok, "@out ", 5) == 0)
{
toknz->saved.tok += 4;
param->way = PARAM_OUT;
}
else if (strncmp(toknz->saved.tok, "@inout ", 7) == 0)
{
toknz->saved.tok += 6;
param->way = PARAM_INOUT;
}
param->type = _eo_tokenizer_token_get(toknz, s);
toknz->saved.tok = s;
param->name = _eo_tokenizer_token_get(toknz, p);
return param;
}
static Eo_Ret_Def*
_eo_tokenizer_return_get(Eo_Tokenizer *toknz, char *p)
{
char *s;
Eo_Ret_Def *ret = calloc(1, sizeof(Eo_Ret_Def));
if (ret == NULL) ABORT(toknz, "calloc Eo_Ret_Def failure");
*p = '\0';
s = strstr(toknz->saved.tok, "@warn_unused");
if (s)
{
ret->warn_unused = EINA_TRUE;
memset(s, ' ', 12);
}
s = strstr(toknz->saved.tok, "@own");
if (s)
{
ret->own = EINA_TRUE;
memset(s, ' ', 4);
}
s = strchr(toknz->saved.tok, '(');
if (s)
{
char *ret_val;
char *end = strchr(s, ')');
if (!end)
ABORT(toknz, "wrong syntax (missing ')'): %s",
_eo_tokenizer_token_get(toknz, p));
/* Current values in s and end have to be changed to ' ' to not disturb the next steps (type extraction) */
*s++ = ' ';
while (*s == ' ') s++;
*end-- = ' ';
while (end > s && *end == ' ') end--;
if (end < s)
ABORT(toknz, "empty default return value: %s",
_eo_tokenizer_token_get(toknz, p));
ret_val = malloc(end - s + 2); /* string + '\0' */
memcpy(ret_val, s, end - s + 1);
ret_val[end - s + 1] = '\0';
ret->dflt_ret_val = ret_val;
memset(s, ' ', end - s + 1);
}
*p = ';';
s = p - 1; /* Don't look at the character ';' */
/* Remove any space between the param name and ';'
* This loop fixes the case where "char *name ;" becomes the type of the param.
*/
while (*s == ' ') s--;
if (s == toknz->saved.tok)
ABORT(toknz, "wrong parameter: %s", _eo_tokenizer_token_get(toknz, p));
s++;
ret->type = _eo_tokenizer_token_get(toknz, s);
return ret;
}
static Eo_Accessor_Param*
_eo_tokenizer_accessor_param_get(Eo_Tokenizer *toknz, char *p)
{
Eo_Accessor_Param *param = calloc(1, sizeof(Eo_Accessor_Param));
if (param == NULL) ABORT(toknz, "calloc Eo_Accessor_Param failure");
/* Remove the colon and spaces - we just need the param name */
while (*p == ':') p--;
while (*p == ' ') p--;
param->name = _eo_tokenizer_token_get(toknz, p);
return param;
}
static Eo_Accessor_Def *
_eo_tokenizer_accessor_get(Eo_Tokenizer *toknz, Eo_Accessor_Type type)
{
Eo_Accessor_Def *accessor = calloc(1, sizeof(Eo_Accessor_Def));
if (accessor == NULL) ABORT(toknz, "calloc Eo_Accessor_Def failure");
accessor->type = type;
return accessor;
}
static Eo_Event_Def*
_eo_tokenizer_event_get(Eo_Tokenizer *toknz, char *p)
{
Eo_Event_Def *sgn = calloc(1, sizeof(Eo_Event_Def));
if (sgn == NULL) ABORT(toknz, "calloc Eo_Event_Def failure");
sgn->name = _eo_tokenizer_token_get(toknz, p);
return sgn;
}
static Eo_Implement_Def*
_eo_tokenizer_implement_get(Eo_Tokenizer *toknz, char *p)
{
Eo_Implement_Def *impl = calloc(1, sizeof(Eo_Implement_Def));
if (impl == NULL) ABORT(toknz, "calloc Eo_Implement_Def failure");
impl->meth_name = _eo_tokenizer_token_get(toknz, p);
return impl;
}
#line 428 "lib/eolian/eo_lexer.rl"
#line 359 "lib/eolian/eo_lexer.c"
static const char _eo_tokenizer_actions[] = {
0, 1, 0, 1, 2, 1, 6, 1,
10, 1, 15, 1, 16, 1, 17, 1,
18, 1, 19, 1, 20, 1, 21, 1,
22, 1, 23, 1, 24, 1, 25, 1,
26, 1, 27, 1, 28, 1, 29, 1,
30, 1, 31, 1, 32, 1, 33, 1,
34, 1, 35, 1, 36, 1, 37, 1,
38, 1, 39, 1, 40, 1, 41, 1,
44, 1, 45, 1, 46, 1, 47, 1,
48, 1, 49, 1, 50, 1, 51, 1,
52, 1, 53, 1, 54, 1, 55, 1,
56, 1, 57, 1, 58, 1, 59, 1,
60, 1, 61, 1, 62, 1, 63, 1,
64, 1, 65, 1, 66, 1, 67, 1,
68, 1, 69, 1, 70, 1, 71, 1,
72, 1, 73, 1, 74, 1, 75, 1,
76, 1, 77, 1, 78, 1, 79, 1,
80, 1, 81, 1, 82, 1, 85, 1,
86, 1, 87, 1, 88, 1, 89, 1,
90, 1, 91, 1, 92, 1, 93, 1,
94, 1, 95, 1, 96, 1, 97, 1,
98, 1, 99, 1, 100, 1, 101, 1,
102, 1, 103, 1, 104, 1, 105, 1,
106, 1, 107, 1, 108, 1, 109, 1,
110, 1, 111, 1, 112, 1, 113, 1,
114, 1, 115, 1, 116, 1, 117, 1,
118, 1, 119, 1, 120, 1, 121, 1,
122, 1, 123, 1, 124, 1, 125, 2,
0, 41, 2, 0, 52, 2, 0, 61,
2, 0, 72, 2, 0, 81, 2, 0,
93, 2, 0, 102, 2, 0, 120, 2,
4, 47, 2, 5, 42, 2, 6, 2,
2, 7, 43, 2, 8, 56, 2, 10,
0, 2, 10, 73, 2, 12, 88, 2,
13, 83, 2, 14, 84, 2, 15, 0,
2, 15, 94, 2, 16, 0, 2, 17,
0, 2, 17, 121, 2, 18, 0, 2,
19, 0, 2, 20, 0, 2, 20, 2,
2, 24, 0, 2, 25, 0, 2, 25,
2, 2, 26, 0, 2, 28, 0, 2,
29, 0, 2, 29, 2, 2, 36, 0,
2, 36, 121, 2, 39, 1, 2, 39,
2, 2, 39, 3, 2, 39, 9, 2,
39, 11
};
static const short _eo_tokenizer_key_offsets[] = {
0, 2, 5, 6, 7, 8, 9, 10,
11, 12, 15, 22, 37, 41, 49, 54,
58, 70, 75, 82, 83, 84, 85, 88,
89, 90, 91, 92, 93, 94, 95, 98,
99, 100, 101, 104, 107, 109, 112, 123,
125, 128, 129, 133, 140, 147, 159, 170,
182, 194, 206, 218, 229, 237, 245, 257,
269, 281, 293, 304, 312, 326, 341, 345,
346, 347, 357, 359, 362, 364, 367, 368,
380, 384, 385, 386, 396, 398, 401, 403,
406, 407, 408, 412, 413, 414, 418, 419,
423, 424, 425, 426, 427, 431, 433, 436,
437, 448, 452, 455, 457, 460, 471, 473,
476, 477, 478, 479, 480, 481, 482, 483,
484, 485, 488, 495, 503, 504, 505, 506,
507, 511, 512, 513, 514, 515, 518, 525,
539, 554, 558, 559, 560, 570, 572, 575,
577, 580, 581, 592, 596, 599, 601, 604,
615, 617, 620, 621, 622, 623, 624, 625,
626, 627, 628, 629, 630, 631, 635, 636,
637, 641, 648, 656, 657, 658, 659, 660,
661, 662, 663, 664, 665, 669, 670, 671,
672, 673, 674, 675, 676, 680, 687, 695,
696, 697, 698, 699, 703, 711, 727, 731,
743, 744, 745, 755, 757, 760, 768, 776,
784, 796, 800, 801, 802, 803, 804, 805,
806, 807, 808, 812, 820, 833, 838, 842,
843, 844, 845, 846, 847, 859, 864, 868,
877, 881, 882, 883, 884, 885, 886, 890,
899, 906, 917, 921, 935, 945, 957, 962,
968, 973, 974, 975, 976, 977, 978, 981,
988, 996, 997, 1001, 1009, 1013, 1018, 1019,
1020, 1030, 1032, 1035, 1045, 1057, 1069, 1070,
1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078,
1079, 1080, 1081, 1085, 1092, 1100, 1101, 1102,
1103, 1104, 1105, 1109, 1110, 1111, 1112, 1113,
1114, 1115, 1116, 1117, 1121, 1129, 1132, 1134,
1135, 1136, 1137, 1138, 1149, 1152, 1154, 1165,
1177, 1189, 1193, 1193, 1194, 1203, 1206, 1208,
1219, 1223, 1223, 1224, 1233, 1236, 1238, 1239,
1240, 1241, 1242, 1243, 1254, 1257, 1259, 1266,
1267, 1276, 1279, 1281, 1282, 1283, 1284, 1285,
1289, 1289, 1290, 1301, 1304, 1306, 1313, 1314,
1326, 1329, 1331, 1332, 1334, 1337, 1339, 1342,
1343, 1344, 1345, 1346, 1349, 1350, 1351
};
static const char _eo_tokenizer_trans_keys[] = {
10, 42, 10, 42, 47, 10, 115, 116,
114, 97, 99, 116, 9, 13, 32, 9,
13, 32, 65, 90, 97, 122, 9, 10,
13, 32, 40, 95, 123, 0, 31, 48,
57, 65, 90, 97, 122, 10, 123, 0,
32, 9, 10, 13, 32, 40, 123, 0,
31, 41, 65, 90, 97, 122, 10, 123,
0, 32, 10, 41, 44, 95, 0, 32,
48, 57, 65, 90, 97, 122, 10, 41,
44, 0, 32, 10, 0, 32, 65, 90,
97, 122, 97, 115, 115, 9, 13, 32,
116, 101, 114, 102, 97, 99, 101, 9,
13, 32, 120, 105, 110, 9, 13, 32,
10, 42, 64, 10, 42, 10, 42, 47,
10, 42, 95, 0, 32, 48, 57, 64,
90, 97, 122, 10, 42, 10, 42, 47,
10, 9, 13, 32, 58, 9, 13, 32,
65, 90, 97, 122, 9, 13, 32, 65,
90, 97, 122, 9, 13, 32, 44, 59,
95, 48, 57, 65, 90, 97, 122, 9,
13, 32, 58, 95, 48, 57, 65, 90,
97, 122, 9, 13, 32, 58, 95, 103,
48, 57, 65, 90, 97, 122, 9, 13,
32, 58, 95, 97, 48, 57, 65, 90,
98, 122, 9, 13, 32, 58, 95, 99,
48, 57, 65, 90, 97, 122, 9, 13,
32, 58, 95, 121, 48, 57, 65, 90,
97, 122, 9, 13, 32, 58, 95, 48,
57, 65, 90, 97, 122, 9, 13, 32,
58, 65, 90, 97, 122, 59, 95, 48,
57, 65, 90, 97, 122, 9, 13, 32,
58, 95, 116, 48, 57, 65, 90, 97,
122, 9, 13, 32, 58, 95, 117, 48,
57, 65, 90, 97, 122, 9, 13, 32,
58, 95, 114, 48, 57, 65, 90, 97,
122, 9, 13, 32, 58, 95, 110, 48,
57, 65, 90, 97, 122, 9, 13, 32,
58, 95, 48, 57, 65, 90, 97, 122,
9, 13, 32, 58, 65, 90, 97, 122,
9, 13, 32, 95, 40, 42, 45, 46,
48, 57, 64, 90, 97, 122, 9, 13,
32, 59, 95, 40, 42, 45, 46, 48,
57, 64, 90, 97, 122, 9, 13, 32,
47, 42, 64, 10, 95, 0, 32, 48,
57, 64, 90, 97, 122, 10, 42, 10,
42, 47, 10, 42, 10, 42, 47, 10,
9, 13, 32, 42, 59, 95, 48, 57,
64, 90, 97, 122, 9, 13, 32, 47,
42, 64, 10, 95, 0, 32, 48, 57,
64, 90, 97, 122, 10, 42, 10, 42,
47, 10, 42, 10, 42, 47, 10, 116,
10, 123, 0, 32, 121, 115, 10, 123,
0, 32, 116, 10, 123, 0, 32, 108,
117, 101, 115, 10, 123, 0, 32, 10,
42, 10, 42, 47, 10, 10, 95, 123,
0, 32, 48, 57, 65, 90, 97, 122,
10, 123, 0, 32, 10, 42, 64, 10,
42, 10, 42, 47, 10, 42, 95, 0,
32, 48, 57, 64, 90, 97, 122, 10,
42, 10, 42, 47, 10, 110, 115, 116,
59, 103, 97, 99, 121, 9, 13, 32,
9, 13, 32, 65, 90, 97, 122, 59,
95, 48, 57, 65, 90, 97, 122, 114,
97, 109, 115, 10, 123, 0, 32, 116,
117, 114, 110, 9, 13, 32, 9, 13,
32, 65, 90, 97, 122, 9, 13, 32,
95, 40, 42, 45, 46, 48, 57, 64,
90, 97, 122, 9, 13, 32, 59, 95,
40, 42, 45, 46, 48, 57, 64, 90,
97, 122, 9, 13, 32, 47, 42, 64,
10, 95, 0, 32, 48, 57, 64, 90,
97, 122, 10, 42, 10, 42, 47, 10,
42, 10, 42, 47, 10, 10, 95, 123,
0, 32, 48, 57, 65, 90, 97, 122,
10, 123, 0, 32, 10, 42, 64, 10,
42, 10, 42, 47, 10, 42, 95, 0,
32, 48, 57, 64, 90, 97, 122, 10,
42, 10, 42, 47, 10, 110, 115, 116,
114, 117, 99, 116, 111, 114, 115, 10,
123, 0, 32, 116, 97, 10, 58, 0,
32, 10, 0, 32, 65, 90, 97, 122,
59, 95, 48, 57, 65, 90, 97, 122,
115, 116, 114, 117, 99, 116, 111, 114,
115, 10, 123, 0, 32, 95, 112, 114,
101, 102, 105, 120, 10, 58, 0, 32,
10, 0, 32, 65, 90, 97, 122, 59,
95, 48, 57, 65, 90, 97, 122, 101,
110, 116, 115, 10, 123, 0, 32, 10,
125, 0, 32, 65, 90, 97, 122, 9,
10, 13, 32, 40, 44, 59, 95, 0,
31, 48, 57, 65, 90, 97, 122, 10,
59, 0, 32, 9, 10, 13, 32, 47,
125, 0, 31, 65, 90, 97, 122, 42,
64, 10, 95, 0, 32, 48, 57, 64,
90, 97, 122, 10, 42, 10, 42, 47,
10, 125, 0, 32, 65, 90, 97, 122,
9, 10, 13, 32, 40, 59, 0, 31,
9, 13, 32, 95, 65, 90, 97, 122,
9, 13, 32, 41, 42, 95, 48, 57,
65, 90, 97, 122, 10, 59, 0, 32,
112, 108, 101, 109, 101, 110, 116, 115,
10, 123, 0, 32, 10, 125, 0, 32,
65, 90, 97, 122, 10, 58, 59, 95,
123, 0, 32, 48, 57, 65, 90, 97,
122, 10, 59, 123, 0, 32, 10, 108,
0, 32, 101, 103, 97, 99, 121, 9,
10, 13, 32, 59, 123, 0, 31, 65,
90, 97, 122, 10, 59, 123, 0, 32,
10, 125, 0, 32, 10, 59, 125, 0,
32, 65, 90, 97, 122, 10, 112, 0,
32, 97, 114, 97, 109, 115, 10, 123,
0, 32, 10, 58, 59, 0, 32, 65,
90, 97, 122, 9, 13, 32, 65, 90,
97, 122, 10, 59, 95, 0, 32, 48,
57, 65, 90, 97, 122, 10, 59, 0,
32, 9, 10, 13, 32, 47, 58, 59,
125, 0, 31, 65, 90, 97, 122, 10,
58, 59, 125, 0, 32, 65, 90, 97,
122, 9, 13, 32, 58, 59, 95, 48,
57, 65, 90, 97, 122, 9, 13, 32,
58, 59, 10, 59, 114, 125, 0, 32,
10, 114, 125, 0, 32, 101, 116, 117,
114, 110, 9, 13, 32, 9, 13, 32,
65, 90, 97, 122, 58, 95, 48, 57,
65, 90, 97, 122, 58, 65, 90, 97,
122, 59, 95, 48, 57, 65, 90, 97,
122, 10, 125, 0, 32, 10, 59, 125,
0, 32, 42, 64, 10, 95, 0, 32,
48, 57, 64, 90, 97, 122, 10, 42,
10, 42, 47, 10, 58, 59, 125, 0,
32, 65, 90, 97, 122, 9, 10, 13,
32, 59, 123, 0, 31, 65, 90, 97,
122, 10, 59, 95, 123, 0, 32, 48,
57, 65, 90, 97, 122, 58, 103, 97,
99, 121, 95, 112, 114, 101, 102, 105,
120, 10, 58, 0, 32, 10, 0, 32,
65, 90, 97, 122, 59, 95, 48, 57,
65, 90, 97, 122, 116, 104, 111, 100,
115, 10, 123, 0, 32, 111, 112, 101,
114, 116, 105, 101, 115, 10, 123, 0,
32, 10, 47, 97, 99, 105, 109, 0,
32, 10, 0, 32, 42, 47, 98, 108,
110, 105, 10, 47, 108, 114, 125, 0,
32, 65, 90, 97, 122, 10, 0, 32,
42, 47, 9, 13, 32, 58, 95, 48,
57, 65, 90, 97, 122, 9, 13, 32,
58, 95, 101, 48, 57, 65, 90, 97,
122, 9, 13, 32, 58, 95, 101, 48,
57, 65, 90, 97, 122, 9, 13, 32,
47, 59, 10, 47, 125, 0, 32, 64,
90, 97, 122, 10, 0, 32, 42, 47,
9, 13, 32, 42, 95, 48, 57, 64,
90, 97, 122, 9, 13, 32, 47, 59,
10, 47, 103, 107, 115, 118, 125, 0,
32, 10, 0, 32, 42, 47, 101, 101,
101, 97, 59, 10, 47, 125, 0, 32,
48, 57, 65, 90, 97, 122, 10, 0,
32, 42, 47, 95, 48, 57, 65, 90,
97, 122, 59, 10, 47, 99, 108, 112,
114, 125, 0, 32, 10, 0, 32, 42,
47, 111, 101, 97, 101, 9, 13, 32,
47, 59, 10, 47, 125, 0, 32, 48,
57, 65, 90, 97, 122, 10, 0, 32,
42, 47, 95, 48, 57, 65, 90, 97,
122, 59, 10, 47, 99, 100, 101, 105,
108, 109, 112, 125, 0, 32, 10, 0,
32, 42, 47, 111, 97, 101, 10, 0,
32, 111, 118, 10, 0, 32, 59, 109,
59, 101, 10, 0, 32, 101, 114, 59,
0
};
static const char _eo_tokenizer_single_lengths[] = {
2, 3, 1, 1, 1, 1, 1, 1,
1, 3, 3, 7, 2, 6, 1, 2,
4, 3, 1, 1, 1, 1, 3, 1,
1, 1, 1, 1, 1, 1, 3, 1,
1, 1, 3, 3, 2, 3, 3, 2,
3, 1, 4, 3, 3, 6, 5, 6,
6, 6, 6, 5, 4, 2, 6, 6,
6, 6, 5, 4, 4, 5, 4, 1,
1, 2, 2, 3, 2, 3, 1, 6,
4, 1, 1, 2, 2, 3, 2, 3,
1, 1, 2, 1, 1, 2, 1, 2,
1, 1, 1, 1, 2, 2, 3, 1,
3, 2, 3, 2, 3, 3, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1,
1, 3, 3, 2, 1, 1, 1, 1,
2, 1, 1, 1, 1, 3, 3, 4,
5, 4, 1, 1, 2, 2, 3, 2,
3, 1, 3, 2, 3, 2, 3, 3,
2, 3, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 2, 1, 1,
2, 1, 2, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2, 1, 1, 1,
1, 1, 1, 1, 2, 1, 2, 1,
1, 1, 1, 2, 2, 8, 2, 6,
1, 1, 2, 2, 3, 2, 6, 4,
6, 2, 1, 1, 1, 1, 1, 1,
1, 1, 2, 2, 5, 3, 2, 1,
1, 1, 1, 1, 6, 3, 2, 3,
2, 1, 1, 1, 1, 1, 2, 3,
3, 3, 2, 8, 4, 6, 5, 4,
3, 1, 1, 1, 1, 1, 3, 3,
2, 1, 0, 2, 2, 3, 1, 1,
2, 2, 3, 4, 6, 4, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 2, 1, 2, 1, 1, 1,
1, 1, 2, 1, 1, 1, 1, 1,
1, 1, 1, 2, 6, 1, 2, 1,
1, 1, 1, 5, 1, 2, 5, 6,
6, 4, 0, 1, 3, 1, 2, 5,
4, 0, 1, 7, 1, 2, 1, 1,
1, 1, 1, 3, 1, 2, 1, 1,
7, 1, 2, 1, 1, 1, 1, 4,
0, 1, 3, 1, 2, 1, 1, 10,
1, 2, 1, 2, 1, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1
};
static const char _eo_tokenizer_range_lengths[] = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 2, 4, 1, 1, 2, 1,
4, 1, 3, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 4, 0,
0, 0, 0, 2, 2, 3, 3, 3,
3, 3, 3, 3, 2, 3, 3, 3,
3, 3, 3, 2, 5, 5, 0, 0,
0, 4, 0, 0, 0, 0, 0, 3,
0, 0, 0, 4, 0, 0, 0, 0,
0, 0, 1, 0, 0, 1, 0, 1,
0, 0, 0, 0, 1, 0, 0, 0,
4, 1, 0, 0, 0, 4, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 2, 3, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 2, 5,
5, 0, 0, 0, 4, 0, 0, 0,
0, 0, 4, 1, 0, 0, 0, 4,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0,
1, 3, 3, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 1, 3, 3, 0,
0, 0, 0, 1, 3, 4, 1, 3,
0, 0, 4, 0, 0, 3, 1, 2,
3, 1, 0, 0, 0, 0, 0, 0,
0, 0, 1, 3, 4, 1, 1, 0,
0, 0, 0, 0, 3, 1, 1, 3,
1, 0, 0, 0, 0, 0, 1, 3,
2, 4, 1, 3, 3, 3, 0, 1,
1, 0, 0, 0, 0, 0, 0, 2,
3, 0, 2, 3, 1, 1, 0, 0,
4, 0, 0, 3, 3, 4, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 3, 3, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 0, 0,
0, 0, 0, 3, 1, 0, 3, 3,
3, 0, 0, 0, 3, 1, 0, 3,
0, 0, 0, 1, 1, 0, 0, 0,
0, 0, 0, 4, 1, 0, 3, 0,
1, 1, 0, 0, 0, 0, 0, 0,
0, 0, 4, 1, 0, 3, 0, 1,
1, 0, 0, 0, 1, 0, 1, 0,
0, 0, 0, 1, 0, 0, 0
};
static const short _eo_tokenizer_index_offsets[] = {
0, 3, 7, 9, 11, 13, 15, 17,
19, 21, 25, 31, 43, 47, 55, 59,
63, 72, 77, 82, 84, 86, 88, 92,
94, 96, 98, 100, 102, 104, 106, 110,
112, 114, 116, 120, 124, 127, 131, 139,
142, 146, 148, 153, 159, 165, 175, 184,
194, 204, 214, 224, 233, 240, 246, 256,
266, 276, 286, 295, 302, 312, 323, 328,
330, 332, 339, 342, 346, 349, 353, 355,
365, 370, 372, 374, 381, 384, 388, 391,
395, 397, 399, 403, 405, 407, 411, 413,
417, 419, 421, 423, 425, 429, 432, 436,
438, 446, 450, 454, 457, 461, 469, 472,
476, 478, 480, 482, 484, 486, 488, 490,
492, 494, 498, 504, 510, 512, 514, 516,
518, 522, 524, 526, 528, 530, 534, 540,
550, 561, 566, 568, 570, 577, 580, 584,
587, 591, 593, 601, 605, 609, 612, 616,
624, 627, 631, 633, 635, 637, 639, 641,
643, 645, 647, 649, 651, 653, 657, 659,
661, 665, 670, 676, 678, 680, 682, 684,
686, 688, 690, 692, 694, 698, 700, 702,
704, 706, 708, 710, 712, 716, 721, 727,
729, 731, 733, 735, 739, 745, 758, 762,
772, 774, 776, 783, 786, 790, 796, 804,
811, 821, 825, 827, 829, 831, 833, 835,
837, 839, 841, 845, 851, 861, 866, 870,
872, 874, 876, 878, 880, 890, 895, 899,
906, 910, 912, 914, 916, 918, 920, 924,
931, 937, 945, 949, 961, 969, 979, 985,
991, 996, 998, 1000, 1002, 1004, 1006, 1010,
1016, 1022, 1024, 1027, 1033, 1037, 1042, 1044,
1046, 1053, 1056, 1060, 1068, 1078, 1087, 1089,
1091, 1093, 1095, 1097, 1099, 1101, 1103, 1105,
1107, 1109, 1111, 1115, 1120, 1126, 1128, 1130,
1132, 1134, 1136, 1140, 1142, 1144, 1146, 1148,
1150, 1152, 1154, 1156, 1160, 1168, 1171, 1174,
1176, 1178, 1180, 1182, 1191, 1194, 1197, 1206,
1216, 1226, 1231, 1232, 1234, 1241, 1244, 1247,
1256, 1261, 1262, 1264, 1273, 1276, 1279, 1281,
1283, 1285, 1287, 1289, 1297, 1300, 1303, 1308,
1310, 1319, 1322, 1325, 1327, 1329, 1331, 1333,
1338, 1339, 1341, 1349, 1352, 1355, 1360, 1362,
1374, 1377, 1380, 1382, 1385, 1388, 1391, 1394,
1396, 1398, 1400, 1402, 1405, 1407, 1409
};
static const short _eo_tokenizer_indicies[] = {
2, 3, 1, 2, 3, 4, 1, 6,
5, 7, 0, 8, 0, 9, 0, 10,
0, 11, 0, 12, 0, 13, 13, 13,
0, 14, 14, 14, 15, 15, 0, 17,
18, 17, 17, 19, 20, 21, 16, 20,
20, 20, 0, 23, 24, 22, 0, 25,
23, 25, 25, 26, 24, 22, 0, 27,
28, 28, 0, 30, 31, 29, 0, 33,
34, 35, 36, 32, 36, 36, 36, 0,
38, 27, 39, 37, 0, 40, 39, 28,
28, 0, 41, 0, 42, 0, 43, 0,
44, 44, 44, 0, 45, 0, 46, 0,
47, 0, 48, 0, 49, 0, 50, 0,
51, 0, 52, 52, 52, 0, 53, 0,
54, 0, 55, 0, 56, 56, 56, 0,
59, 60, 61, 58, 59, 60, 58, 59,
60, 62, 58, 63, 60, 64, 61, 64,
64, 64, 58, 66, 67, 65, 66, 67,
68, 65, 70, 69, 71, 71, 71, 72,
57, 73, 73, 73, 74, 74, 57, 75,
75, 75, 76, 76, 57, 77, 77, 77,
77, 78, 77, 77, 77, 77, 57, 71,
71, 71, 72, 79, 79, 79, 79, 57,
71, 71, 71, 72, 79, 80, 79, 79,
79, 57, 71, 71, 71, 72, 79, 81,
79, 79, 79, 57, 71, 71, 71, 72,
79, 82, 79, 79, 79, 57, 71, 71,
71, 72, 79, 83, 79, 79, 79, 57,
84, 84, 84, 72, 79, 79, 79, 79,
57, 84, 84, 84, 72, 85, 85, 57,
87, 86, 86, 86, 86, 57, 71, 71,
71, 72, 79, 88, 79, 79, 79, 57,
71, 71, 71, 72, 79, 89, 79, 79,
79, 57, 71, 71, 71, 72, 79, 90,
79, 79, 79, 57, 71, 71, 71, 72,
79, 91, 79, 79, 79, 57, 92, 92,
92, 72, 79, 79, 79, 79, 57, 92,
92, 92, 72, 93, 93, 57, 94, 94,
94, 94, 94, 94, 94, 94, 94, 57,
94, 94, 94, 95, 94, 94, 94, 94,
94, 94, 57, 97, 97, 97, 98, 96,
99, 96, 100, 96, 101, 102, 100, 102,
102, 102, 96, 104, 105, 103, 104, 105,
106, 103, 109, 110, 108, 109, 110, 111,
108, 113, 112, 114, 114, 114, 114, 115,
114, 114, 114, 114, 107, 117, 117, 117,
118, 116, 119, 116, 120, 116, 121, 122,
120, 122, 122, 122, 116, 124, 125, 123,
124, 125, 126, 123, 129, 130, 128, 129,
130, 131, 128, 133, 132, 134, 127, 135,
136, 134, 127, 137, 127, 138, 127, 139,
140, 138, 127, 141, 127, 142, 143, 141,
127, 144, 127, 145, 127, 146, 127, 147,
127, 148, 149, 147, 127, 152, 153, 151,
152, 153, 154, 151, 156, 155, 158, 159,
160, 157, 159, 159, 159, 150, 162, 163,
161, 150, 166, 167, 168, 165, 166, 167,
165, 166, 167, 169, 165, 170, 167, 171,
168, 171, 171, 171, 165, 173, 174, 172,
173, 174, 175, 172, 177, 176, 178, 164,
179, 164, 180, 164, 181, 164, 182, 164,
183, 164, 184, 164, 185, 164, 186, 186,
186, 164, 186, 186, 186, 187, 187, 164,
189, 188, 188, 188, 188, 164, 190, 164,
191, 164, 192, 164, 193, 164, 194, 195,
193, 164, 196, 164, 197, 164, 198, 164,
199, 164, 200, 200, 200, 164, 200, 200,
200, 201, 201, 164, 202, 202, 202, 202,
202, 202, 202, 202, 202, 164, 202, 202,
202, 203, 202, 202, 202, 202, 202, 202,
164, 205, 205, 205, 206, 204, 207, 204,
208, 204, 209, 210, 208, 210, 210, 210,
204, 212, 213, 211, 212, 213, 214, 211,
217, 218, 216, 217, 218, 219, 216, 221,
220, 223, 224, 225, 222, 224, 224, 224,
215, 227, 228, 226, 215, 231, 232, 233,
230, 231, 232, 230, 231, 232, 234, 230,
235, 232, 236, 233, 236, 236, 236, 230,
238, 239, 237, 238, 239, 240, 237, 242,
241, 243, 229, 244, 229, 245, 229, 246,
229, 247, 229, 248, 229, 249, 229, 250,
229, 251, 229, 252, 229, 253, 254, 252,
229, 255, 229, 256, 229, 257, 258, 256,
229, 259, 258, 260, 260, 229, 262, 261,
261, 261, 261, 229, 263, 229, 264, 229,
265, 229, 266, 229, 267, 229, 268, 229,
269, 229, 270, 229, 271, 229, 272, 273,
271, 229, 274, 229, 275, 229, 276, 229,
277, 229, 278, 229, 279, 229, 280, 229,
281, 282, 280, 229, 283, 282, 284, 284,
229, 286, 285, 285, 285, 285, 229, 287,
229, 288, 229, 289, 229, 290, 229, 291,
292, 290, 229, 293, 295, 292, 294, 294,
229, 297, 298, 297, 297, 299, 300, 301,
300, 296, 300, 300, 300, 229, 303, 304,
302, 229, 304, 293, 304, 304, 305, 295,
292, 294, 294, 229, 306, 229, 307, 229,
308, 309, 307, 309, 309, 309, 229, 311,
312, 310, 311, 312, 313, 310, 315, 317,
314, 316, 316, 229, 318, 303, 318, 318,
319, 304, 302, 229, 319, 319, 319, 320,
320, 320, 229, 321, 321, 321, 322, 321,
321, 321, 321, 321, 229, 324, 325, 323,
229, 326, 229, 327, 229, 328, 229, 329,
229, 330, 229, 331, 229, 332, 229, 333,
229, 334, 335, 333, 229, 336, 338, 335,
337, 337, 229, 340, 342, 343, 341, 344,
339, 341, 341, 341, 229, 346, 335, 347,
345, 229, 348, 349, 347, 229, 350, 229,
351, 229, 352, 229, 353, 229, 354, 229,
356, 357, 356, 356, 358, 360, 355, 359,
359, 229, 362, 363, 364, 361, 229, 365,
366, 363, 229, 336, 335, 338, 335, 337,
337, 229, 367, 368, 364, 229, 369, 229,
370, 229, 371, 229, 372, 229, 373, 229,
374, 375, 373, 229, 376, 377, 378, 375,
379, 379, 229, 377, 377, 377, 380, 380,
229, 382, 384, 383, 381, 383, 383, 383,
229, 386, 378, 385, 229, 378, 388, 378,
378, 389, 377, 378, 390, 387, 379, 379,
229, 388, 377, 378, 390, 387, 379, 379,
229, 391, 391, 391, 393, 394, 392, 392,
392, 392, 229, 395, 395, 395, 377, 378,
229, 397, 396, 398, 399, 396, 229, 397,
398, 399, 396, 229, 400, 229, 401, 229,
402, 229, 403, 229, 404, 229, 405, 405,
405, 229, 405, 405, 405, 406, 406, 229,
408, 407, 407, 407, 407, 229, 409, 229,
410, 410, 229, 412, 411, 411, 411, 411,
229, 414, 399, 413, 229, 365, 363, 366,
363, 229, 415, 229, 416, 229, 417, 418,
416, 418, 418, 418, 229, 420, 421, 419,
420, 421, 422, 419, 424, 425, 426, 428,
423, 427, 427, 229, 429, 362, 429, 429,
363, 364, 361, 430, 430, 229, 432, 434,
433, 435, 431, 433, 433, 433, 229, 341,
229, 436, 229, 437, 229, 438, 229, 439,
229, 440, 229, 441, 229, 442, 229, 443,
229, 444, 229, 445, 229, 446, 229, 447,
448, 446, 229, 449, 448, 450, 450, 229,
452, 451, 451, 451, 451, 229, 453, 229,
454, 229, 455, 229, 456, 229, 457, 229,
458, 459, 457, 229, 460, 229, 461, 229,
462, 229, 463, 229, 464, 229, 465, 229,
466, 229, 467, 229, 468, 469, 467, 229,
472, 473, 474, 475, 476, 477, 471, 470,
472, 471, 478, 1, 5, 479, 480, 479,
481, 479, 482, 479, 483, 479, 486, 487,
489, 490, 491, 485, 488, 488, 484, 486,
485, 492, 494, 69, 493, 71, 71, 71,
72, 79, 79, 79, 79, 493, 71, 71,
71, 72, 79, 495, 79, 79, 79, 493,
71, 71, 71, 72, 79, 496, 79, 79,
79, 493, 97, 97, 97, 98, 497, 498,
500, 499, 503, 504, 506, 502, 505, 505,
501, 503, 502, 507, 108, 112, 508, 114,
114, 114, 114, 114, 114, 114, 114, 508,
117, 117, 117, 118, 509, 510, 512, 511,
515, 516, 517, 518, 519, 520, 521, 514,
513, 515, 514, 522, 128, 132, 523, 524,
523, 525, 523, 526, 523, 527, 523, 529,
528, 532, 533, 535, 531, 534, 534, 534,
530, 532, 531, 536, 151, 155, 537, 159,
159, 159, 159, 537, 539, 538, 542, 543,
544, 545, 546, 547, 548, 541, 540, 542,
541, 549, 551, 176, 550, 552, 550, 553,
550, 554, 550, 555, 550, 205, 205, 205,
206, 556, 557, 559, 558, 562, 563, 565,
561, 564, 564, 564, 560, 562, 561, 566,
216, 220, 567, 224, 224, 224, 224, 567,
569, 568, 572, 573, 574, 575, 576, 577,
578, 579, 580, 581, 571, 570, 572, 571,
582, 584, 241, 583, 585, 583, 586, 587,
583, 590, 589, 588, 591, 592, 583, 595,
594, 593, 597, 596, 598, 583, 600, 599,
601, 583, 604, 603, 602, 605, 583, 606,
583, 608, 607, 0
};
static const short _eo_tokenizer_trans_targs[] = {
292, 0, 0, 1, 292, 2, 292, 4,
5, 6, 7, 8, 9, 10, 10, 11,
12, 13, 12, 14, 11, 292, 12, 12,
292, 13, 14, 15, 16, 12, 12, 292,
17, 17, 15, 18, 16, 17, 17, 18,
18, 20, 21, 22, 10, 24, 25, 26,
27, 28, 29, 30, 10, 32, 33, 34,
10, 299, 36, 36, 37, 38, 299, 38,
39, 39, 39, 40, 299, 41, 299, 42,
43, 44, 45, 44, 45, 45, 299, 46,
48, 49, 50, 51, 52, 53, 53, 299,
55, 56, 57, 58, 59, 60, 61, 305,
299, 62, 63, 64, 65, 65, 66, 66,
66, 67, 306, 308, 68, 68, 69, 308,
70, 308, 71, 312, 308, 72, 73, 74,
75, 75, 76, 76, 76, 77, 313, 315,
78, 78, 79, 315, 80, 315, 82, 82,
315, 84, 85, 85, 315, 87, 87, 315,
89, 90, 91, 92, 92, 315, 323, 93,
93, 94, 323, 95, 323, 97, 97, 96,
323, 97, 97, 323, 328, 99, 99, 100,
101, 328, 101, 102, 102, 102, 103, 328,
104, 328, 106, 107, 108, 328, 110, 111,
112, 113, 114, 115, 115, 328, 117, 118,
119, 120, 120, 328, 122, 123, 124, 125,
126, 127, 128, 335, 328, 129, 130, 131,
132, 132, 133, 133, 133, 134, 336, 338,
135, 135, 136, 338, 137, 338, 139, 139,
138, 338, 139, 139, 338, 343, 141, 141,
142, 143, 343, 143, 144, 144, 144, 145,
343, 146, 343, 148, 149, 150, 151, 152,
153, 154, 155, 156, 157, 157, 343, 159,
160, 160, 161, 161, 162, 162, 348, 164,
165, 166, 167, 168, 169, 170, 171, 172,
172, 343, 174, 175, 176, 177, 178, 179,
180, 180, 181, 181, 182, 182, 350, 184,
185, 186, 187, 187, 188, 188, 189, 351,
190, 198, 190, 199, 189, 191, 190, 190,
191, 192, 193, 194, 194, 195, 195, 195,
196, 197, 188, 188, 189, 351, 198, 199,
200, 200, 201, 190, 190, 191, 203, 204,
205, 206, 207, 208, 209, 210, 210, 211,
211, 212, 353, 213, 213, 212, 262, 211,
214, 213, 213, 214, 214, 215, 216, 217,
218, 219, 220, 221, 260, 221, 222, 261,
224, 221, 221, 222, 224, 222, 223, 224,
225, 226, 227, 228, 229, 230, 230, 231,
231, 232, 235, 237, 233, 234, 234, 233,
235, 234, 234, 236, 236, 254, 239, 238,
237, 232, 235, 238, 240, 240, 241, 253,
242, 243, 244, 245, 246, 247, 248, 248,
249, 250, 251, 251, 252, 252, 252, 255,
256, 256, 257, 257, 257, 258, 259, 236,
236, 232, 235, 237, 239, 260, 261, 221,
221, 261, 222, 224, 264, 265, 266, 267,
268, 269, 270, 271, 272, 273, 274, 274,
275, 275, 276, 276, 355, 278, 279, 280,
281, 282, 282, 343, 284, 285, 286, 287,
288, 289, 290, 291, 291, 343, 292, 293,
293, 294, 295, 296, 297, 298, 292, 292,
3, 19, 23, 31, 299, 300, 300, 301,
302, 303, 304, 307, 299, 299, 35, 47,
54, 299, 299, 299, 299, 308, 309, 309,
310, 311, 314, 308, 308, 308, 308, 308,
308, 315, 316, 316, 317, 318, 319, 320,
321, 322, 315, 315, 81, 83, 86, 88,
315, 315, 323, 324, 324, 325, 326, 327,
323, 323, 323, 323, 328, 329, 329, 330,
331, 332, 333, 334, 337, 328, 328, 98,
105, 109, 116, 121, 328, 328, 328, 328,
338, 339, 339, 340, 341, 342, 338, 338,
338, 338, 343, 344, 344, 345, 346, 347,
349, 352, 354, 356, 357, 358, 343, 343,
140, 147, 158, 163, 343, 348, 348, 173,
183, 343, 350, 350, 343, 343, 202, 343,
343, 263, 343, 355, 355, 277, 283, 343,
343
};
static const short _eo_tokenizer_trans_actions[] = {
221, 0, 1, 0, 211, 0, 244, 0,
0, 0, 0, 0, 0, 45, 0, 3,
51, 51, 325, 51, 0, 328, 0, 1,
213, 0, 0, 0, 3, 13, 286, 289,
11, 283, 11, 11, 0, 0, 1, 0,
1, 0, 0, 0, 43, 0, 0, 0,
0, 0, 0, 0, 49, 0, 0, 0,
47, 77, 0, 1, 0, 0, 61, 1,
3, 0, 1, 0, 59, 0, 223, 0,
0, 5, 253, 0, 3, 0, 256, 0,
0, 0, 0, 0, 0, 3, 0, 250,
0, 0, 0, 0, 0, 3, 0, 337,
75, 0, 0, 0, 0, 1, 3, 0,
1, 0, 0, 95, 0, 1, 0, 79,
0, 226, 0, 340, 93, 0, 0, 0,
0, 1, 3, 0, 1, 0, 0, 117,
0, 1, 0, 97, 0, 229, 0, 1,
99, 0, 0, 1, 103, 0, 1, 101,
0, 0, 0, 0, 1, 105, 133, 0,
1, 0, 119, 0, 232, 7, 262, 0,
265, 0, 1, 121, 155, 0, 1, 0,
0, 137, 1, 3, 0, 1, 0, 135,
0, 235, 0, 0, 0, 274, 0, 0,
0, 0, 0, 3, 0, 271, 0, 0,
0, 0, 1, 139, 0, 0, 0, 0,
0, 3, 0, 343, 153, 0, 0, 0,
0, 1, 3, 0, 1, 0, 0, 171,
0, 1, 0, 157, 0, 238, 9, 277,
0, 280, 0, 1, 159, 209, 0, 1,
0, 0, 175, 1, 3, 0, 1, 0,
173, 0, 241, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 181, 0,
0, 1, 0, 1, 3, 0, 25, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 183, 0, 0, 0, 0, 0, 0,
0, 1, 0, 1, 3, 0, 23, 0,
0, 0, 0, 1, 0, 1, 3, 0,
15, 15, 292, 15, 0, 15, 0, 1,
0, 0, 0, 0, 1, 3, 0, 1,
0, 0, 19, 298, 301, 19, 0, 0,
3, 0, 0, 17, 295, 17, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0,
1, 3, 0, 27, 304, 0, 0, 27,
27, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 29, 29, 307, 29, 310,
29, 0, 1, 0, 0, 1, 0, 1,
0, 0, 0, 0, 0, 0, 1, 0,
1, 0, 0, 3, 3, 35, 316, 0,
35, 0, 1, 0, 1, 0, 0, 33,
0, 33, 33, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 3, 0,
39, 0, 3, 0, 41, 0, 1, 0,
0, 1, 3, 0, 1, 0, 0, 37,
319, 37, 37, 322, 37, 0, 3, 31,
313, 0, 31, 31, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1,
0, 1, 3, 0, 21, 0, 0, 0,
0, 0, 1, 187, 0, 0, 0, 0,
0, 0, 0, 0, 1, 185, 215, 0,
1, 331, 57, 57, 57, 57, 217, 219,
0, 0, 0, 0, 65, 0, 1, 331,
334, 334, 334, 0, 67, 73, 0, 0,
0, 69, 247, 71, 63, 83, 0, 1,
331, 334, 0, 85, 91, 87, 259, 89,
81, 109, 0, 1, 331, 57, 57, 57,
57, 0, 111, 115, 0, 0, 0, 0,
113, 107, 125, 0, 1, 331, 334, 0,
127, 131, 129, 123, 143, 0, 1, 331,
57, 57, 57, 57, 0, 145, 151, 0,
0, 0, 0, 0, 147, 268, 149, 141,
163, 0, 1, 331, 334, 0, 165, 169,
167, 161, 191, 0, 1, 331, 57, 57,
57, 57, 57, 57, 57, 0, 193, 207,
0, 0, 0, 0, 199, 0, 1, 0,
0, 197, 0, 1, 203, 179, 0, 201,
177, 0, 195, 0, 1, 0, 0, 205,
189
};
static const short _eo_tokenizer_to_state_actions[] = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 53, 0, 0, 0,
0, 0, 0, 53, 0, 0, 0, 0,
0, 0, 0, 0, 53, 0, 0, 0,
0, 0, 0, 53, 0, 0, 0, 0,
0, 0, 0, 53, 0, 0, 0, 0,
53, 0, 0, 0, 0, 0, 0, 0,
0, 0, 53, 0, 0, 0, 0, 53,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0
};
static const short _eo_tokenizer_from_state_actions[] = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 55, 0, 0, 0,
0, 0, 0, 55, 0, 0, 0, 0,
0, 0, 0, 0, 55, 0, 0, 0,
0, 0, 0, 55, 0, 0, 0, 0,
0, 0, 0, 55, 0, 0, 0, 0,
55, 0, 0, 0, 0, 0, 0, 0,
0, 0, 55, 0, 0, 0, 0, 55,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0
};
static const short _eo_tokenizer_eof_trans[] = {
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 58, 58, 58, 58, 58,
58, 58, 58, 58, 58, 58, 58, 58,
58, 58, 58, 58, 58, 58, 58, 58,
58, 58, 58, 58, 58, 58, 97, 97,
97, 97, 97, 97, 108, 108, 108, 108,
117, 117, 117, 117, 117, 117, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 151, 151, 151,
151, 151, 165, 165, 165, 165, 165, 165,
165, 165, 165, 165, 165, 165, 165, 165,
165, 165, 165, 165, 165, 165, 165, 165,
165, 165, 165, 165, 165, 165, 165, 165,
165, 205, 205, 205, 205, 205, 205, 216,
216, 216, 216, 216, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 230, 230, 230, 230,
230, 230, 230, 230, 0, 479, 480, 480,
480, 480, 480, 0, 493, 494, 494, 494,
494, 498, 499, 500, 0, 508, 509, 509,
510, 511, 512, 0, 523, 524, 524, 524,
524, 524, 529, 0, 537, 538, 538, 539,
0, 550, 551, 551, 551, 551, 551, 557,
558, 559, 0, 567, 568, 568, 569, 0,
583, 584, 584, 584, 589, 584, 594, 597,
584, 600, 584, 603, 584, 584, 608
};
static const int eo_tokenizer_start = 292;
static const int eo_tokenizer_first_final = 292;
static const int eo_tokenizer_error = -1;
static const int eo_tokenizer_en_tokenize_accessor = 299;
static const int eo_tokenizer_en_tokenize_params = 308;
static const int eo_tokenizer_en_tokenize_property = 315;
static const int eo_tokenizer_en_tokenize_properties = 323;
static const int eo_tokenizer_en_tokenize_method = 328;
static const int eo_tokenizer_en_tokenize_methods = 338;
static const int eo_tokenizer_en_tokenize_class = 343;
static const int eo_tokenizer_en_main = 292;
#line 1030 "lib/eolian/eo_lexer.rl"
Eina_Bool
eo_tokenizer_walk(Eo_Tokenizer *toknz, const char *source)
{
INF("tokenize %s...", source);
toknz->source = eina_stringshare_add(source);
FILE *stream;
Eina_Bool ret = EINA_TRUE;
int done = 0;
int have = 0;
int offset = 0;
stream = fopen(toknz->source, "rb");
if (!stream)
{
ERR("unable to read in %s", toknz->source);
return EINA_FALSE;
}
#line 1294 "lib/eolian/eo_lexer.c"
{
toknz->cs = eo_tokenizer_start;
toknz->ts = 0;
toknz->te = 0;
toknz->act = 0;
}
#line 1053 "lib/eolian/eo_lexer.rl"
while (!done)
{
int len;
int space;
toknz->p = toknz->buf + have;
space = BUFSIZE - have;
if (space == 0)
{
fclose(stream);
ABORT(toknz, "out of buffer space");
}
len = fread(toknz->p, 1, space, stream);
if (len == 0) break;
toknz->pe = toknz->p + len;
if (len < space)
{
toknz->eof = toknz->pe;
done = 1;
}
#line 1329 "lib/eolian/eo_lexer.c"
{
int _klen;
unsigned int _trans;
const char *_acts;
unsigned int _nacts;
const char *_keys;
if ( ( toknz->p) == ( toknz->pe) )
goto _test_eof;
_resume:
_acts = _eo_tokenizer_actions + _eo_tokenizer_from_state_actions[ toknz->cs];
_nacts = (unsigned int) *_acts++;
while ( _nacts-- > 0 ) {
switch ( *_acts++ ) {
case 38:
#line 1 "NONE"
{ toknz->ts = ( toknz->p);}
break;
#line 1348 "lib/eolian/eo_lexer.c"
}
}
_keys = _eo_tokenizer_trans_keys + _eo_tokenizer_key_offsets[ toknz->cs];
_trans = _eo_tokenizer_index_offsets[ toknz->cs];
_klen = _eo_tokenizer_single_lengths[ toknz->cs];
if ( _klen > 0 ) {
const char *_lower = _keys;
const char *_mid;
const char *_upper = _keys + _klen - 1;
while (1) {
if ( _upper < _lower )
break;
_mid = _lower + ((_upper-_lower) >> 1);
if ( (*( toknz->p)) < *_mid )
_upper = _mid - 1;
else if ( (*( toknz->p)) > *_mid )
_lower = _mid + 1;
else {
_trans += (unsigned int)(_mid - _keys);
goto _match;
}
}
_keys += _klen;
_trans += _klen;
}
_klen = _eo_tokenizer_range_lengths[ toknz->cs];
if ( _klen > 0 ) {
const char *_lower = _keys;
const char *_mid;
const char *_upper = _keys + (_klen<<1) - 2;
while (1) {
if ( _upper < _lower )
break;
_mid = _lower + (((_upper-_lower) >> 1) & ~1);
if ( (*( toknz->p)) < _mid[0] )
_upper = _mid - 2;
else if ( (*( toknz->p)) > _mid[1] )
_lower = _mid + 2;
else {
_trans += (unsigned int)((_mid - _keys)>>1);
goto _match;
}
}
_trans += _klen;
}
_match:
_trans = _eo_tokenizer_indicies[_trans];
_eof_trans:
toknz->cs = _eo_tokenizer_trans_targs[_trans];
if ( _eo_tokenizer_trans_actions[_trans] == 0 )
goto _again;
_acts = _eo_tokenizer_actions + _eo_tokenizer_trans_actions[_trans];
_nacts = (unsigned int) *_acts++;
while ( _nacts-- > 0 )
{
switch ( *_acts++ )
{
case 0:
#line 359 "lib/eolian/eo_lexer.rl"
{
toknz->current_line += 1;
DBG("inc[%d] %d", toknz->cs, toknz->current_line);
}
break;
case 1:
#line 364 "lib/eolian/eo_lexer.rl"
{
toknz->saved.line = toknz->current_line;
DBG("save line[%d] %d", toknz->cs, toknz->current_line);
}
break;
case 2:
#line 369 "lib/eolian/eo_lexer.rl"
{
toknz->saved.tok = ( toknz->p);
DBG("save token[%d] %p %c", toknz->cs, ( toknz->p), *( toknz->p));
}
break;
case 3:
#line 446 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.accessor) ABORT(toknz, "No accessor!!!");
if (toknz->tmp.accessor->ret != NULL)
ABORT(toknz, "accessor has already a return type");
toknz->tmp.accessor->ret = _eo_tokenizer_return_get(toknz, ( toknz->p));
}
break;
case 4:
#line 453 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.accessor) ABORT(toknz, "No accessor!!!");
if (!toknz->tmp.accessor->ret) ABORT(toknz, "No ret!!!");
if (toknz->tmp.accessor->ret->comment != NULL)
ABORT(toknz, "accessor return type has already a comment");
toknz->tmp.accessor->ret->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-2);
INF(" %s", toknz->tmp.accessor->ret->comment);
}
break;
case 5:
#line 462 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.accessor) ABORT(toknz, "No accessor!!!");
toknz->tmp.accessor->legacy = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 6:
#line 476 "lib/eolian/eo_lexer.rl"
{
toknz->tmp.accessor_param = _eo_tokenizer_accessor_param_get(toknz, ( toknz->p));
}
break;
case 7:
#line 480 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.accessor_param)
ABORT(toknz, "No accessor param!!!");
toknz->tmp.accessor_param->attrs = _eo_tokenizer_token_get(toknz, ( toknz->p));
toknz->tmp.accessor->params =
eina_list_append(toknz->tmp.accessor->params, toknz->tmp.accessor_param);
toknz->tmp.accessor_param = NULL;
}
break;
case 8:
#line 509 "lib/eolian/eo_lexer.rl"
{
const char *c = _eo_tokenizer_token_get(toknz, ( toknz->p)-2);
if (toknz->tmp.param == NULL)
ABORT(toknz, "no parameter set to associate this comment to: %s", c);
toknz->tmp.param->comment = c;
toknz->tmp.param = NULL;
}
break;
case 9:
#line 517 "lib/eolian/eo_lexer.rl"
{
toknz->tmp.param = _eo_tokenizer_param_get(toknz, ( toknz->p));
if (toknz->tmp.params)
*(toknz->tmp.params) = eina_list_append(*(toknz->tmp.params), toknz->tmp.param);
else
ABORT(toknz, "got a param but there is no property nor method waiting for it");
INF(" %s : %s", toknz->tmp.param->name, toknz->tmp.param->type);
}
break;
case 10:
#line 617 "lib/eolian/eo_lexer.rl"
{
if (toknz->tmp.prop != NULL)
ABORT(toknz, "there is a pending property definition %s", toknz->tmp.prop->name);
toknz->tmp.prop = _eo_tokenizer_property_get(toknz, ( toknz->p));
}
break;
case 11:
#line 657 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
if (toknz->tmp.meth->ret != NULL)
ABORT(toknz, "method '%s' has already a return type", toknz->tmp.meth->name);
toknz->tmp.meth->ret = _eo_tokenizer_return_get(toknz, ( toknz->p));
}
break;
case 12:
#line 664 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
if (toknz->tmp.meth->ret != NULL) ABORT(toknz, "No ret!!!");
if (toknz->tmp.meth->ret->comment != NULL)
ABORT(toknz, "method '%s' return type has already a comment", toknz->tmp.meth->name);
toknz->tmp.meth->ret->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-2);
INF(" %s", toknz->tmp.meth->ret->comment);
}
break;
case 13:
#line 673 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
toknz->tmp.meth->legacy = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 14:
#line 678 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
toknz->tmp.meth->obj_const = EINA_TRUE;
INF(" obj const");
}
break;
case 15:
#line 740 "lib/eolian/eo_lexer.rl"
{
if (toknz->tmp.meth != NULL)
ABORT(toknz, "there is a pending method definition %s", toknz->tmp.meth->name);
toknz->tmp.meth = _eo_tokenizer_method_get(toknz, ( toknz->p));
}
break;
case 16:
#line 772 "lib/eolian/eo_lexer.rl"
{
const char *base = _eo_tokenizer_token_get(toknz, ( toknz->p));
toknz->tmp.str_items = eina_list_append(toknz->tmp.str_items, base);
}
break;
case 17:
#line 777 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
toknz->tmp.kls->inherits = toknz->tmp.str_items;
toknz->tmp.str_items = NULL;
}
break;
case 18:
#line 825 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
toknz->tmp.event = _eo_tokenizer_event_get(toknz, ( toknz->p));
toknz->tmp.kls->events = eina_list_append(toknz->tmp.kls->events, toknz->tmp.event);
}
break;
case 19:
#line 831 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.event) ABORT(toknz, "No event!!!");
if (toknz->tmp.event->type != NULL)
ABORT(toknz, "event %s has already a type %s", toknz->tmp.event->name, toknz->tmp.event->type);
toknz->tmp.event->type = _eo_tokenizer_token_get(toknz, ( toknz->p)-1);
}
break;
case 20:
#line 838 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.event) ABORT(toknz, "No event!!!");
if (toknz->tmp.event->comment != NULL)
ABORT(toknz, "event %s has already a comment", toknz->tmp.event->name);
toknz->tmp.event->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-2);
toknz->tmp.event = NULL;
}
break;
case 21:
#line 846 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
if (toknz->tmp.kls->legacy_prefix != NULL)
ABORT(toknz, "A legacy prefix has already been given");
toknz->tmp.kls->legacy_prefix = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 22:
#line 855 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
if (toknz->tmp.kls->eo_prefix != NULL)
ABORT(toknz, "An Eo prefix has already been given");
toknz->tmp.kls->eo_prefix = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 23:
#line 864 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
if (toknz->tmp.kls->data_type != NULL)
ABORT(toknz, "A data type has already been given");
toknz->tmp.kls->data_type = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 24:
#line 877 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
toknz->tmp.impl = _eo_tokenizer_implement_get(toknz, ( toknz->p));
toknz->tmp.kls->implements = eina_list_append(toknz->tmp.kls->implements, toknz->tmp.impl);
}
break;
case 25:
#line 883 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl) ABORT(toknz, "No implement!!!");
if (toknz->tmp.impl->legacy)
ABORT(toknz, "Legacy section already allocated for implement item");
toknz->tmp.impl->legacy = calloc(1, sizeof(Eo_Implement_Legacy_Def));
}
break;
case 26:
#line 890 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl) ABORT(toknz, "No implement!!!");
if (!toknz->tmp.impl->legacy)
ABORT(toknz, "No legacy section");
toknz->tmp.impl->legacy->function_name = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 27:
#line 897 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl) ABORT(toknz, "No implement!!!");
toknz->tmp.impl_leg_param = calloc(1, sizeof(Eo_Implement_Legacy_Param_Def));
toknz->tmp.impl->legacy->params = eina_list_append(
toknz->tmp.impl->legacy->params, toknz->tmp.impl_leg_param);
toknz->tmp.impl_leg_param->eo_name = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 28:
#line 906 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl_leg_param)
ABORT(toknz, "No implement legacy param!!!");
toknz->tmp.impl_leg_param->legacy_name = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 29:
#line 912 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl_leg_param)
ABORT(toknz, "No implement legacy param!!!");
toknz->tmp.impl_leg_param->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-2);
}
break;
case 30:
#line 918 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl) ABORT(toknz, "No implement!!!");
if (!toknz->tmp.impl->legacy)
ABORT(toknz, "No legacy section");
toknz->tmp.impl->legacy->ret_type= _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 31:
#line 925 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl) ABORT(toknz, "No implement!!!");
if (!toknz->tmp.impl->legacy)
ABORT(toknz, "No legacy section");
toknz->tmp.impl->legacy->ret_value = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 32:
#line 996 "lib/eolian/eo_lexer.rl"
{
toknz->tmp.kls_type = EOLIAN_CLASS_REGULAR;
}
break;
case 33:
#line 999 "lib/eolian/eo_lexer.rl"
{
toknz->tmp.kls_type = EOLIAN_CLASS_ABSTRACT;
}
break;
case 34:
#line 1002 "lib/eolian/eo_lexer.rl"
{
toknz->tmp.kls_type = EOLIAN_CLASS_MIXIN;
}
break;
case 35:
#line 1005 "lib/eolian/eo_lexer.rl"
{
toknz->tmp.kls_type = EOLIAN_CLASS_INTERFACE;
}
break;
case 36:
#line 1009 "lib/eolian/eo_lexer.rl"
{
if (toknz->tmp.kls != NULL)
ABORT(toknz, "there is a pending class definition %s", toknz->tmp.kls->name);
toknz->tmp.kls = _eo_tokenizer_class_get(toknz, ( toknz->p));
toknz->tmp.kls->type = toknz->tmp.kls_type;
}
break;
case 39:
#line 1 "NONE"
{ toknz->te = ( toknz->p)+1;}
break;
case 40:
#line 438 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.accessor) ABORT(toknz, "No accessor!!!");
if (toknz->tmp.accessor->comment != NULL)
ABORT(toknz, "accessor has already a comment");
toknz->tmp.accessor->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-1);
INF(" %s", toknz->tmp.accessor->comment);
}}
break;
case 41:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 42:
#line 501 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;}
break;
case 43:
#line 502 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;}
break;
case 44:
#line 467 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" }");
if (!toknz->tmp.prop) ABORT(toknz, "No prop!!!");
toknz->tmp.prop->accessors = eina_list_append(toknz->tmp.prop->accessors, toknz->tmp.accessor);
toknz->tmp.accessor = NULL;
toknz->current_nesting--;
{ toknz->cs = 315; goto _again;}
}}
break;
case 45:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 46:
#line 497 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 47:
#line 500 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 48:
#line 467 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
INF(" }");
if (!toknz->tmp.prop) ABORT(toknz, "No prop!!!");
toknz->tmp.prop->accessors = eina_list_append(toknz->tmp.prop->accessors, toknz->tmp.accessor);
toknz->tmp.accessor = NULL;
toknz->current_nesting--;
{ toknz->cs = 315; goto _again;}
}}
break;
case 49:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 50:
#line 500 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}}
break;
case 51:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 52:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 53:
#line 526 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" }");
toknz->tmp.param = NULL;
toknz->current_nesting--;
if (toknz->tmp.prop)
{ toknz->cs = 315; goto _again;}
else if (toknz->tmp.meth)
{ toknz->cs = 328; goto _again;}
else
ABORT(toknz, "leaving tokenize_params but there is no property nor method pending");
}}
break;
case 54:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 55:
#line 542 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 56:
#line 544 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 57:
#line 526 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
INF(" }");
toknz->tmp.param = NULL;
toknz->current_nesting--;
if (toknz->tmp.prop)
{ toknz->cs = 315; goto _again;}
else if (toknz->tmp.meth)
{ toknz->cs = 328; goto _again;}
else
ABORT(toknz, "leaving tokenize_params but there is no property nor method pending");
}}
break;
case 58:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 59:
#line 544 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}}
break;
case 60:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 61:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 62:
#line 551 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" get {");
toknz->tmp.accessor = _eo_tokenizer_accessor_get(toknz, GETTER);
toknz->current_nesting++;
{ toknz->cs = 299; goto _again;}
}}
break;
case 63:
#line 558 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" set {");
toknz->tmp.accessor = _eo_tokenizer_accessor_get(toknz, SETTER);
toknz->current_nesting++;
{ toknz->cs = 299; goto _again;}
}}
break;
case 64:
#line 565 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" keys {");
toknz->current_nesting++;
toknz->tmp.params = &(toknz->tmp.prop->keys);
{ toknz->cs = 308; goto _again;}
}}
break;
case 65:
#line 572 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" values {");
toknz->current_nesting++;
toknz->tmp.params = &(toknz->tmp.prop->values);
{ toknz->cs = 308; goto _again;}
}}
break;
case 66:
#line 579 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.prop) ABORT(toknz, "No property!!!");
if (eina_list_count(toknz->tmp.prop->values) == 0)
WRN("property '%s' has no values.", toknz->tmp.prop->name);
if (eina_list_count(toknz->tmp.prop->accessors) == 0)
WRN("property '%s' has no accessors.", toknz->tmp.prop->name);
INF(" }");
toknz->tmp.kls->properties = eina_list_append(toknz->tmp.kls->properties, toknz->tmp.prop);
toknz->tmp.prop = NULL;
toknz->current_nesting--;
{ toknz->cs = 323; goto _again;}
}}
break;
case 67:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 68:
#line 598 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 69:
#line 579 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
if (!toknz->tmp.prop) ABORT(toknz, "No property!!!");
if (eina_list_count(toknz->tmp.prop->values) == 0)
WRN("property '%s' has no values.", toknz->tmp.prop->name);
if (eina_list_count(toknz->tmp.prop->accessors) == 0)
WRN("property '%s' has no accessors.", toknz->tmp.prop->name);
INF(" }");
toknz->tmp.kls->properties = eina_list_append(toknz->tmp.kls->properties, toknz->tmp.prop);
toknz->tmp.prop = NULL;
toknz->current_nesting--;
{ toknz->cs = 323; goto _again;}
}}
break;
case 70:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 71:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 72:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 73:
#line 610 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.prop) ABORT(toknz, "No property!!!");
INF(" %s {", toknz->tmp.prop->name);
toknz->current_nesting++;
{ toknz->cs = 315; goto _again;}
}}
break;
case 74:
#line 623 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" }");
toknz->current_nesting--;
{ toknz->cs = 343; goto _again;}
}}
break;
case 75:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 76:
#line 632 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 77:
#line 623 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
INF(" }");
toknz->current_nesting--;
{ toknz->cs = 343; goto _again;}
}}
break;
case 78:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 79:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 80:
#line 641 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
if (toknz->tmp.meth->comment != NULL)
ABORT(toknz, "method has already a comment");
toknz->tmp.meth->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-1);
INF(" %s", toknz->tmp.meth->comment);
}}
break;
case 81:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 82:
#line 649 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
INF(" params {");
toknz->current_nesting++;
toknz->tmp.params = &(toknz->tmp.meth->params);
{ toknz->cs = 308; goto _again;}
}}
break;
case 83:
#line 725 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;}
break;
case 84:
#line 726 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;}
break;
case 85:
#line 684 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
Eina_List **l = NULL;
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
if (eina_list_count(toknz->tmp.meth->params) == 0)
WRN("method '%s' has no parameters.", toknz->tmp.meth->name);
INF(" }");
switch (toknz->current_methods_type) {
case METH_CONSTRUCTOR:
l = &toknz->tmp.kls->constructors;
break;
case METH_DESTRUCTOR:
l = &toknz->tmp.kls->destructors;
break;
case METH_REGULAR:
l = &toknz->tmp.kls->methods;
break;
default:
ABORT(toknz, "unknown method type %d", toknz->current_methods_type);
}
toknz->tmp.meth->type = toknz->current_methods_type;
*l = eina_list_append(*l, toknz->tmp.meth);
toknz->tmp.meth = NULL;
toknz->current_nesting--;
{ toknz->cs = 338; goto _again;}
}}
break;
case 86:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 87:
#line 720 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 88:
#line 724 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 89:
#line 684 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
Eina_List **l = NULL;
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
if (eina_list_count(toknz->tmp.meth->params) == 0)
WRN("method '%s' has no parameters.", toknz->tmp.meth->name);
INF(" }");
switch (toknz->current_methods_type) {
case METH_CONSTRUCTOR:
l = &toknz->tmp.kls->constructors;
break;
case METH_DESTRUCTOR:
l = &toknz->tmp.kls->destructors;
break;
case METH_REGULAR:
l = &toknz->tmp.kls->methods;
break;
default:
ABORT(toknz, "unknown method type %d", toknz->current_methods_type);
}
toknz->tmp.meth->type = toknz->current_methods_type;
*l = eina_list_append(*l, toknz->tmp.meth);
toknz->tmp.meth = NULL;
toknz->current_nesting--;
{ toknz->cs = 338; goto _again;}
}}
break;
case 90:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 91:
#line 724 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}}
break;
case 92:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 93:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 94:
#line 733 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
INF(" %s {", toknz->tmp.meth->name);
toknz->current_nesting++;
{ toknz->cs = 328; goto _again;}
}}
break;
case 95:
#line 746 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" }");
toknz->current_methods_type = METH_TYPE_LAST;
toknz->current_nesting--;
{ toknz->cs = 343; goto _again;}
}}
break;
case 96:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 97:
#line 756 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 98:
#line 746 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
INF(" }");
toknz->current_methods_type = METH_TYPE_LAST;
toknz->current_nesting--;
{ toknz->cs = 343; goto _again;}
}}
break;
case 99:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 100:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 101:
#line 765 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
if (toknz->tmp.kls->comment != NULL)
ABORT(toknz, "class %s has already a comment", toknz->tmp.kls->name);
toknz->tmp.kls->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-1);
}}
break;
case 102:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 103:
#line 783 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
}}
break;
case 104:
#line 786 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
}}
break;
case 105:
#line 789 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" constructors {");
toknz->current_methods_type = METH_CONSTRUCTOR;
toknz->current_nesting++;
{ toknz->cs = 338; goto _again;}
}}
break;
case 106:
#line 796 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" destructors {");
toknz->current_methods_type = METH_DESTRUCTOR;
toknz->current_nesting++;
{ toknz->cs = 338; goto _again;}
}}
break;
case 107:
#line 803 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" properties {");
toknz->current_nesting++;
{ toknz->cs = 323; goto _again;}
}}
break;
case 108:
#line 809 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" begin methods");
toknz->current_methods_type = METH_REGULAR;
toknz->current_nesting++;
{ toknz->cs = 338; goto _again;}
}}
break;
case 109:
#line 816 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
INF("end class: %s", toknz->tmp.kls->name);
toknz->classes = eina_list_append(toknz->classes, toknz->tmp.kls);
toknz->tmp.kls = NULL;
toknz->current_nesting--;
{ toknz->cs = 292; goto _again;}
}}
break;
case 110:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 111:
#line 971 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 112:
#line 974 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 113:
#line 975 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 114:
#line 976 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 115:
#line 783 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
}}
break;
case 116:
#line 786 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
}}
break;
case 117:
#line 816 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
INF("end class: %s", toknz->tmp.kls->name);
toknz->classes = eina_list_append(toknz->classes, toknz->tmp.kls);
toknz->tmp.kls = NULL;
toknz->current_nesting--;
{ toknz->cs = 292; goto _again;}
}}
break;
case 118:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 119:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 120:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 121:
#line 989 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
INF("begin class: %s", toknz->tmp.kls->name);
toknz->current_nesting++;
{ toknz->cs = 343; goto _again;}
}}
break;
case 122:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 123:
#line 1024 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 124:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 125:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
#line 2673 "lib/eolian/eo_lexer.c"
}
}
_again:
_acts = _eo_tokenizer_actions + _eo_tokenizer_to_state_actions[ toknz->cs];
_nacts = (unsigned int) *_acts++;
while ( _nacts-- > 0 ) {
switch ( *_acts++ ) {
case 37:
#line 1 "NONE"
{ toknz->ts = 0;}
break;
#line 2686 "lib/eolian/eo_lexer.c"
}
}
if ( ++( toknz->p) != ( toknz->pe) )
goto _resume;
_test_eof: {}
if ( ( toknz->p) == ( toknz->eof) )
{
if ( _eo_tokenizer_eof_trans[ toknz->cs] > 0 ) {
_trans = _eo_tokenizer_eof_trans[ toknz->cs] - 1;
goto _eof_trans;
}
}
_out: {}
}
#line 1079 "lib/eolian/eo_lexer.rl"
if ( toknz->cs ==
#line 2707 "lib/eolian/eo_lexer.c"
-1
#line 1080 "lib/eolian/eo_lexer.rl"
)
{
ERR("%s: wrong termination", source);
ret = EINA_FALSE;
break;
}
if ( toknz->ts == 0 )
have = 0;
else
{
DBG("move data and pointers before buffer feed");
have = toknz->pe - toknz->ts;
offset = toknz->ts - toknz->buf;
memmove(toknz->buf, toknz->ts, have);
toknz->te -= offset;
toknz->ts = toknz->buf;
}
if (toknz->saved.tok != NULL)
{
if ((have == 0) || ((toknz->saved.tok - offset) < toknz->buf))
{
WRN("reset lost saved token %p", toknz->saved.tok);
toknz->saved.tok = NULL;
}
else
toknz->saved.tok -= offset;
}
}
fclose(stream);
return ret;
}
static Eina_Bool
eo_tokenizer_mem_walk(Eo_Tokenizer *toknz, const char *source, char *buffer, unsigned int len)
{
INF("tokenize %s...", source);
toknz->source = eina_stringshare_add(source);
Eina_Bool ret = EINA_TRUE;
#line 2755 "lib/eolian/eo_lexer.c"
{
toknz->cs = eo_tokenizer_start;
toknz->ts = 0;
toknz->te = 0;
toknz->act = 0;
}
#line 1125 "lib/eolian/eo_lexer.rl"
toknz->p = buffer;
toknz->pe = toknz->p + len;
toknz->eof = toknz->pe;
#line 2772 "lib/eolian/eo_lexer.c"
{
int _klen;
unsigned int _trans;
const char *_acts;
unsigned int _nacts;
const char *_keys;
if ( ( toknz->p) == ( toknz->pe) )
goto _test_eof;
_resume:
_acts = _eo_tokenizer_actions + _eo_tokenizer_from_state_actions[ toknz->cs];
_nacts = (unsigned int) *_acts++;
while ( _nacts-- > 0 ) {
switch ( *_acts++ ) {
case 38:
#line 1 "NONE"
{ toknz->ts = ( toknz->p);}
break;
#line 2791 "lib/eolian/eo_lexer.c"
}
}
_keys = _eo_tokenizer_trans_keys + _eo_tokenizer_key_offsets[ toknz->cs];
_trans = _eo_tokenizer_index_offsets[ toknz->cs];
_klen = _eo_tokenizer_single_lengths[ toknz->cs];
if ( _klen > 0 ) {
const char *_lower = _keys;
const char *_mid;
const char *_upper = _keys + _klen - 1;
while (1) {
if ( _upper < _lower )
break;
_mid = _lower + ((_upper-_lower) >> 1);
if ( (*( toknz->p)) < *_mid )
_upper = _mid - 1;
else if ( (*( toknz->p)) > *_mid )
_lower = _mid + 1;
else {
_trans += (unsigned int)(_mid - _keys);
goto _match;
}
}
_keys += _klen;
_trans += _klen;
}
_klen = _eo_tokenizer_range_lengths[ toknz->cs];
if ( _klen > 0 ) {
const char *_lower = _keys;
const char *_mid;
const char *_upper = _keys + (_klen<<1) - 2;
while (1) {
if ( _upper < _lower )
break;
_mid = _lower + (((_upper-_lower) >> 1) & ~1);
if ( (*( toknz->p)) < _mid[0] )
_upper = _mid - 2;
else if ( (*( toknz->p)) > _mid[1] )
_lower = _mid + 2;
else {
_trans += (unsigned int)((_mid - _keys)>>1);
goto _match;
}
}
_trans += _klen;
}
_match:
_trans = _eo_tokenizer_indicies[_trans];
_eof_trans:
toknz->cs = _eo_tokenizer_trans_targs[_trans];
if ( _eo_tokenizer_trans_actions[_trans] == 0 )
goto _again;
_acts = _eo_tokenizer_actions + _eo_tokenizer_trans_actions[_trans];
_nacts = (unsigned int) *_acts++;
while ( _nacts-- > 0 )
{
switch ( *_acts++ )
{
case 0:
#line 359 "lib/eolian/eo_lexer.rl"
{
toknz->current_line += 1;
DBG("inc[%d] %d", toknz->cs, toknz->current_line);
}
break;
case 1:
#line 364 "lib/eolian/eo_lexer.rl"
{
toknz->saved.line = toknz->current_line;
DBG("save line[%d] %d", toknz->cs, toknz->current_line);
}
break;
case 2:
#line 369 "lib/eolian/eo_lexer.rl"
{
toknz->saved.tok = ( toknz->p);
DBG("save token[%d] %p %c", toknz->cs, ( toknz->p), *( toknz->p));
}
break;
case 3:
#line 446 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.accessor) ABORT(toknz, "No accessor!!!");
if (toknz->tmp.accessor->ret != NULL)
ABORT(toknz, "accessor has already a return type");
toknz->tmp.accessor->ret = _eo_tokenizer_return_get(toknz, ( toknz->p));
}
break;
case 4:
#line 453 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.accessor) ABORT(toknz, "No accessor!!!");
if (!toknz->tmp.accessor->ret) ABORT(toknz, "No ret!!!");
if (toknz->tmp.accessor->ret->comment != NULL)
ABORT(toknz, "accessor return type has already a comment");
toknz->tmp.accessor->ret->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-2);
INF(" %s", toknz->tmp.accessor->ret->comment);
}
break;
case 5:
#line 462 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.accessor) ABORT(toknz, "No accessor!!!");
toknz->tmp.accessor->legacy = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 6:
#line 476 "lib/eolian/eo_lexer.rl"
{
toknz->tmp.accessor_param = _eo_tokenizer_accessor_param_get(toknz, ( toknz->p));
}
break;
case 7:
#line 480 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.accessor_param)
ABORT(toknz, "No accessor param!!!");
toknz->tmp.accessor_param->attrs = _eo_tokenizer_token_get(toknz, ( toknz->p));
toknz->tmp.accessor->params =
eina_list_append(toknz->tmp.accessor->params, toknz->tmp.accessor_param);
toknz->tmp.accessor_param = NULL;
}
break;
case 8:
#line 509 "lib/eolian/eo_lexer.rl"
{
const char *c = _eo_tokenizer_token_get(toknz, ( toknz->p)-2);
if (toknz->tmp.param == NULL)
ABORT(toknz, "no parameter set to associate this comment to: %s", c);
toknz->tmp.param->comment = c;
toknz->tmp.param = NULL;
}
break;
case 9:
#line 517 "lib/eolian/eo_lexer.rl"
{
toknz->tmp.param = _eo_tokenizer_param_get(toknz, ( toknz->p));
if (toknz->tmp.params)
*(toknz->tmp.params) = eina_list_append(*(toknz->tmp.params), toknz->tmp.param);
else
ABORT(toknz, "got a param but there is no property nor method waiting for it");
INF(" %s : %s", toknz->tmp.param->name, toknz->tmp.param->type);
}
break;
case 10:
#line 617 "lib/eolian/eo_lexer.rl"
{
if (toknz->tmp.prop != NULL)
ABORT(toknz, "there is a pending property definition %s", toknz->tmp.prop->name);
toknz->tmp.prop = _eo_tokenizer_property_get(toknz, ( toknz->p));
}
break;
case 11:
#line 657 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
if (toknz->tmp.meth->ret != NULL)
ABORT(toknz, "method '%s' has already a return type", toknz->tmp.meth->name);
toknz->tmp.meth->ret = _eo_tokenizer_return_get(toknz, ( toknz->p));
}
break;
case 12:
#line 664 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
if (toknz->tmp.meth->ret != NULL) ABORT(toknz, "No ret!!!");
if (toknz->tmp.meth->ret->comment != NULL)
ABORT(toknz, "method '%s' return type has already a comment", toknz->tmp.meth->name);
toknz->tmp.meth->ret->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-2);
INF(" %s", toknz->tmp.meth->ret->comment);
}
break;
case 13:
#line 673 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
toknz->tmp.meth->legacy = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 14:
#line 678 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
toknz->tmp.meth->obj_const = EINA_TRUE;
INF(" obj const");
}
break;
case 15:
#line 740 "lib/eolian/eo_lexer.rl"
{
if (toknz->tmp.meth != NULL)
ABORT(toknz, "there is a pending method definition %s", toknz->tmp.meth->name);
toknz->tmp.meth = _eo_tokenizer_method_get(toknz, ( toknz->p));
}
break;
case 16:
#line 772 "lib/eolian/eo_lexer.rl"
{
const char *base = _eo_tokenizer_token_get(toknz, ( toknz->p));
toknz->tmp.str_items = eina_list_append(toknz->tmp.str_items, base);
}
break;
case 17:
#line 777 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
toknz->tmp.kls->inherits = toknz->tmp.str_items;
toknz->tmp.str_items = NULL;
}
break;
case 18:
#line 825 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
toknz->tmp.event = _eo_tokenizer_event_get(toknz, ( toknz->p));
toknz->tmp.kls->events = eina_list_append(toknz->tmp.kls->events, toknz->tmp.event);
}
break;
case 19:
#line 831 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.event) ABORT(toknz, "No event!!!");
if (toknz->tmp.event->type != NULL)
ABORT(toknz, "event %s has already a type %s", toknz->tmp.event->name, toknz->tmp.event->type);
toknz->tmp.event->type = _eo_tokenizer_token_get(toknz, ( toknz->p)-1);
}
break;
case 20:
#line 838 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.event) ABORT(toknz, "No event!!!");
if (toknz->tmp.event->comment != NULL)
ABORT(toknz, "event %s has already a comment", toknz->tmp.event->name);
toknz->tmp.event->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-2);
toknz->tmp.event = NULL;
}
break;
case 21:
#line 846 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
if (toknz->tmp.kls->legacy_prefix != NULL)
ABORT(toknz, "A legacy prefix has already been given");
toknz->tmp.kls->legacy_prefix = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 22:
#line 855 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
if (toknz->tmp.kls->eo_prefix != NULL)
ABORT(toknz, "An Eo prefix has already been given");
toknz->tmp.kls->eo_prefix = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 23:
#line 864 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
if (toknz->tmp.kls->data_type != NULL)
ABORT(toknz, "A data type has already been given");
toknz->tmp.kls->data_type = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 24:
#line 877 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
toknz->tmp.impl = _eo_tokenizer_implement_get(toknz, ( toknz->p));
toknz->tmp.kls->implements = eina_list_append(toknz->tmp.kls->implements, toknz->tmp.impl);
}
break;
case 25:
#line 883 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl) ABORT(toknz, "No implement!!!");
if (toknz->tmp.impl->legacy)
ABORT(toknz, "Legacy section already allocated for implement item");
toknz->tmp.impl->legacy = calloc(1, sizeof(Eo_Implement_Legacy_Def));
}
break;
case 26:
#line 890 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl) ABORT(toknz, "No implement!!!");
if (!toknz->tmp.impl->legacy)
ABORT(toknz, "No legacy section");
toknz->tmp.impl->legacy->function_name = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 27:
#line 897 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl) ABORT(toknz, "No implement!!!");
toknz->tmp.impl_leg_param = calloc(1, sizeof(Eo_Implement_Legacy_Param_Def));
toknz->tmp.impl->legacy->params = eina_list_append(
toknz->tmp.impl->legacy->params, toknz->tmp.impl_leg_param);
toknz->tmp.impl_leg_param->eo_name = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 28:
#line 906 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl_leg_param)
ABORT(toknz, "No implement legacy param!!!");
toknz->tmp.impl_leg_param->legacy_name = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 29:
#line 912 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl_leg_param)
ABORT(toknz, "No implement legacy param!!!");
toknz->tmp.impl_leg_param->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-2);
}
break;
case 30:
#line 918 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl) ABORT(toknz, "No implement!!!");
if (!toknz->tmp.impl->legacy)
ABORT(toknz, "No legacy section");
toknz->tmp.impl->legacy->ret_type= _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 31:
#line 925 "lib/eolian/eo_lexer.rl"
{
if (!toknz->tmp.impl) ABORT(toknz, "No implement!!!");
if (!toknz->tmp.impl->legacy)
ABORT(toknz, "No legacy section");
toknz->tmp.impl->legacy->ret_value = _eo_tokenizer_token_get(toknz, ( toknz->p));
}
break;
case 32:
#line 996 "lib/eolian/eo_lexer.rl"
{
toknz->tmp.kls_type = EOLIAN_CLASS_REGULAR;
}
break;
case 33:
#line 999 "lib/eolian/eo_lexer.rl"
{
toknz->tmp.kls_type = EOLIAN_CLASS_ABSTRACT;
}
break;
case 34:
#line 1002 "lib/eolian/eo_lexer.rl"
{
toknz->tmp.kls_type = EOLIAN_CLASS_MIXIN;
}
break;
case 35:
#line 1005 "lib/eolian/eo_lexer.rl"
{
toknz->tmp.kls_type = EOLIAN_CLASS_INTERFACE;
}
break;
case 36:
#line 1009 "lib/eolian/eo_lexer.rl"
{
if (toknz->tmp.kls != NULL)
ABORT(toknz, "there is a pending class definition %s", toknz->tmp.kls->name);
toknz->tmp.kls = _eo_tokenizer_class_get(toknz, ( toknz->p));
toknz->tmp.kls->type = toknz->tmp.kls_type;
}
break;
case 39:
#line 1 "NONE"
{ toknz->te = ( toknz->p)+1;}
break;
case 40:
#line 438 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.accessor) ABORT(toknz, "No accessor!!!");
if (toknz->tmp.accessor->comment != NULL)
ABORT(toknz, "accessor has already a comment");
toknz->tmp.accessor->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-1);
INF(" %s", toknz->tmp.accessor->comment);
}}
break;
case 41:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 42:
#line 501 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;}
break;
case 43:
#line 502 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;}
break;
case 44:
#line 467 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" }");
if (!toknz->tmp.prop) ABORT(toknz, "No prop!!!");
toknz->tmp.prop->accessors = eina_list_append(toknz->tmp.prop->accessors, toknz->tmp.accessor);
toknz->tmp.accessor = NULL;
toknz->current_nesting--;
{ toknz->cs = 315; goto _again;}
}}
break;
case 45:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 46:
#line 497 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 47:
#line 500 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 48:
#line 467 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
INF(" }");
if (!toknz->tmp.prop) ABORT(toknz, "No prop!!!");
toknz->tmp.prop->accessors = eina_list_append(toknz->tmp.prop->accessors, toknz->tmp.accessor);
toknz->tmp.accessor = NULL;
toknz->current_nesting--;
{ toknz->cs = 315; goto _again;}
}}
break;
case 49:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 50:
#line 500 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}}
break;
case 51:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 52:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 53:
#line 526 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" }");
toknz->tmp.param = NULL;
toknz->current_nesting--;
if (toknz->tmp.prop)
{ toknz->cs = 315; goto _again;}
else if (toknz->tmp.meth)
{ toknz->cs = 328; goto _again;}
else
ABORT(toknz, "leaving tokenize_params but there is no property nor method pending");
}}
break;
case 54:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 55:
#line 542 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 56:
#line 544 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 57:
#line 526 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
INF(" }");
toknz->tmp.param = NULL;
toknz->current_nesting--;
if (toknz->tmp.prop)
{ toknz->cs = 315; goto _again;}
else if (toknz->tmp.meth)
{ toknz->cs = 328; goto _again;}
else
ABORT(toknz, "leaving tokenize_params but there is no property nor method pending");
}}
break;
case 58:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 59:
#line 544 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}}
break;
case 60:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 61:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 62:
#line 551 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" get {");
toknz->tmp.accessor = _eo_tokenizer_accessor_get(toknz, GETTER);
toknz->current_nesting++;
{ toknz->cs = 299; goto _again;}
}}
break;
case 63:
#line 558 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" set {");
toknz->tmp.accessor = _eo_tokenizer_accessor_get(toknz, SETTER);
toknz->current_nesting++;
{ toknz->cs = 299; goto _again;}
}}
break;
case 64:
#line 565 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" keys {");
toknz->current_nesting++;
toknz->tmp.params = &(toknz->tmp.prop->keys);
{ toknz->cs = 308; goto _again;}
}}
break;
case 65:
#line 572 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" values {");
toknz->current_nesting++;
toknz->tmp.params = &(toknz->tmp.prop->values);
{ toknz->cs = 308; goto _again;}
}}
break;
case 66:
#line 579 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.prop) ABORT(toknz, "No property!!!");
if (eina_list_count(toknz->tmp.prop->values) == 0)
WRN("property '%s' has no values.", toknz->tmp.prop->name);
if (eina_list_count(toknz->tmp.prop->accessors) == 0)
WRN("property '%s' has no accessors.", toknz->tmp.prop->name);
INF(" }");
toknz->tmp.kls->properties = eina_list_append(toknz->tmp.kls->properties, toknz->tmp.prop);
toknz->tmp.prop = NULL;
toknz->current_nesting--;
{ toknz->cs = 323; goto _again;}
}}
break;
case 67:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 68:
#line 598 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 69:
#line 579 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
if (!toknz->tmp.prop) ABORT(toknz, "No property!!!");
if (eina_list_count(toknz->tmp.prop->values) == 0)
WRN("property '%s' has no values.", toknz->tmp.prop->name);
if (eina_list_count(toknz->tmp.prop->accessors) == 0)
WRN("property '%s' has no accessors.", toknz->tmp.prop->name);
INF(" }");
toknz->tmp.kls->properties = eina_list_append(toknz->tmp.kls->properties, toknz->tmp.prop);
toknz->tmp.prop = NULL;
toknz->current_nesting--;
{ toknz->cs = 323; goto _again;}
}}
break;
case 70:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 71:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 72:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 73:
#line 610 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.prop) ABORT(toknz, "No property!!!");
INF(" %s {", toknz->tmp.prop->name);
toknz->current_nesting++;
{ toknz->cs = 315; goto _again;}
}}
break;
case 74:
#line 623 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" }");
toknz->current_nesting--;
{ toknz->cs = 343; goto _again;}
}}
break;
case 75:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 76:
#line 632 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 77:
#line 623 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
INF(" }");
toknz->current_nesting--;
{ toknz->cs = 343; goto _again;}
}}
break;
case 78:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 79:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 80:
#line 641 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
if (toknz->tmp.meth->comment != NULL)
ABORT(toknz, "method has already a comment");
toknz->tmp.meth->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-1);
INF(" %s", toknz->tmp.meth->comment);
}}
break;
case 81:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 82:
#line 649 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
INF(" params {");
toknz->current_nesting++;
toknz->tmp.params = &(toknz->tmp.meth->params);
{ toknz->cs = 308; goto _again;}
}}
break;
case 83:
#line 725 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;}
break;
case 84:
#line 726 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;}
break;
case 85:
#line 684 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
Eina_List **l = NULL;
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
if (eina_list_count(toknz->tmp.meth->params) == 0)
WRN("method '%s' has no parameters.", toknz->tmp.meth->name);
INF(" }");
switch (toknz->current_methods_type) {
case METH_CONSTRUCTOR:
l = &toknz->tmp.kls->constructors;
break;
case METH_DESTRUCTOR:
l = &toknz->tmp.kls->destructors;
break;
case METH_REGULAR:
l = &toknz->tmp.kls->methods;
break;
default:
ABORT(toknz, "unknown method type %d", toknz->current_methods_type);
}
toknz->tmp.meth->type = toknz->current_methods_type;
*l = eina_list_append(*l, toknz->tmp.meth);
toknz->tmp.meth = NULL;
toknz->current_nesting--;
{ toknz->cs = 338; goto _again;}
}}
break;
case 86:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 87:
#line 720 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 88:
#line 724 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 89:
#line 684 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
Eina_List **l = NULL;
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
if (eina_list_count(toknz->tmp.meth->params) == 0)
WRN("method '%s' has no parameters.", toknz->tmp.meth->name);
INF(" }");
switch (toknz->current_methods_type) {
case METH_CONSTRUCTOR:
l = &toknz->tmp.kls->constructors;
break;
case METH_DESTRUCTOR:
l = &toknz->tmp.kls->destructors;
break;
case METH_REGULAR:
l = &toknz->tmp.kls->methods;
break;
default:
ABORT(toknz, "unknown method type %d", toknz->current_methods_type);
}
toknz->tmp.meth->type = toknz->current_methods_type;
*l = eina_list_append(*l, toknz->tmp.meth);
toknz->tmp.meth = NULL;
toknz->current_nesting--;
{ toknz->cs = 338; goto _again;}
}}
break;
case 90:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 91:
#line 724 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}}
break;
case 92:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 93:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 94:
#line 733 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
INF(" %s {", toknz->tmp.meth->name);
toknz->current_nesting++;
{ toknz->cs = 328; goto _again;}
}}
break;
case 95:
#line 746 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" }");
toknz->current_methods_type = METH_TYPE_LAST;
toknz->current_nesting--;
{ toknz->cs = 343; goto _again;}
}}
break;
case 96:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 97:
#line 756 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 98:
#line 746 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
INF(" }");
toknz->current_methods_type = METH_TYPE_LAST;
toknz->current_nesting--;
{ toknz->cs = 343; goto _again;}
}}
break;
case 99:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 100:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 101:
#line 765 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
if (toknz->tmp.kls->comment != NULL)
ABORT(toknz, "class %s has already a comment", toknz->tmp.kls->name);
toknz->tmp.kls->comment = _eo_tokenizer_token_get(toknz, ( toknz->p)-1);
}}
break;
case 102:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 103:
#line 783 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
}}
break;
case 104:
#line 786 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
}}
break;
case 105:
#line 789 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" constructors {");
toknz->current_methods_type = METH_CONSTRUCTOR;
toknz->current_nesting++;
{ toknz->cs = 338; goto _again;}
}}
break;
case 106:
#line 796 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" destructors {");
toknz->current_methods_type = METH_DESTRUCTOR;
toknz->current_nesting++;
{ toknz->cs = 338; goto _again;}
}}
break;
case 107:
#line 803 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" properties {");
toknz->current_nesting++;
{ toknz->cs = 323; goto _again;}
}}
break;
case 108:
#line 809 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
INF(" begin methods");
toknz->current_methods_type = METH_REGULAR;
toknz->current_nesting++;
{ toknz->cs = 338; goto _again;}
}}
break;
case 109:
#line 816 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
INF("end class: %s", toknz->tmp.kls->name);
toknz->classes = eina_list_append(toknz->classes, toknz->tmp.kls);
toknz->tmp.kls = NULL;
toknz->current_nesting--;
{ toknz->cs = 292; goto _again;}
}}
break;
case 110:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 111:
#line 971 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 112:
#line 974 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 113:
#line 975 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 114:
#line 976 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 115:
#line 783 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
}}
break;
case 116:
#line 786 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
}}
break;
case 117:
#line 816 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
INF("end class: %s", toknz->tmp.kls->name);
toknz->classes = eina_list_append(toknz->classes, toknz->tmp.kls);
toknz->tmp.kls = NULL;
toknz->current_nesting--;
{ toknz->cs = 292; goto _again;}
}}
break;
case 118:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 119:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 120:
#line 374 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("comment[%d] line%03d:%03d", toknz->cs,
toknz->saved.line, toknz->current_line);
}}
break;
case 121:
#line 989 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
if (!toknz->tmp.kls) ABORT(toknz, "No class!!!");
INF("begin class: %s", toknz->tmp.kls->name);
toknz->current_nesting++;
{ toknz->cs = 343; goto _again;}
}}
break;
case 122:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 123:
#line 1024 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;}
break;
case 124:
#line 383 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
case 125:
#line 383 "lib/eolian/eo_lexer.rl"
{{( toknz->p) = (( toknz->te))-1;}{
DBG("error[%d]", toknz->cs);
char *s, *d;
char buf[BUFSIZE];
for (s = ( toknz->p), d = buf; (s <= toknz->pe); s++)
{
if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
ERR("error n:%d l:%d c:'%c': %s",
toknz->current_nesting, toknz->current_line, *( toknz->p), buf);
toknz->cs = eo_tokenizer_error;
{( toknz->p)++; goto _out; } /* necessary to stop scanners */
}}
break;
#line 4116 "lib/eolian/eo_lexer.c"
}
}
_again:
_acts = _eo_tokenizer_actions + _eo_tokenizer_to_state_actions[ toknz->cs];
_nacts = (unsigned int) *_acts++;
while ( _nacts-- > 0 ) {
switch ( *_acts++ ) {
case 37:
#line 1 "NONE"
{ toknz->ts = 0;}
break;
#line 4129 "lib/eolian/eo_lexer.c"
}
}
if ( ++( toknz->p) != ( toknz->pe) )
goto _resume;
_test_eof: {}
if ( ( toknz->p) == ( toknz->eof) )
{
if ( _eo_tokenizer_eof_trans[ toknz->cs] > 0 ) {
_trans = _eo_tokenizer_eof_trans[ toknz->cs] - 1;
goto _eof_trans;
}
}
_out: {}
}
#line 1133 "lib/eolian/eo_lexer.rl"
if ( toknz->cs ==
#line 4150 "lib/eolian/eo_lexer.c"
-1
#line 1134 "lib/eolian/eo_lexer.rl"
)
{
ERR("%s: wrong termination", source);
ret = EINA_FALSE;
}
return ret;
}
Eo_Tokenizer*
eo_tokenizer_get(void)
{
Eo_Tokenizer *toknz = calloc(1, sizeof(Eo_Tokenizer));
if (!toknz) return NULL;
toknz->ts = NULL;
toknz->te = NULL;
/* toknz->top = 0; */
toknz->source = NULL;
toknz->max_nesting = 10;
toknz->current_line = 1;
toknz->current_nesting = 0;
toknz->current_methods_type = METH_TYPE_LAST;
toknz->saved.tok = NULL;
toknz->saved.line = 0;
toknz->classes = NULL;
return toknz;
}
static char *_accessor_type_str[ACCESSOR_TYPE_LAST] = { "setter", "getter" };
static char *_param_way_str[PARAM_WAY_LAST] = { "IN", "OUT", "INOUT" };
void
eo_tokenizer_dump(Eo_Tokenizer *toknz)
{
const char *s;
Eina_List *k, *l, *m;
Eo_Class_Def *kls;
Eo_Property_Def *prop;
Eo_Method_Def *meth;
Eo_Param_Def *param;
Eo_Accessor_Def *accessor;
Eo_Event_Def *sgn;
/* Eo_Ret_Def *ret; */
EINA_LIST_FOREACH(toknz->classes, k, kls)
{
printf("Class: %s (%s)\n",
kls->name, (kls->comment ? kls->comment : "-"));
printf(" inherits from :");
EINA_LIST_FOREACH(kls->inherits, l, s)
printf(" %s", s);
printf("\n");
printf(" implements:");
EINA_LIST_FOREACH(kls->implements, l, s)
printf(" %s", s);
printf("\n");
printf(" events:\n");
EINA_LIST_FOREACH(kls->events, l, sgn)
printf(" %s <%s> (%s)\n", sgn->name, sgn->type, sgn->comment);
EINA_LIST_FOREACH(kls->constructors, l, meth)
{
printf(" constructors: %s\n", meth->name);
if (meth->ret)
printf(" return: %s (%s)\n", meth->ret->type, meth->ret->comment);
printf(" legacy : %s\n", meth->legacy);
EINA_LIST_FOREACH(meth->params, m, param)
{
printf(" param: %s %s : %s (%s)\n",
_param_way_str[param->way], param->name,
param->type, param->comment);
}
}
EINA_LIST_FOREACH(kls->destructors, l, meth)
{
printf(" destructors: %s\n", meth->name);
if (meth->ret)
printf(" return: %s (%s)\n", meth->ret->type, meth->ret->comment);
printf(" legacy : %s\n", meth->legacy);
EINA_LIST_FOREACH(meth->params, m, param)
{
printf(" param: %s %s : %s (%s)\n",
_param_way_str[param->way], param->name,
param->type, param->comment);
}
}
EINA_LIST_FOREACH(kls->properties, l, prop)
{
printf(" property: %s\n", prop->name);
EINA_LIST_FOREACH(prop->keys, m, param)
{
printf(" key: %s : %s (%s)\n",
param->name, param->type, param->comment);
}
EINA_LIST_FOREACH(prop->values, m, param)
{
printf(" value: %s : %s (%s)\n",
param->name, param->type, param->comment);
}
EINA_LIST_FOREACH(prop->accessors, m, accessor)
{
printf(" accessor: %s : %s (%s)\n",
(accessor->ret?accessor->ret->type:""),
_accessor_type_str[accessor->type],
accessor->comment);
printf(" legacy : %s\n", accessor->legacy);
}
}
EINA_LIST_FOREACH(kls->methods, l, meth)
{
printf(" method: %s\n", meth->name);
if (meth->ret)
printf(" return: %s (%s)\n", meth->ret->type, meth->ret->comment);
printf(" legacy : %s\n", meth->legacy);
printf(" obj_const : %s\n", meth->obj_const?"true":"false");
EINA_LIST_FOREACH(meth->params, m, param)
{
printf(" param: %s %s : %s (%s)\n",
_param_way_str[param->way], param->name,
param->type, param->comment);
}
}
}
}
Eina_Bool
eo_tokenizer_database_fill(const char *filename)
{
Eina_Bool ret = EINA_FALSE;
const char *s;
Eina_List *k, *l, *m;
Eo_Class_Def *kls;
Eo_Property_Def *prop;
Eo_Method_Def *meth;
Eo_Param_Def *param;
Eo_Accessor_Def *accessor;
Eo_Event_Def *event;
Eo_Implement_Def *impl;
FILE *stream = NULL;
char *buffer = NULL;
Eo_Tokenizer *toknz = eo_tokenizer_get();
if (!toknz)
{
ERR("can't create eo_tokenizer");
goto end;
}
stream = fopen(filename, "rb");
if (!stream)
{
ERR("unable to read in %s", filename);
goto end;
}
buffer = malloc(BUFSIZE);
if (!buffer)
{
ERR("unable to allocate read buffer");
goto end;
}
unsigned int len = fread(buffer, 1, BUFSIZE, stream);
if (!len)
{
ERR("%s: is an empty file", filename);
goto end;
}
if (len == BUFSIZE)
{
ERR("%s: buffer(%d) is full, might not be big enough.", filename, len);
goto end;
}
if (!eo_tokenizer_mem_walk(toknz, filename, buffer, len)) goto end;
if (!toknz->classes)
{
ERR("No classes for file %s", filename);
goto end;
}
EINA_LIST_FOREACH(toknz->classes, k, kls)
{
database_class_add(kls->name, kls->type);
database_class_file_set(kls->name, filename);
if (kls->comment) database_class_description_set(kls->name, kls->comment);
EINA_LIST_FOREACH(kls->inherits, l, s)
database_class_inherit_add(kls->name, s);
if (kls->legacy_prefix)
{
database_class_legacy_prefix_set(kls->name, kls->legacy_prefix);
}
if (kls->eo_prefix)
{
database_class_eo_prefix_set(kls->name, kls->eo_prefix);
}
if (kls->data_type)
{
database_class_data_type_set(kls->name, kls->data_type);
}
EINA_LIST_FOREACH(kls->constructors, l, meth)
{
Eolian_Function foo_id = database_function_new(meth->name, EOLIAN_CTOR);
database_class_function_add(kls->name, foo_id);
if (meth->ret) database_function_return_comment_set(foo_id, EOLIAN_METHOD, meth->ret->comment);
database_function_data_set(foo_id, EOLIAN_LEGACY, meth->legacy);
EINA_LIST_FOREACH(meth->params, m, param)
{
database_method_parameter_add(foo_id, (Eolian_Parameter_Dir)param->way, param->type, param->name, param->comment);
}
}
EINA_LIST_FOREACH(kls->destructors, l, meth)
{
Eolian_Function foo_id = database_function_new(meth->name, EOLIAN_DTOR);
database_class_function_add(kls->name, foo_id);
if (meth->ret) database_function_return_comment_set(foo_id, EOLIAN_METHOD, meth->ret->comment);
database_function_data_set(foo_id, EOLIAN_LEGACY, meth->legacy);
EINA_LIST_FOREACH(meth->params, m, param)
{
database_method_parameter_add(foo_id, (Eolian_Parameter_Dir)param->way, param->type, param->name, param->comment);
}
}
EINA_LIST_FOREACH(kls->properties, l, prop)
{
Eolian_Function foo_id = database_function_new(prop->name, EOLIAN_UNRESOLVED);
EINA_LIST_FOREACH(prop->keys, m, param)
{
Eolian_Function_Parameter p = database_property_key_add(
foo_id, param->type, param->name, param->comment);
database_parameter_nonull_set(p, param->nonull);
database_parameter_own_set(p, param->own);
}
EINA_LIST_FOREACH(prop->values, m, param)
{
Eolian_Function_Parameter p = database_property_value_add(
foo_id, param->type, param->name, param->comment);
database_parameter_nonull_set(p, param->nonull);
database_parameter_own_set(p, param->own);
}
EINA_LIST_FOREACH(prop->accessors, m, accessor)
{
database_function_type_set(foo_id, (accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET));
if (accessor->ret && accessor->ret->type)
{
Eolian_Function_Type ftype =
accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET;
database_function_return_type_set(foo_id,
ftype, accessor->ret->type);
database_function_return_comment_set(foo_id,
ftype, accessor->ret->comment);
database_function_return_flag_set_as_warn_unused(foo_id,
ftype, accessor->ret->warn_unused);
database_function_return_flag_set_own(foo_id,
ftype, accessor->ret->own);
database_function_return_dflt_val_set(foo_id,
ftype, accessor->ret->dflt_ret_val);
}
if (accessor->legacy)
{
database_function_data_set(foo_id,
(accessor->type == SETTER?EOLIAN_LEGACY_SET:EOLIAN_LEGACY_GET),
accessor->legacy);
}
database_function_description_set(foo_id,
(accessor->type == SETTER?EOLIAN_COMMENT_SET:EOLIAN_COMMENT_GET),
accessor->comment);
Eo_Accessor_Param *acc_param;
Eina_List *m2;
EINA_LIST_FOREACH(accessor->params, m2, acc_param)
{
Eolian_Function_Parameter desc = eolian_function_parameter_get(foo_id, acc_param->name);
if (!desc)
{
printf("Error - %s not known as parameter of property %s\n", acc_param->name, prop->name);
}
else
if (strstr(acc_param->attrs, "const"))
{
database_parameter_const_attribute_set(desc, accessor->type == GETTER, EINA_TRUE);
}
}
}
database_class_function_add(kls->name, foo_id);
}
EINA_LIST_FOREACH(kls->methods, l, meth)
{
Eolian_Function foo_id = database_function_new(meth->name, EOLIAN_METHOD);
database_class_function_add(kls->name, foo_id);
if (meth->ret)
{
database_function_return_type_set(foo_id, EOLIAN_METHOD, meth->ret->type);
database_function_return_comment_set(foo_id, EOLIAN_METHOD, meth->ret->comment);
database_function_return_flag_set_as_warn_unused(foo_id,
EOLIAN_METHOD, meth->ret->warn_unused);
database_function_return_flag_set_own(foo_id, EOLIAN_METHOD, meth->ret->own);
database_function_return_dflt_val_set(foo_id,
EOLIAN_METHOD, meth->ret->dflt_ret_val);
}
database_function_description_set(foo_id, EOLIAN_COMMENT, meth->comment);
database_function_data_set(foo_id, EOLIAN_LEGACY, meth->legacy);
database_function_object_set_as_const(foo_id, meth->obj_const);
EINA_LIST_FOREACH(meth->params, m, param)
{
Eolian_Function_Parameter p = database_method_parameter_add(foo_id,
(Eolian_Parameter_Dir)param->way, param->type, param->name, param->comment);
database_parameter_nonull_set(p, param->nonull);
database_parameter_own_set(p, param->own);
}
}
EINA_LIST_FOREACH(kls->implements, l, impl)
{
const char *class = impl->meth_name;
Eina_Bool virtual_pure = EINA_FALSE;
if (!strcmp(class, "class::constructor"))
{
database_class_ctor_enable_set(kls->name, EINA_TRUE);
continue;
}
if (!strcmp(class, "class::destructor"))
{
database_class_dtor_enable_set(kls->name, EINA_TRUE);
continue;
}
if (!strncmp(class, "virtual::", 9)) virtual_pure = EINA_TRUE;
char *func = strstr(class, "::");
if (func) *func = '\0';
func += 2;
Eolian_Function_Type ftype = EOLIAN_UNRESOLVED;
char *type_as_str = strstr(func, "::");
if (type_as_str)
{
*type_as_str = '\0';
if (!strcmp(type_as_str+2, "set")) ftype = EOLIAN_PROP_SET;
else if (!strcmp(type_as_str+2, "get")) ftype = EOLIAN_PROP_GET;
}
if (virtual_pure)
{
/* Search the function into the existing functions of the current class */
Eolian_Function foo_id = eolian_class_function_find_by_name(
kls->name, func, ftype);
if (!foo_id)
{
ERR("Error - %s not known in class %s", class + 9, kls->name);
goto end;
}
database_function_set_as_virtual_pure(foo_id, ftype);
continue;
}
Eolian_Implement impl_desc = database_implement_new(class, func, ftype);
if (impl->legacy)
{
Eo_Implement_Legacy_Def *eo_leg = impl->legacy;
Eolian_Implement_Legacy leg = database_implement_legacy_add(
impl_desc, eo_leg->function_name);
database_implement_legacy_return_add(leg, eo_leg->ret_type, eo_leg->ret_value);
if (eo_leg->params)
{
Eina_List *itr;
Eo_Implement_Legacy_Param_Def *p;
EINA_LIST_FOREACH(eo_leg->params, itr, p)
database_implement_legacy_param_add(leg, p->eo_name,
p->legacy_name, p->comment);
}
}
database_class_implement_add(kls->name, impl_desc);
}
EINA_LIST_FOREACH(kls->events, l, event)
{
Eolian_Event ev = database_event_new(event->name, event->type, event->comment);
database_class_event_add(kls->name, ev);
}
}
ret = EINA_TRUE;
end:
if (buffer) free(buffer);
if (stream) fclose(stream);
if (toknz) eo_tokenizer_free(toknz);
return ret;
}
void
eo_tokenizer_free(Eo_Tokenizer *toknz)
{
Eo_Class_Def *kls;
if (toknz->source)
eina_stringshare_del(toknz->source);
EINA_LIST_FREE(toknz->classes, kls)
eo_definitions_class_def_free(kls);
free(toknz);
}