protected void InitSymbolTypeLib()
{
Symbol tokenID;
// find a default text for all Symbol Types in library
// scan through all the rules and initialize TypeLib with index to text and index to rules for non-terminal tokens
for ( int i = 0; i < rulePathLibCount; i++ )
{
tokenID = rootRulePath[ i ].tokenID;
Debug.Assert( symbolTypeLib[ (int)tokenID ].ID == tokenID );
switch ( rootRulePath[ i ].operation )
{
case OperationType.Rule:
// if operation is a rule then update typelib
symbolTypeLib[ (int)tokenID ].ruleID = i;
break;
case OperationType.And:
case OperationType.Or:
case OperationType.Optional:
if ( rootRulePath[ i ].symbol != null )
{
symbolTypeLib[ (int)tokenID ].defTextID = i;
}
break;
} // switch
} // for
}