Grammar Engineering Frequently Asked Questions

How do I interact with the LKB through the Lisp prompt?

The LKB prompt in the common-lisp buffer is actually a Lisp prompt, so you can of course type arbitrary Lisp code there (including any functions defined in the LKB system). Some useful things that you might find yourself doing often include:

  • (read-script-file-aux "/path/to/lkb/script"): This is the same as "Load > Complete grammar..." from the LKB Top menu, except that any errors or warnings are printed out in the emacs buffer instead of the LKB Top menu window, which can be useful. The shortcut for getting this command is C-c g.
  • (do-parse-tty "example sentence"): This is the same as "Parse > Input" from the LKB Top menu. The shortcut for getting this command is C-c p.
  • (lui-initialize): Start the LUI interface.
  • (lui-shutdown): Shut down the LUI interface and return to CLIM.
Some additional useful emacs short cuts include:
  • C-c C-p: Scroll backward through the previous commands.
  • C-c C-n: Scroll forward through the previous commands.
  • C-x b: Switch buffers
  • C-r: Search backwards. E.g., C-r pt-f is useful for finding the last "read-script-file-aux" command. Once you are there, just hitting return will cause it to be run again.
  • M-x goto-char: In your TDL file, move to the character position indicated by an LKB error.

Back to FAQs page

Back to main course page

-- Main.ebender - 26 Jan 2009

Edit | Attach | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2009-02-08 - 05:00:47 - gslayden

This site is powered by the TWiki collaboration platformCopyright & by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Privacy Statement Terms & Conditions