Esempio n. 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);
}
Esempio n. 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);
}
Esempio n. 3
0
 std::string operator()(Sym symId) const { return pVoc->str(symId); }
Esempio n. 4
0
 Sym operator()(std::string const& str) const { return pVoc->add(str, kTerminal); }
Esempio n. 5
0
 void operator()(Sym sym, IVocabulary& voc) const { operator()(voc.str(sym)); }
Esempio n. 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));
 }