/** * Set the default inflectional variant of a word. This is mostly relevant * if the word has more than one possible inflectional variant (for example, * it can be inflected in both a regular and irregular way). * * <P> * If the default inflectional variant is set, the inflectional forms of the * word may change as a result. This depends on whether inflectional forms * have been specifically associated with this variant, via * {@link #addInflectionalVariant(Inflection, String, String)}. * * <P> * The <code>NIHDBLexicon</code> associates different inflectional variants * with words, if they are so specified, and adds the correct forms. * * @param variant * The variant */ public virtual void setDefaultInflectionalVariant(Inflection variant) { setFeature(LexicalFeature.DEFAULT_INFL, variant); defaultInfl = variant; if (inflVars.ContainsKey(variant)) { InflectionSet set = inflVars[variant]; string[] forms = LexicalFeature.getInflectionalFeatures(Category); if (forms != null) { foreach (string f in forms) { setFeature(f, set.getForm(f)); } } } }
public bool IsAllowed(LexicalFeature f) { return (AllowedFeatures & f) == f; }
public LexicalScope(JavascriptParserState state, LexicalFeature allowedFeatures) { State = state; AllowedFeatures = allowedFeatures; }
public ILexicalScope NewScope(LexicalFeature allowedFeatures = LexicalFeature.None) { var scope = new LexicalScope(this, allowedFeatures); _scopes.Push(scope); return scope; }