-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
coding-idiom.lisp
58 lines (50 loc) · 2.5 KB
/
coding-idiom.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
;;; -*- Mode:LISP; Syntax: COMMON-LISP; Package: MARSHAL; Base: 10; indent-tabs-mode: nil -*-
;;; ***********************************************************
;;;
;;; Project: marshal
;;; Simple (de)serialization of Lisp datastructures.
;;;
;;; File: coding-idiom.lsp
;;;
;;; ***********************************************************
;;; exported symbols: ---
(in-package :marshal)
(defconstant +reference-placeholder+ :placeholder)
(defparameter *idiom-table* '(:array :array
:hash-table :hash-table
:coding-identifier :pcode
:list :list
:dlist :dlist
:circular-list :clist
:object :object
:string :string
:simple-string :simple-string
:function :function
:reference :reference
:coding-release-no 1)
"Definition of the vocabulary of the generated serialization. You can
increase verbosity or compactness by choosing your own 'language'.
key= access code used inside the programs source code
value= generated identifier.")
(defun coding-idiom (key)
"Definition of the vocabulary of the generated serialization.You can
increase verbosity or compactness by choosing your own 'language'. Simply
define your own vocabulary and redefine the variable ms:*idiom-table*."
;;; key= access code used inside the programs source code
;;; value= generated identifier.
(getf *idiom-table* key))
;;(defparameter *idiom-table* '(:array :a
;; :hash-table :h
;; :coding-identifier :pcode
;; :list :l
;; :dlist :d
;; :circular-list :i
;; :object :o
;; :string :s
;; :simple-string :c
;; :reference :r
;; :coding-release-no 1.1)
;; "Definition of the vocabulary of the generated serialization. You can
;;increase verbosity or compactness by choosing your own 'language'.
;;key= access code used inside the programs source code
;;value= generated identifier.")