help-bison
[Top][All Lists]
Advanced

[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 10:23:36 +0100

|Please keep the cc to the help-bison, so others may help.]
At 09.57 +1100 0-11-21, Matthew Palmer wrote:
>> Think of the rule as written (as when debugging is turned on)
>>   http_proxy_list <- http_proxy_list http_proxy
...
>> there is not any other rule for finding a http_proxy_list, so you can
>> never find the RHS http_proxy_list.
>
>Aha, is that how it works?  Funny, the bison manual never mentioned anything
>of that sort, and it recommended using this sort of recursion to prevent
>huge stack blowouts.

Which quote in the Bison manual do you have in your mind?

-- There is not anything wrong with the relation itself, but it needs an
additional startup relation.

>> Note that you forgot terminate the rules with ";" in the original post.
>> Have you done it now?
>
>I'm not sure (haven't got the code with me ATM), but I don't think any of
>the rules are terminated by a semi-colon, and it works just fine.  I may be
>wrong on that, as I didn't take a huge pile of notice.

It looks wrong to me -- perhaps Bison substitutes an empty relation, making
your code work or something.

Akim: Is this a Bison bug (handling of excluded ";") or something?

  Hans Aberg





reply via email to

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