Beispiel #1
0
inline void writeLabel(Util::StringBuilder& out, Sym sym, IVocabulary const& voc, SymbolQuotation quote = kQuoted) {
  writeLabel(out, voc.str(sym), sym.isLexical() ? quote : kUnquoted);
}
Beispiel #2
0
inline void writeLabel(std::ostream& out, Sym sym, IVocabulary const& voc, SymbolQuotation quote = kQuoted) {
  writeLabel(out, voc.str(sym), sym.isLexical() ? quote : kUnquoted);
}
Beispiel #3
0
 std::string operator()(Sym symId) const { return pVoc->str(symId); }
Beispiel #4
0
 Sym operator()(std::string const& str) const { return pVoc->add(str, kTerminal); }
Beispiel #5
0
 void operator()(Sym sym, IVocabulary& voc) const { operator()(voc.str(sym)); }
Beispiel #6
0
 /**
    convenience. doesn't call finishPhrase.
 */
 void phrase(Syms const& syms, IVocabulary& voc) const {
   for (Syms::const_iterator i = syms.begin(), e = syms.end(); i != e; ++i) operator()(voc.str(*i));
 }