anchor.diff: -;;;;; TRE tree processor transpiler
  -;;;;; Copyright (c) 2008 Sven Klose <pixel@copei.de>
  +;;;;; TRE transpiler
  +;;;;; Copyright (c) 2008-2009 Sven Klose <pixel@copei.de>
   ;;;;;
   ;;;;; Identifier style conversion
   
  
positive.code: 				   (if (digit-char-p c)
  					   (append (encapsulate-char c)
  							   (convert-special2 ._))
  					   (convert-special2 _)))))
  
  		 str (string s)
  	     l (length str))
  
  	(if (or (stringp s)
  			(numberp s))
  		str
          (list-string
  	      (convert-special
              (if (and (< 2 (length str)) ; Make *GLOBAL* upcase.
  			         (= (elt str 0) #\*)
  			         (= (elt str (1- l)) #\*))
  		        (remove-if (fn = _ #\-)
  					       (string-list (string-upcase (subseq str 1 (1- l)))))
      	        (convert-camel (string-list str))))))))
  
  (defun transpiler-to-string (tr x)
    (maptree #'((e)
  				(if
  				  (consp e)
  					(if (eq e. '%transpiler-string)
  					    (string-concat "\"" (cadr e) "\"")
  						(if (in? e. '%transpiler-native '%no-expex)
  							(transpiler-to-string tr .e)
  							e))
  
negative.code: (defun transpiler-special-char? (tr x)
    (not (funcall (transpiler-identifier-char? tr) x)))
  
  (defun transpiler-symbol-string-r (tr s)
    (with (encapsulate-char
  		   (fn string-list (string-concat "T" (format nil "~A" (char-code _))))
  				
  