[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: |
Sat, 18 Nov 2000 21:26:03 +0100 |
At 01.11 +1100 0-11-19, Matthew Palmer wrote:
>OK, hacking on somebody else's bison file, and I have gotten this message.
>Not real sure exactly what it means, beyond a definition somebody gave that
>"A useless nonterminal is one which doesn't produce any strings" or similar.
>
>I will admit that I am an absolute newbie on matters of Bison and parsers
>and grammars and all the rest of this stuff.
I can just make a quick guess until you get a reply from the real
experts... :-)
>http_proxy_list: http_proxy_list http_proxy { ... }
But it seems me if you just have such a rule and nothing else, you have
nothing to start up the pattern <http_proxy_list>: Think of it as a loop
which needs some kind of initialization. It could be the empty string
http_proxy_list: http_proxy_list http_proxy { ... }
| { ... }
or the well known <foo_bar> variable
http_proxy_list: http_proxy_list http_proxy { ... }
| foo_bar { ... }
Hans Aberg
Re: Useless nonterminals - what and why?, Akim Demaille, 2000/11/21