Hi Anand,

right, please also have a look at the manual on YYMAXDEPTH[1].

And "you should always use left recursion, because it can parse a
sequence of any number of elements with bounded stack space."[2]

(Sure, when implementing "calculators", using right recursion may make
your life easier with right-associative operators.)

Yours,
Alex

[1]
http://www.gnu.org/software/bison/manual/html_node/Memory-Management.html
[2]
http://www.gnu.org/software/bison/manual/html_node/Recursion.html#Recursion

On 07.09.2018 08:13, Anand Akhare wrote:
> 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)?
> 
> Regards,
> Anand
> _______________________________________________
> 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