help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

optional nonterminal symbols


From: Arkadius Nowakowski
Subject: optional nonterminal symbols
Date: Mon, 21 Nov 2005 12:49:50 +0100
User-agent: Mutt/1.3.28i

Hi,

I've got a gramar like this:

%{
%}

%start start

%token START END TAG1_1 TAG1_2 TAG2

%%

start: START tag1 END
        | START tag1 tag2 END
;

tag1: tag1_1 {}
        | tag1_1 tag1_2 {}
;

tag1_1: TAG1_1 {}
;

tag1_2: /*empty*/ {}
        | TAG1_2 {}
;

tag2: TAG2 {}
;

%%

As you can see, the nonterminal symbols "tag2" and the sub symbol
"tag1_2" are optional. Of course bison tells me, that there is a 
reduce/reduce conflict. Is there a way to change the bison source
achieving the same goal?

Thx for any hint!

Best Regards.

-- 

Arkadius Nowakowski

email  : address@hidden
gnupg  : http://www.fh-augsburg.de/~nowarek/anowa.gpg
icq#   : 107518121 
jabber : address@hidden                         -o)
msn    : address@hidden                        /\\
                                                 _\_V
Message void if penguin violated ...  Don't mess with the penguin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]