Added a simple abbreviation resolver.
Use the WHAT-IS function to expand a Kenzo abbreviation. The abbreviation can be a KEYWORD, STRING or SYMBOL, e.g., (what-is 'chcm) or (what-is "chcm") or (what-is :chcm) all return "CHain CoMplex" .
This commit is contained in:
parent
c75796d4c7
commit
32c2ab2383
@ -18,6 +18,7 @@
|
||||
(:module "src"
|
||||
:components
|
||||
((:file "kenzo")
|
||||
(:file "abbreviations")
|
||||
(:file "macros")
|
||||
(:file "various")
|
||||
(:file "classes")
|
||||
|
||||
@ -21,6 +21,11 @@
|
||||
*TDD*
|
||||
*TNPR-WITH-DEGREES*
|
||||
|
||||
;; abbreviations.lisp
|
||||
|
||||
+ABBREVIATIONS+
|
||||
WHAT-IS
|
||||
|
||||
;; bar.lisp
|
||||
|
||||
ABAR
|
||||
|
||||
118
src/abbreviations.lisp
Normal file
118
src/abbreviations.lisp
Normal file
@ -0,0 +1,118 @@
|
||||
|
||||
(IN-PACKAGE #:cat)
|
||||
|
||||
(PROVIDE "abbreviations")
|
||||
|
||||
(DEFINE-CONSTANT +ABBREVIATIONS+
|
||||
'(
|
||||
;; A
|
||||
:ABAR "Algebraic-BAR"
|
||||
:ABSM "ABstract SiMplex"
|
||||
:ALLP "ALgebraic-LooP"
|
||||
:APOWR "Abstract POWeR"
|
||||
|
||||
;; B
|
||||
:BCC "Bottom Chain Complex"
|
||||
:BICN "BI-CoNe"
|
||||
:BNDR "BouNDaRy"
|
||||
:BRGN "BaR-GeNerator"
|
||||
:BSGN "BaSe GeNerator"
|
||||
|
||||
;; C
|
||||
:CBGN "CoBar-GeNerator"
|
||||
:CFFC "CoeFFiCient"
|
||||
:CHCM "CHain-CoMplex"
|
||||
:CLNM "CaL NuMber"
|
||||
:CMBN "CoMBiNation"
|
||||
:CMPR "CoMPaRison"
|
||||
:CMPRF "CoMPaRison Function"
|
||||
:CMPS "CoMPoSition"
|
||||
:CPRD "CoPRoDuct"
|
||||
:CRPR "CaRtesian-PRoduct"
|
||||
|
||||
;; D
|
||||
:DEGR "DEGRee"
|
||||
:DFFR "DiFFeRential"
|
||||
:DGOP "DeGeneracy OPerator"
|
||||
:DLOP "DeL OPerator"
|
||||
:DGNL "DiaGoNaL"
|
||||
:DMNS "DiMeNSion"
|
||||
|
||||
;; E
|
||||
:EFHM "EFfective HoMology"
|
||||
:EXPN "EXPoNent"
|
||||
|
||||
;; G
|
||||
:GBAR "Geometrical BAR"
|
||||
:GMSM "GeoMetric SiMplex"
|
||||
:GNRT "GeNeRaTor"
|
||||
:GRIN ""
|
||||
:GRMD "GRound MoDule"
|
||||
|
||||
;; H
|
||||
:HMEQ "HoMtopy-EQuivalence"
|
||||
:HMTP "HoMoToPy"
|
||||
:HRZN "HoRiZoNtal"
|
||||
|
||||
;; I
|
||||
:IABSM "Internal ABstract SiMplex"
|
||||
:IALLP "Internal-ALgebraic LooP"
|
||||
:ICMBN "Internal-CoMBiNation"
|
||||
:IDNM "IDentification NuMber"
|
||||
:ILOOP "Internal LOOP"
|
||||
:INTR "INTeRnal-"
|
||||
|
||||
;; L
|
||||
:LF "Left F"
|
||||
:LG "Left G"
|
||||
:LH "Left H"
|
||||
:LRDCT "Left ReDuCTion"
|
||||
|
||||
;; M
|
||||
:MRPH "MoRPHism"
|
||||
|
||||
;; O
|
||||
:OPPS "OPPoSite"
|
||||
:ORGN "ORiGiN"
|
||||
|
||||
;; P
|
||||
:POWR "POWeR"
|
||||
:PRDC "PRoDuCt"
|
||||
|
||||
;; R
|
||||
:RBCC "Bottom Right Chain Complex"
|
||||
:RDCT "ReDuCTion"
|
||||
:RF "Right F"
|
||||
:RG "Right G"
|
||||
:RH "Right H"
|
||||
:RNTM "RuNTiMe"
|
||||
:RRDCT "Right ReDuCTion"
|
||||
:RSLTS "ReSuLTs"
|
||||
|
||||
;; S
|
||||
:SBTR "SuBTRact"
|
||||
:SMGR "SiMplicial-GRoup"
|
||||
:SMMR "SiMplicial-MorPhism"
|
||||
:SMST "SiMplicial-SeT"
|
||||
:SORC "SOuRCe"
|
||||
:STRT "STRaTegy"
|
||||
|
||||
;;T
|
||||
:TCC "Top Chain Complex"
|
||||
:TNPR "TeNsorPRoduct"
|
||||
:TNSR "TeNSoR"
|
||||
:TRGT "TaRGeT"
|
||||
|
||||
;; V
|
||||
:VRTC "VeRTiCal"
|
||||
))
|
||||
|
||||
|
||||
(DEFUN what-is (kwd)
|
||||
(declare (type (or keyword string symbol) kwd))
|
||||
"WHAT-IS returns the full word or term for an abbreviation provided as a keyword
|
||||
string, or symbol. It returns NIL for unknown abbreviations."
|
||||
(getf +ABBREVIATIONS+
|
||||
(cond ((keywordp kwd) kwd)
|
||||
((stringp kwd) (intern (string-upcase kwd) 'keyword))
|
||||
((symbolp kwd) (intern (symbol-name kwd) 'keyword)))))
|
||||
Loading…
Reference in New Issue
Block a user