[plt-scheme] Looking for a standardized way to have syntax-debugger recognize a custum language.
Hi,
I'm sure that I'm not the only person that has written a custum
language for their private use, so I'm wondering if their might
be a better way than the method I describe below to get the
syntax-debugger to show up whenever I'm in my custom
language. Syntax-debugger already supports module based
languages, but mine resides in it's own directory in collects so
that I can have it available to me by simply selecting it from
the languages drop-down in the lower left of DrScheme.
Currently, I make the following changes in two source files
whenever I download a new version:
macro-debugger/tools.ss:
(define (macro-stepper-works-for? lang)
(let ([main-group (car lang)]
[second (and (pair? (cdr lang))
(cadr lang))]
[third (and (pair? (cdr lang))
(pair? (cddr lang))
(caddr lang))])
(and
(equal?
main-group
(string-constant professional-languages))
(or
(member
second
(list
(string-constant r5rs-lang-name)
;;; internal SchemeKeys language
(string-constant schemekeys-language)
"(module ...)"
"Swindle"))
(member
third
(list
(string-constant mzscheme-w/debug)
(string-constant mred-w/debug)
(string-constant pretty-big-scheme)))))))
string-constants/english-string-constants.ss
;;; languages
...
(r5rs-one-line-summary "R5RS, with no frills")
;;; internal SchemeKeys languagae
(schemekeys-language "SchemeKeys")
(expander "Expander")
...
and my info.ss file looks like this:
(module info (lib "infotab.ss" "setup")
(require
(lib "string-constant.ss" "string-constants"))
(define name "SchemeKeys")
(define drscheme-language-modules
(list "schemekeys.ss"))
(define drscheme-language-numbers
'((-1000 0)))
(define drscheme-language-positions
(list (list (string-constant professional-languages)
(string-constant schemekeys-language)))))
At first I tried simply changing my info.ss to the above,
hoping that it would then be recognized by syntax-debugger
as belonging to the group of professional-languages that it
appears it supports as a group. But, that wasn't sufficient,
so I added the reference to schemekeys in tool.ss itself,
and that worked.
Is there an easier way through my info.ss file to achieve the
same effect?
Thanks,
--kyle
airfoil at bellsouth dot net
schemekeys.blogspot.com