How to provide user with advanced autocomplete suggestions for given boost::spirit grammar?
Clash Royale CLAN TAG #URR8PPP How to provide user with advanced autocomplete suggestions for given boost::spirit grammar? This actually builds up after my previous question: How to provider user with autocomplete suggestions for given boost::spirit grammar? To Sehe solution I've added annotater for syntax coloring: First by adopting hints structure to this (note: ast_type_t is an enum class ): hints ast_type_t enum class template <class ast_type_t> class hints_t { struct by_location_t { template<typename T, typename U> bool operator()(T const& a, U const& b) const { if(loc(a) == loc(b)) return size(a) > size(b); return loc(a) < loc(b); } private: static location_t loc(source_t const& s) { return s.begin(); } static location_t loc(location_t const& l) { return l; } static std::size_t size(source_t const& ...