While left recursion is preferable to avoid high stack consumption, is it 
theoretically possible to convert every right recursive grammar to left 
recursive including mutually right recursive?

Sent from my iPhone

> On 08-Sep-2018, at 5:42 PM, Akim Demaille <a...@lrde.epita.fr> wrote:
> 
> 
> 
>> Le 8 sept. 2018 à 09:14, Akim Demaille <a...@lrde.epita.fr> a écrit :
>> 
>> 
>> 
>>> Le 7 sept. 2018 à 08:13, Anand Akhare <anan.akh...@gmail.com> a écrit :
>>> 
>>> Hi help-bison,
>>>    stack memory is allocated with size YYMAXDEPTH * sizeof(GLRStackItem)
>>> and YYMAXDEPTH defaults is 10000.
>>>  Does this reflect as maximum number of tokens which means maximum
>>> number of tokens that can be shifted is 10000 without reducing(likely to
>>> happen in right recursion)?
>> 
>> Nope, that’s the LR stack, and the LR stack is composed of both tokens
>> _and_ non terminal symbols.  That’s really the set of symbols
>> (terminal or not) that have been shifted, and waiting to be part
> 
> (I shouldn’t have said ’shifted’ here, I should have written ‘pushed’)
> 
>> of a reduction.
>> _______________________________________________
>> help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison
> 

_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to