summaryrefslogtreecommitdiff
path: root/i/marvin/src/parser/yyparser.yy
diff options
context:
space:
mode:
authorschodet2006-05-20 18:33:47 +0000
committerschodet2006-05-20 18:33:47 +0000
commitfc17c7e3e927cbe6fad7b90c323c1851621c5d74 (patch)
tree10d098788c8462a2452bb01ab4e28e6afeaeea9f /i/marvin/src/parser/yyparser.yy
parentb03ba3b9588962971a15b38b4c9cbaef864decfa (diff)
Ajout du support des char.
Diffstat (limited to 'i/marvin/src/parser/yyparser.yy')
-rw-r--r--i/marvin/src/parser/yyparser.yy12
1 files changed, 12 insertions, 0 deletions
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<b> BOOLEAN
%token<c> UNKNOWN
+%token<c> CHAR
%token<i> INT
%token<d> DOUBLE
%token<s> 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 ());