Example #1
0
inline bool 
operator!=(Terminal const& a, Terminal const& b)
{
  return std::strncmp(a.first, b.first, std::min(a.size(), b.size()));
}
Example #2
0
// Returns true if the identifier has the same sequence of 
// characters as `str`.
inline bool 
operator==(Terminal const& t, char const* str)
{
  return !std::strncmp(t.first, str, t.size());
}
Example #3
0
inline bool 
operator!=(char const* str, Terminal const& t)
{
  return std::strncmp(t.first, str, t.size());
}