From fc17c7e3e927cbe6fad7b90c323c1851621c5d74 Mon Sep 17 00:00:00 2001 From: schodet Date: Sat, 20 May 2006 18:33:47 +0000 Subject: Ajout du support des char. --- i/marvin/src/parser/yyparser.yy | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'i/marvin/src/parser/yyparser.yy') diff --git a/i/marvin/src/parser/yyparser.yy b/i/marvin/src/parser/yyparser.yy index e965ffd..99d130a 100644 --- a/i/marvin/src/parser/yyparser.yy +++ b/i/marvin/src/parser/yyparser.yy @@ -65,6 +65,7 @@ void yyerror (void *scanner, const char *e); %token BOOLEAN %token UNKNOWN +%token CHAR %token INT %token DOUBLE %token ID STRING @@ -96,6 +97,12 @@ item: YYERROR; delete $1; } + | ID '=' CHAR { + any a ($3); + if (!yyextra->assign (*$1, a)) + YYERROR; + delete $1; + } | ID '=' INT { any a ($3); if (!yyextra->assign (*$1, a)) @@ -206,6 +213,11 @@ arg_list: $1->push_back (any ()); $1->back ().swap (a); } + | arg_list CHAR { + any a ($2); + $1->push_back (any ()); + $1->back ().swap (a); + } | arg_list INT { any a ($2); $1->push_back (any ()); -- cgit v1.2.3