Re: i don't know lalr's c2ompute_FOLLOWS() in bison1.24

2008-12-01 Thread Hans Aberg
On 1 Dec 2008, at 13:30, 山东 wrote: ... I think it just uses the standard method as described in books like Aho, Sethi & Ullman, "Compilers..." (the "Dragon book"), an iteration until it stops. There is a more efficient method using Tarjan's SCC algorithm - search the archives for the Use

i don't know lalr's c2ompute_FOLLOWS() in bison1.24

2008-12-01 Thread 山东
c2ompute_FOLLOWS() { register int i; digraph(includes); for (i = 0; i < ngotos; i++) { if (includes[i]) FREE(includes[i]); } FREE(includes); } digraph(relation) short **relation; { register int i; infinity = ngotos + 2; INDEX = NEW2(ngotos + 1, short); VERTICES =