From baf1856943f83354dda04d53cd84876d9f05cba3 Mon Sep 17 00:00:00 2001 From: ccremers Date: Mon, 9 Jan 2006 09:38:17 +0000 Subject: [PATCH] - Added some tokens for future usage: 'function', 'hashfunction', 'knows', 'trusted'. --- src/parser.y | 10 +++++++--- src/scanner.l | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/parser.y b/src/parser.y index db82a17..63e4029 100644 --- a/src/parser.y +++ b/src/parser.y @@ -32,6 +32,10 @@ int yylex(void); %token UNTRUSTED %token USERTYPE %token SINGULAR +%token FUNCTION +%token HASHFUNCTION +%token KNOWS +%token TRUSTED %type spdlcomplete %type spdlrep @@ -286,11 +290,11 @@ key : term %% -// error handler routing +//! error handler routing int yyerror(char *s) { - extern int yylineno; // defined and maintained in lex.c - extern char *yytext; // defined and maintained in lex.c + extern int yylineno; //!< 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); } diff --git a/src/scanner.l b/src/scanner.l index 3d51e4d..840952f 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -95,6 +95,10 @@ untrusted { return UNTRUSTED; } compromised { return COMPROMISED; } usertype { return USERTYPE; } singular { return SINGULAR; } +function { return FUNCTION; } +hashfunction { return HASHFUNCTION; } +knows { return KNOWS; } +trusted { return TRUSTED; } {id} { yylval.symb = mkstring(yytext); return ID;