aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-12-15 16:50:22 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-12-15 16:50:22 +0200
commit48e3e7d108541fc2612bab8081d4871398429cc3 (patch)
tree5ba9fdfc92f633ba587026c969f589d8aca9ae0b
parentf7df08999c5899f0aa5fa51d62f4a5eefe38da80 (diff)
downloadpies-48e3e7d108541fc2612bab8081d4871398429cc3.tar.gz
pies-48e3e7d108541fc2612bab8081d4871398429cc3.tar.bz2
Handle multiple MeTA1 servers.
* src/meta1gram.y: Handle multiple MeTA1 servers with different tags.
-rw-r--r--src/meta1gram.y7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/meta1gram.y b/src/meta1gram.y
index 31cb021..3886b4c 100644
--- a/src/meta1gram.y
+++ b/src/meta1gram.y
@@ -94,7 +94,7 @@ static void meta1_translate (struct meta1_stmt *);
%token <string> META1_IDENT META1_STRING META1_NUMBER
%type <list> slist values list
%type <value> value
-%type <string> string ident
+%type <string> string ident tag
%type <stmt> stmtlist stmt simple block
%%
@@ -130,12 +130,15 @@ simple : ident '=' value opt_sc
block : ident tag '{' stmtlist '}' opt_sc
{
- $$ = meta1_stmt_create (meta1_block, $1);
+ $$ = meta1_stmt_create (meta1_block, $2 ? $2 : $1);
$$->v.list = reverse ($4);
}
;
tag : /* empty */
+ {
+ $$ = NULL;
+ }
| META1_IDENT
;

Return to:

Send suggestions and report system problems to the System administrator.