[plt-scheme] Looking for a standardized way to have syntax-debugger recognize a custum language.

From: Kyle Smith (airfoil at bellsouth.net)
Date: Tue May 29 15:09:04 EDT 2007


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:


(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))])
      (string-constant professional-languages))
         (string-constant r5rs-lang-name)
         ;;; internal SchemeKeys language
         (string-constant schemekeys-language)
         "(module ...)"
         (string-constant mzscheme-w/debug)
         (string-constant mred-w/debug)
         (string-constant pretty-big-scheme)))))))


 ;;; 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")
          (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?


airfoil at bellsouth dot net

Posted on the users mailing list.