class_docstr: A dialog window for creating and editing context free grammars.
  ``CFGEditor`` imposes the following restrictions:
  
  - All nonterminals must be strings consisting of word
    characters.
  - All terminals must be strings consisting of word characters
    and space characters.
class_docstr_tok: ["A","dialog","window","for","creating","and","editing","context","free","grammars",".","``","CFGEditor","``","imposes","the","following","restrictions",":","-","All","nonterminals","must","be","strings","consisting","of","word","characters",".","-","All","terminals","must","be","strings","consisting","of","word","characters","and","space","characters","."]
code: def _init_buttons(self):
      frame = self._buttonframe = Frame(self._top)
      Button(
          frame, text="Ok", command=self._ok, underline=0, takefocus=0
      ).pack(side="left")
      Button(
          frame,
          text="Apply",
          command=self._apply,
          underline=0,
          takefocus=0,
      ).pack(side="left")
      Button(
          frame,
          text="Reset",
          command=self._reset,
          underline=0,
          takefocus=0,
      ).pack(side="left")
      Button(
          frame,
          text="Cancel",
          command=self._cancel,
          underline=0,
          takefocus=0,
      ).pack(side="left")
      Button(
          frame,
          text="Help",
          command=self._help,
          underline=0,
          takefocus=0,
      ).pack(side="right")
  
imports: import re
  from tkinter import Button, Canvas, Entry, Frame, IntVar, Label, Scrollbar, Text, Tk, Toplevel
  from nltk.draw.tree import TreeSegmentWidget, tree_to_treesegment
  from nltk.draw.util import CanvasFrame, ColorizedList, ShowText, SymbolWidget, TextWidget
  from nltk.grammar import CFG, Nonterminal, _read_cfg_production, nonterminals
  from nltk.tree import Tree
label_desc: Use image node_id 3 for calling the CFGEditor obj's underlying member method code with example usage: obj._init_buttons() without return types