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.
- (setf *maximum-number-of-edges* 10000) increase edge limit to find deeper parses
- (setf *maximum-number-of-edges* 100) decrease edge limit to debug rule spinning
Some additional useful emacs short cuts include:
Back to FAQs page
Back to main course page
- 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.
-- Main.ebender - 26 Jan 2009, brodbd
08 Jan 2010
Topic revision: r4 - 2010-01-08 - 19:03:43 - brodbd