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_bindings(self):
      self._top.title("CFG Editor")
      self._top.bind("<Control-q>", self._cancel)
      self._top.bind("<Alt-q>", self._cancel)
      self._top.bind("<Control-d>", self._cancel)
      # self._top.bind('<Control-x>', self._cancel)
      self._top.bind("<Alt-x>", self._cancel)
      self._top.bind("<Escape>", self._cancel)
      # self._top.bind('<Control-c>', self._cancel)
      self._top.bind("<Alt-c>", self._cancel)
  
      self._top.bind("<Control-o>", self._ok)
      self._top.bind("<Alt-o>", self._ok)
      self._top.bind("<Control-a>", self._apply)
      self._top.bind("<Alt-a>", self._apply)
      self._top.bind("<Control-r>", self._reset)
      self._top.bind("<Alt-r>", self._reset)
      self._top.bind("<Control-h>", self._help)
      self._top.bind("<Alt-h>", self._help)
      self._top.bind("<F1>", self._help)
  
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 4 for calling the CFGEditor obj's underlying member method code with example usage: obj._init_bindings() without return types