[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Useless nonterminals - what and why?
From: |
Hans Aberg |
Subject: |
Re: Useless nonterminals - what and why? |
Date: |
Tue, 21 Nov 2000 14:44:05 +0100 |
At 10:40 +0100 0-11-21, Akim Demaille wrote:
>BTW, I just discovered a feature I was unaware of, which is related to
>the diagnostic you gave on this grammar:
..
>%token element
>%nterm list
>%%
>list : list element {}
>/tmp % LC_ALL=C bis list.y
>list.y contains 1 useless nonterminal and 1 useless rule
>list.y:5: fatal error: Start symbol list does not derive any sentence
>
>
>/tmp % cat list.y
>%token element
>%nterm list
>%%
>list : list element {} | element {}
I gather it is the %nterm declaration, which appears to be undocumented.
Do you know exactly what it means (that is, what is required for Bison to
not complain on such a %nterm declared variable)?
Hans Aberg
Re: Useless nonterminals - what and why?, Akim Demaille, 2000/11/21