lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix 380: Try to auto-detect cyclic references in header fields (issu


From: reinhold . kainhofer
Subject: Re: Fix 380: Try to auto-detect cyclic references in header fields (issue 4951073)
Date: Wed, 14 Sep 2011 23:28:09 +0000

On 2011/09/13 18:53:55, hanwenn wrote:
have you thought of fixing this generically instead?

You could the hare/tortoise algorithm to detect cycles in any markup,
and could
run that on the entry point (not the recursive function) for
evaluating markups
to stencils.

Actually, I fail to see how I can use the algorithm to detect cycles in
markups. First, a markup is a tree and a recursive function rather tan a
chained function application, so the algorithm would have to run on each
branch. And second, the markup => stencil conversion is done in
Text_interface::interpret_markup by simply calling the first markup
function, which then recursively evaluates all its subexpressions.
We never actually get the intermediate values to run the algorithm. We
can only get the intermediate values by evaluating the markup, but then
we are already inside the loop.




http://codereview.appspot.com/4951073/



reply via email to

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