Hi David,
I think you mistake me for someone who read and understood a
manual. ;)
I've done most of my edebug scripting in eieio where I copied out
macros from CL. As such, as best I can tell, these are correct.
The one downside I've run into so far is with defining a lexer.
I have no idea how to instrument items that are being set into
a defvar first, then into a lexer.
It appears from the below that it really is possible, though
requires some amount of hand-evaling in the right order to make it
go. This seems really promising, and I'll give it a try next time
I'm working in that area.
Lastly, I often put edebug definitions in the file that defines the
macros. You might want to put the lex macros in semantic-lex.
Thanks!
Eric
>>> David Ponce <david@...> seems to think that:
>Eric,
>
>Below is a patch to semantic-fw.el to add edebug specifications for
>Semantic macros.
>
>As I am not very familiar with edebug, I read the "Edebug" chapter in
>the "GNU Emacs Lisp Reference Manual" (version 2.9 for GNU Emacs 21.3)
>to try to understand how to write the specifications.
>
>It would be nice if you could review my code to see if it is correct.
>
>Thanks for your help!
>David
>
>
>*** semantic-fw.el~ Tue Aug 13 18:38:23 2002
>--- semantic-fw.el Tue Aug 13 21:45:00 2002
>***************
>*** 628,633 ****
>--- 628,674 ----
> (font-lock-add-keywords 'emacs-lisp-mode
> semantic-fw-font-lock-keywords)
> )
>+
>+ ;;; Debugging
>+ ;;
>+ (defun semantic-fw-edebug-setup ()
>+ "Define `edebug' specifications for Semantic macros."
>+ (def-edebug-spec setq-mode-local
>+ (symbolp (&rest symbolp form))
>+ )
>+ (def-edebug-spec defvar-mode-local
>+ (&define symbolp name def-form [ &optional stringp ] )
>+ )
>+ (def-edebug-spec defconst-mode-local
>+ defvar-mode-local
>+ )
>+ (def-edebug-spec define-overload
>+ (&define name lambda-list stringp def-body)
>+ )
>+ (def-edebug-spec define-mode-overload-implementation
>+ (&define name symbolp lambda-list stringp def-body)
>+ )
>+ (def-edebug-spec define-lex
>+ (&define name stringp (&rest symbolp))
>+ )
>+ (def-edebug-spec define-lex-analyzer
>+ (&define name stringp form def-body)
>+ )
>+ (def-edebug-spec define-lex-regex-analyzer
>+ (&define name stringp form def-body)
>+ )
>+ (def-edebug-spec define-lex-simple-regex-analyzer
>+ (&define name stringp form symbolp [ &optional form ] def-body)
>+ )
>+ (def-edebug-spec define-lex-block-analyzer
>+ (&define name stringp form (&rest form))
>+ )
>+ (def-edebug-spec define-wisent-lexer
>+ (&define name stringp def-body)
>+ )
>+ )
>+
>+ (add-hook 'edebug-setup-hook 'semantic-fw-edebug-setup)
>
> (provide 'semantic-fw)
>
>
>
>
--
Eric Ludlam: zappo@..., eric@...
Home: http://www.ultranet.com/~zappo Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org
|