bool ResidentVocabulary::_containsSym(Sym symId) const { return getVocab(symId.type()).containsSym(symId); }
inline void operator-=(Sym delta) { assert(delta.type() == type()); operator-=(delta.index()); }
bool ResidentVocabulary::_boundsSym(Sym symId) const { return getVocab(symId.type()).boundsSym(symId); }
bool containsSym(Sym sym) const { assert(sym.type() == type_); SymInt index = sym.index(); assert(index >= offset_); return index - offset_ < symbols_.size(); }
inline bool isAnnotation(Sym sym) { return sym.type() == kSpecialTerminal && !isFstComposeSpecial(sym); }
inline bool specialTerminalIsAnnotation(Sym specialTerminal) { assert(specialTerminal.type() == kSpecialTerminal); return !isFstComposeSpecial(specialTerminal); }