public virtual string SetOption( string key, object value, IToken optionsStartToken )
{
if ( LegalOption( key ) )
{
ErrorManager.GrammarError( ErrorManager.MSG_ILLEGAL_OPTION,
this,
optionsStartToken,
key );
return null;
}
if ( !OptionIsValid( key, value ) )
{
return null;
}
if ( key == "backtrack" && value.ToString() == "true" )
{
composite.RootGrammar.atLeastOneBacktrackOption = true;
}
if ( options == null )
{
options = new Dictionary<string, object>();
}
options[key] = value;
return key;
}