2 keyword.cc -- keywords and identifiers
11 bool tab_less (Keyword_ent const &p1, Keyword_ent const &p2)
13 return strcmp (p1.name_, p2.name_) < 0;
16 Keyword_table::Keyword_table (Keyword_ent *tab)
19 table_.push_back (*tab++);
21 vector_sort (table_, tab_less);
25 Keyword_table::lookup (char const *s) const
29 vsize idx = binary_search (table_, e, tab_less);
31 return table_[idx].tokcode_;