- Added some tokens for future usage: 'function', 'hashfunction',
'knows', 'trusted'.
This commit is contained in:
parent
8b30526a57
commit
baf1856943
10
src/parser.y
10
src/parser.y
@ -32,6 +32,10 @@ int yylex(void);
|
|||||||
%token UNTRUSTED
|
%token UNTRUSTED
|
||||||
%token USERTYPE
|
%token USERTYPE
|
||||||
%token SINGULAR
|
%token SINGULAR
|
||||||
|
%token FUNCTION
|
||||||
|
%token HASHFUNCTION
|
||||||
|
%token KNOWS
|
||||||
|
%token TRUSTED
|
||||||
|
|
||||||
%type <tac> spdlcomplete
|
%type <tac> spdlcomplete
|
||||||
%type <tac> spdlrep
|
%type <tac> spdlrep
|
||||||
@ -286,11 +290,11 @@ key : term
|
|||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
// error handler routing
|
//! error handler routing
|
||||||
int yyerror(char *s)
|
int yyerror(char *s)
|
||||||
{
|
{
|
||||||
extern int yylineno; // defined and maintained in lex.c
|
extern int yylineno; //!< defined and maintained in lex.c
|
||||||
extern char *yytext; // defined and maintained in lex.c
|
extern char *yytext; //!< defined and maintained in lex.c
|
||||||
|
|
||||||
error ("%s at symbol '%s' on line %i.\n", s, yytext, yylineno);
|
error ("%s at symbol '%s' on line %i.\n", s, yytext, yylineno);
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,10 @@ untrusted { return UNTRUSTED; }
|
|||||||
compromised { return COMPROMISED; }
|
compromised { return COMPROMISED; }
|
||||||
usertype { return USERTYPE; }
|
usertype { return USERTYPE; }
|
||||||
singular { return SINGULAR; }
|
singular { return SINGULAR; }
|
||||||
|
function { return FUNCTION; }
|
||||||
|
hashfunction { return HASHFUNCTION; }
|
||||||
|
knows { return KNOWS; }
|
||||||
|
trusted { return TRUSTED; }
|
||||||
{id} {
|
{id} {
|
||||||
yylval.symb = mkstring(yytext);
|
yylval.symb = mkstring(yytext);
|
||||||
return ID;
|
return ID;
|
||||||
|
Loading…
Reference in New Issue
Block a user