lib/ParserGenerator/PHP/ParserGenerator/Data.php
function FindFollowSets()
    {
        for ($i = 0; $i < $this->nstate; $i++) {
            for ($cfp = $this->sorted[$i]->data->cfp; $cfp; $cfp = $cfp->next) {
                $cfp->status = PHP_ParserGenerator_Config::INCOMPLETE;
            }
        }
        
        do {
            $progress = 0;
            for ($i = 0; $i < $this->nstate; $i++) {
                for ($cfp = $this->sorted[$i]->data->cfp; $cfp; $cfp = $cfp->next) {
                    if ($cfp->status == PHP_ParserGenerator_Config::COMPLETE) {
                        continue;
                    }
                    for ($plp = $cfp->fplp; $plp; $plp = $plp->next) {
                        $a = array_diff_key($cfp->fws, $plp->cfp->fws);
                        if (count($a)) {
                            $plp->cfp->fws += $a;
                            $plp->cfp->status = PHP_ParserGenerator_Config::INCOMPLETE;
                            $progress = 1;
                        }
                    }
                    $cfp->status = PHP_ParserGenerator_Config::COMPLETE;
                }
            }
        } while ($progress);
    }
function FindFollowSets()
    {
        for ($i = 0; $i < $this->nstate; $i++) {
            for ($cfp = $this->sorted[$i]->data->cfp; $cfp; $cfp = $cfp->next) {
                $cfp->status = PHP_ParserGenerator_Config::INCOMPLETE;
            }
        }
        
        do {
            $progress = 0;
            for ($i = 0; $i < $this->nstate; $i++) {
                for ($cfp = $this->sorted[$i]->data->cfp; $cfp; $cfp = $cfp->next) {
                    if ($cfp->status == PHP_ParserGenerator_Config::COMPLETE) {
                        continue;
                    }
                    for ($plp = $cfp->fplp; $plp; $plp = $plp->next) {
                        $a = array_diff_key($cfp->fws, $plp->cfp->fws);
                        if (count($a)) {
                            $plp->cfp->fws += $a;
                            $plp->cfp->status = PHP_ParserGenerator_Config::INCOMPLETE;
                            $progress = 1;
                        }
                    }
                    $cfp->status = PHP_ParserGenerator_Config::COMPLETE;
                }
            }
        } while ($progress);
    }
function FindFollowSets ( ) { for ( $ i = 0 ; $ i < $ this -> nstate ; $ i ++ ) { for ( $ cfp = $ this -> sorted [ $ i ] -> data -> cfp ; $ cfp ; $ cfp = $ cfp -> next ) { $ cfp -> status = PHP_ParserGenerator_Config :: INCOMPLETE ; } } do { $ progress = 0 ; for ( $ i = 0 ; $ i < $ this -> nstate ; $ i ++ ) { for ( $ cfp = $ this -> sorted [ $ i ] -> data -> cfp ; $ cfp ; $ cfp = $ cfp -> next ) { if ( $ cfp -> status == PHP_ParserGenerator_Config :: COMPLETE ) { continue ; } for ( $ plp = $ cfp -> fplp ; $ plp ; $ plp = $ plp -> next ) { $ a = array_diff_key ( $ cfp -> fws , $ plp -> cfp -> fws ) ; if ( count ( $ a ) ) { $ plp -> cfp -> fws += $ a ; $ plp -> cfp -> status = PHP_ParserGenerator_Config :: INCOMPLETE ; $ progress = 1 ; } } $ cfp -> status = PHP_ParserGenerator_Config :: COMPLETE ; } } } while ( $ progress ) ; }
Compute all followsets.

A followset is the set of all symbols which can come immediately
after a configuration.
Compute all followsets .