5
static char linebuf[2][255];
6
static unsigned int lno = 0;
9
unsigned long policydb_lineno = 1;
11
unsigned int policydb_errors = 0;
18
\n.* { strncpy(linebuf[lno], yytext+1, 255);
19
linebuf[lno][254] = 0;
24
roles { return(ROLES); }
26
ranges { return(RANGES); }
28
user { return(USER); }
29
{letter}({letter}|{digit}|_)* { return(IDENTIFIER); }
30
{letter}({letter}|{digit}|_|"."|"-")* { return(USER_IDENTIFIER); }
31
#[^\n]* { /* delete comments */ }
32
[ \t\f]+ { /* delete whitespace */ }
38
"*" { return(yytext[0]); }
39
. { yywarn("unrecognized character");}
41
int yyerror(char *msg)
43
fprintf(stderr, "ERROR '%s' at token '%s' on line %ld:\n%s\n%s\n",
47
linebuf[0], linebuf[1]);
54
fprintf(stderr, "WARNING '%s' at token '%s' on line %ld:\n%s\n%s\n",
58
linebuf[0], linebuf[1]);