summaryrefslogtreecommitdiffstats
path: root/eBones/compile_et/et_lex.lex.l
blob: c04181937599704cff734b8079a510fc6ebd5c45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
%{
extern int yylineno;
int yylineno = 1;
%}

PC	[^\"\n]
AN	[A-Z_a-z0-9]
%%

error_table	return ERROR_TABLE;
et		return ERROR_TABLE;
error_code	return ERROR_CODE_ENTRY;
ec		return ERROR_CODE_ENTRY;
end		return END;

[\t ]+			;
\n		++yylineno;

\"{PC}*\"	{ register char *p; yylval.dynstr = ds(yytext+1);
		  if (p=rindex(yylval.dynstr, '"')) *p='\0';
		  return QUOTED_STRING;
		}

{AN}*	{ yylval.dynstr = ds(yytext); return STRING; }

#.*\n		++yylineno;

.		{ return (*yytext); }
%%
OpenPOWER on IntegriCloud