Your message dated Fri, 07 Mar 2008 17:26:04 +0100
with message-id <[EMAIL PROTECTED]>
and subject line Re: Bug#469862: 'no input grammar'
has caused the Debian Bug report #469862,
regarding 'no input grammar'
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
469862: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=469862
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: bison++
Version: 1.21.11-3

hi!

bison-call simply fails. i have to admit, i don't know much about bison. i checked the input file and to me it looks good. i then tried bison-1:2.3.dfsg-5, which worked.

the grammar input file is (from iproute-2.6.20-070313):
----- snip -----
%{
 #include <stdio.h>
 #include <stdlib.h>
 #include <malloc.h>
 #include <string.h>
 #include "m_ematch.h"
%}

%locations
%token-table
%error-verbose
%name-prefix="ematch_"

%union {
        unsigned int i;
        struct bstr *b;
        struct ematch *e;
}

%{
 extern int ematch_lex(void);
 extern void yyerror(char *s);
 extern struct ematch *ematch_root;
 extern char *ematch_err;
%}

%token <i> ERROR
%token <b> ATTRIBUTE
%token <i> AND OR NOT
%type <i> invert relation
%type <e> match expr
%type <b> args
%right AND OR
%start input
%%
input:
        /* empty */
        | expr
                { ematch_root = $1; }
        | expr error
                {
                        ematch_root = $1;
                        YYACCEPT;
                }
        ;

expr:
        match
                { $$ = $1; }
        | match relation expr
                {
                        $1->relation = $2;
                        $1->next = $3;
                        $$ = $1;
                }
        ;

match:
        invert ATTRIBUTE '(' args ')'
                {
                        $2->next = $4;
                        $$ = new_ematch($2, $1);
                        if ($$ == NULL)
                                YYABORT;
                }
        | invert '(' expr ')'
                {
                        $$ = new_ematch(NULL, $1);
                        if ($$ == NULL)
                                YYABORT;
                        $$->child = $3;
                }
        ;

args:
        ATTRIBUTE
                { $$ = $1; }
        | ATTRIBUTE args
                { $1->next = $2; }
        ;

relation:
        AND
                { $$ = TCF_EM_REL_AND; }
        | OR
                { $$ = TCF_EM_REL_OR; }
        ;

invert:
        /* empty */
                { $$ = 0; }
        | NOT
                { $$ = 1; }
        ;
%%

 void yyerror(char *s)
 {
         ematch_err = strdup(s);
 }
----- snap -----

the bison call is:
bison -d -t -v -o emp_ematch.yacc.c emp_ematch.y

distribution is: debian lenny x86_64

        Chris



--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
> Package: bison++
> Version: 1.21.11-3
>
> hi!
>
> bison-call simply fails. i have to admit, i don't know much about
> bison. i checked the input file and to me it looks good. i then tried
> bison-1:2.3.dfsg-5, which worked.
Bison++ is not meant to be a drop-in replacement for bison.
It indeed is, for bison v1.19., but only incidentally.

I assume bison has evolved, allowing this grammar. Bison++ is there for
compatibility only, right now.


Regards,


--- End Message ---

Reply via email to