Beispiel #1
0
void
Grammar::process( void )
{
	RuleTable::get()->findPrecedences();

	/// Compute the lambda-nonterminals and the first-sets for every
    /// nonterminal
	findFirstSets();

	// Compute all LR(0) states.  Also record follow-set propagation
	// links so that the follow-set can be computed later
	findStates();

	// Tie up loose ends on the propagation links
	findLinks();

	// Compute the follow set of every reducible configuration
	findFollowSets();

	// Compute the action tables
	findActions();

	// Compress the action tables
	if ( isCompressActions() )
		compressTables();

	// Generate a report of the parser generated.  (the "y.output" file) */
	if ( ! isQuiet() )
		reportOutput();

	// Generate the source code for the parser
	outputFiles();
}
Beispiel #2
0
void MC2Switch::getText( WString& str, WVList* states, SwMode mode )
{
    bool state = _state[mode];
    WVList found;
    findStates( states, found );
    int icount = found.count();
    for( int i=0; i<icount; i++ ) {
        MCState* st = (MCState*)found[i];
        if( st->mode() == mode ) {
            state = st->state();
        }
    }
    addone( str, state );
}
Beispiel #3
0
TPersistentStateMap CWebUser::saveIdentityStates()
{
	return findStates(STATES_VAR);
}