/[cmucl]/src/hemlock/defsyn.lisp
ViewVC logotype

Contents of /src/hemlock/defsyn.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Mon Oct 31 04:50:12 1994 UTC (19 years, 5 months ago) by ram
Branch: MAIN
CVS Tags: sparc-tramp-assem-base, double-double-array-base, post-merge-intl-branch, release-19b-pre1, release-19b-pre2, merged-unicode-utf16-extfmt-2009-06-11, double-double-init-sparc-2, unicode-utf16-extfmt-2009-03-27, double-double-base, snapshot-2007-09, snapshot-2007-08, snapshot-2008-08, snapshot-2008-09, ppc_gencgc_snap_2006-01-06, sse2-packed-2008-11-12, snapshot-2008-05, snapshot-2008-06, snapshot-2008-07, snapshot-2007-05, snapshot-2008-01, snapshot-2008-02, snapshot-2008-03, intl-branch-working-2010-02-19-1000, snapshot-2006-11, snapshot-2006-10, double-double-init-sparc, snapshot-2006-12, unicode-string-buffer-impl-base, sse2-base, release-20b-pre1, release-20b-pre2, unicode-string-buffer-base, RELEASE_18d, sse2-packed-base, sparc-tramp-assem-2010-07-19, amd64-dd-start, snapshot-2003-10, snapshot-2004-10, release-18e-base, release-19f-pre1, snapshot-2008-12, snapshot-2008-11, intl-2-branch-base, snapshot-2004-08, snapshot-2004-09, remove_negative_zero_not_zero, snapshot-2007-01, snapshot-2007-02, snapshot-2004-05, snapshot-2004-06, snapshot-2004-07, release-19e, release-19d, GIT-CONVERSION, double-double-init-ppc, release-19c, dynamic-extent-base, unicode-utf16-sync-2008-12, LINKAGE_TABLE, release-19c-base, cross-sol-x86-merged, label-2009-03-16, release-19f-base, PRE_LINKAGE_TABLE, merge-sse2-packed, mod-arith-base, sparc_gencgc_merge, merge-with-19f, snapshot-2004-12, snapshot-2004-11, intl-branch-working-2010-02-11-1000, RELEASE_18a, RELEASE_18b, RELEASE_18c, unicode-snapshot-2009-05, unicode-snapshot-2009-06, amd64-merge-start, ppc_gencgc_snap_2005-12-17, double-double-init-%make-sparc, unicode-utf16-sync-2008-07, release-18e-pre2, unicode-utf16-sync-2008-09, unicode-utf16-extfmts-sync-2008-12, prm-before-macosx-merge-tag, cold-pcl-base, RELEASE_20b, snapshot-2008-04, snapshot-2003-11, snapshot-2005-07, unicode-utf16-sync-label-2009-03-16, RELEASE_19f, snapshot-2007-03, release-20a-base, cross-sol-x86-base, unicode-utf16-char-support-2009-03-26, unicode-utf16-char-support-2009-03-25, release-19a-base, unicode-utf16-extfmts-pre-sync-2008-11, snapshot-2008-10, sparc_gencgc, snapshot-2007-04, snapshot-2010-12, snapshot-2010-11, unicode-utf16-sync-2008-11, snapshot-2007-07, snapshot-2011-09, snapshot-2011-06, snapshot-2011-07, snapshot-2011-04, snapshot-2007-06, snapshot-2011-02, snapshot-2011-03, snapshot-2011-01, snapshot-2003-12, release-19a-pre1, release-19a-pre3, release-19a-pre2, pre-merge-intl-branch, release-19a, UNICODE-BASE, double-double-array-checkpoint, double-double-reader-checkpoint-1, release-19d-base, release-19e-pre1, double-double-irrat-end, release-19e-pre2, snapshot-2010-05, snapshot-2010-04, snapshot-2010-07, snapshot-2010-06, snapshot-2010-01, snapshot-2010-03, snapshot-2010-02, release-19d-pre2, release-19d-pre1, snapshot-2010-08, release-18e, double-double-init-checkpoint-1, double-double-reader-base, label-2009-03-25, snapshot-2005-03, release-19b-base, cross-sol-x86-2010-12-20, double-double-init-x86, sse2-checkpoint-2008-10-01, intl-branch-2010-03-18-1300, snapshot-2005-11, double-double-sparc-checkpoint-1, snapshot-2004-04, sse2-merge-with-2008-11, sse2-merge-with-2008-10, snapshot-2005-10, RELEASE_20a, snapshot-2005-12, release-20a-pre1, snapshot-2005-01, snapshot-2009-11, snapshot-2009-12, unicode-utf16-extfmt-2009-06-11, portable-clx-import-2009-06-16, unicode-utf16-string-support, release-19c-pre1, cross-sparc-branch-base, release-19e-base, intl-branch-base, double-double-irrat-start, snapshot-2005-06, snapshot-2005-05, snapshot-2005-04, ppc_gencgc_snap_2005-05-14, snapshot-2005-02, unicode-utf16-base, portable-clx-base, snapshot-2005-09, snapshot-2005-08, lisp-executable-base, snapshot-2009-08, snapshot-2007-12, snapshot-2007-10, snapshot-2007-11, snapshot-2009-02, snapshot-2009-01, snapshot-2009-07, snapshot-2009-05, snapshot-2009-04, snapshot-2006-02, snapshot-2006-03, release-18e-pre1, snapshot-2006-01, snapshot-2006-06, snapshot-2006-07, snapshot-2006-04, snapshot-2006-05, pre-telent-clx, snapshot-2006-08, snapshot-2006-09, HEAD
Branch point for: release-19b-branch, double-double-reader-branch, double-double-array-branch, mod-arith-branch, RELEASE-19F-BRANCH, portable-clx-branch, sparc_gencgc_branch, cross-sparc-branch, RELEASE-20B-BRANCH, RELENG_18, unicode-string-buffer-branch, sparc-tramp-assem-branch, dynamic-extent, UNICODE-BRANCH, release-19d-branch, ppc_gencgc_branch, sse2-packed-branch, lisp-executable, RELEASE-20A-BRANCH, amd64-dd-branch, double-double-branch, unicode-string-buffer-impl-branch, intl-branch, release-18e-branch, cold-pcl, unicode-utf16-branch, cross-sol-x86-branch, release-19e-branch, sse2-branch, release-19a-branch, release-19c-branch, intl-2-branch, unicode-utf16-extfmt-branch
Changes since 1.3: +1 -3 lines
Fix headed boilerplate.
1 ;;; -*- Log: hemlock.log; Package: Hemlock -*-
2 ;;;
3 ;;; **********************************************************************
4 ;;; This code was written as part of the CMU Common Lisp project at
5 ;;; Carnegie Mellon University, and has been placed in the public domain.
6 ;;;
7 (ext:file-comment
8 "$Header: /tiger/var/lib/cvsroots/cmucl/src/hemlock/defsyn.lisp,v 1.4 1994/10/31 04:50:12 ram Rel $")
9 ;;;
10 ;;; **********************************************************************
11 ;;;
12 ;;; This file contains definitions of various character attributes.
13 ;;;
14 (in-package "HEMLOCK")
15
16 (defattribute "Whitespace"
17 "A value of 1 for this attribute indicates that the corresponding character
18 should be considered as whitespace. This is used by the Blank-Line-P
19 function.")
20
21 (setf (character-attribute :whitespace #\space) 1)
22 (setf (character-attribute :whitespace #\linefeed) 1)
23 (setf (character-attribute :whitespace #\tab) 1)
24 (setf (character-attribute :whitespace #\newline) 1)
25
26 (defattribute "Word Delimiter"
27 "A value of 1 for this attribute indicates that the corresponding character
28 separates words. This is used by the word manipulating commands.")
29
30 (setf (character-attribute :word-delimiter nil) 1)
31 (setf (character-attribute :word-delimiter #\!) 1)
32 (setf (character-attribute :word-delimiter #\@) 1)
33 (setf (character-attribute :word-delimiter #\#) 1)
34 (setf (character-attribute :word-delimiter #\$) 1)
35 (setf (character-attribute :word-delimiter #\%) 1)
36 (setf (character-attribute :word-delimiter #\^) 1)
37 (setf (character-attribute :word-delimiter #\&) 1)
38 (setf (character-attribute :word-delimiter #\*) 1)
39 (setf (character-attribute :word-delimiter #\() 1)
40 (setf (character-attribute :word-delimiter #\)) 1)
41 (setf (character-attribute :word-delimiter #\-) 1)
42 (setf (character-attribute :word-delimiter #\_) 1)
43 (setf (character-attribute :word-delimiter #\=) 1)
44 (setf (character-attribute :word-delimiter #\+) 1)
45 (setf (character-attribute :word-delimiter #\[) 1)
46 (setf (character-attribute :word-delimiter #\]) 1)
47 (setf (character-attribute :word-delimiter #\\) 1)
48 (setf (character-attribute :word-delimiter #\|) 1)
49 (setf (character-attribute :word-delimiter #\;) 1)
50 (setf (character-attribute :word-delimiter #\:) 1)
51 (setf (character-attribute :word-delimiter #\') 1)
52 (setf (character-attribute :word-delimiter #\") 1)
53 (setf (character-attribute :word-delimiter #\{) 1)
54 (setf (character-attribute :word-delimiter #\}) 1)
55 (setf (character-attribute :word-delimiter #\,) 1)
56 (setf (character-attribute :word-delimiter #\.) 1)
57 (setf (character-attribute :word-delimiter #\<) 1)
58 (setf (character-attribute :word-delimiter #\>) 1)
59 (setf (character-attribute :word-delimiter #\/) 1)
60 (setf (character-attribute :word-delimiter #\?) 1)
61 (setf (character-attribute :word-delimiter #\`) 1)
62 (setf (character-attribute :word-delimiter #\~) 1)
63 (setf (character-attribute :word-delimiter #\space) 1)
64 (setf (character-attribute :word-delimiter #\linefeed) 1)
65 (setf (character-attribute :word-delimiter #\formfeed) 1)
66 (setf (character-attribute :word-delimiter #\tab) 1)
67 (setf (character-attribute :word-delimiter #\newline) 1)
68
69 (shadow-attribute :word-delimiter #\. 0 "Fundamental")
70 (shadow-attribute :word-delimiter #\' 0 "Text")
71 (shadow-attribute :word-delimiter #\backspace 0 "Text")
72 (shadow-attribute :word-delimiter #\_ 0 "Text")
73
74 (defattribute "Page Delimiter"
75 "This attribute is 1 for characters that separate pages, 0 otherwise.")
76 (setf (character-attribute :page-delimiter nil) 1)
77 (setf (character-attribute :page-delimiter #\page) 1)
78
79
80 (defattribute "Lisp Syntax"
81 "These character attribute is used by the lisp mode commands, and possibly
82 other people. The value of ths attribute is always a symbol. Currently
83 defined values are:
84 NIL - No interesting properties.
85 :space - Acts like whitespace, should not include newline.
86 :newline - Newline, man.
87 :open-paren - An opening bracket.
88 :close-paren - A closing bracket.
89 :prefix - A character that is a part of any form it appears before.
90 :string-quote - The character that quotes a string.
91 :char-quote - The character that escapes a single character.
92 :comment - The character that comments out to end of line.
93 :constituent - Things that make up symbols."
94 'symbol nil)
95
96 (setf (character-attribute :lisp-syntax #\space) :space)
97 (setf (character-attribute :lisp-syntax #\tab) :space)
98
99 (setf (character-attribute :lisp-syntax #\() :open-paren)
100 (setf (character-attribute :lisp-syntax #\)) :close-paren)
101 (setf (character-attribute :lisp-syntax #\') :prefix)
102 (setf (character-attribute :lisp-syntax #\`) :prefix)
103 (setf (character-attribute :lisp-syntax #\#) :prefix)
104 (setf (character-attribute :lisp-syntax #\,) :prefix)
105 (setf (character-attribute :lisp-syntax #\") :string-quote)
106 (setf (character-attribute :lisp-syntax #\\) :char-quote)
107 (setf (character-attribute :lisp-syntax #\;) :comment)
108 (setf (character-attribute :lisp-syntax #\newline) :newline)
109 (setf (character-attribute :lisp-syntax nil) :newline)
110
111 (do-alpha-chars (ch :both)
112 (setf (character-attribute :lisp-syntax ch) :constituent))
113
114 (setf (character-attribute :lisp-syntax #\0) :constituent)
115 (setf (character-attribute :lisp-syntax #\1) :constituent)
116 (setf (character-attribute :lisp-syntax #\2) :constituent)
117 (setf (character-attribute :lisp-syntax #\3) :constituent)
118 (setf (character-attribute :lisp-syntax #\4) :constituent)
119 (setf (character-attribute :lisp-syntax #\5) :constituent)
120 (setf (character-attribute :lisp-syntax #\6) :constituent)
121 (setf (character-attribute :lisp-syntax #\7) :constituent)
122 (setf (character-attribute :lisp-syntax #\8) :constituent)
123 (setf (character-attribute :lisp-syntax #\9) :constituent)
124
125 (setf (character-attribute :lisp-syntax #\!) :constituent)
126 (setf (character-attribute :lisp-syntax #\{) :constituent)
127 (setf (character-attribute :lisp-syntax #\}) :constituent)
128 (setf (character-attribute :lisp-syntax #\[) :constituent)
129 (setf (character-attribute :lisp-syntax #\]) :constituent)
130 (setf (character-attribute :lisp-syntax #\/) :constituent)
131 (setf (character-attribute :lisp-syntax #\@) :constituent)
132 (setf (character-attribute :lisp-syntax #\-) :constituent)
133 (setf (character-attribute :lisp-syntax #\_) :constituent)
134 (setf (character-attribute :lisp-syntax #\+) :constituent)
135 (setf (character-attribute :lisp-syntax #\%) :constituent)
136 (setf (character-attribute :lisp-syntax #\*) :constituent)
137 (setf (character-attribute :lisp-syntax #\$) :constituent)
138 (setf (character-attribute :lisp-syntax #\^) :constituent)
139 (setf (character-attribute :lisp-syntax #\&) :constituent)
140 (setf (character-attribute :lisp-syntax #\~) :constituent)
141 (setf (character-attribute :lisp-syntax #\=) :constituent)
142 (setf (character-attribute :lisp-syntax #\<) :constituent)
143 (setf (character-attribute :lisp-syntax #\>) :constituent)
144 (setf (character-attribute :lisp-syntax #\?) :constituent)
145 (setf (character-attribute :lisp-syntax #\.) :constituent)
146 (setf (character-attribute :lisp-syntax #\:) :constituent)
147
148
149 (defattribute "Sentence Terminator"
150 "Used for terminating sentences -- ., !, ?.
151 Possibly could make type (mod 3) and use the value of 2 and 1 for spaces
152 to place after chacter."
153 '(mod 2)
154 0)
155
156 (setf (character-attribute :sentence-terminator #\.) 1)
157 (setf (character-attribute :sentence-terminator #\!) 1)
158 (setf (character-attribute :sentence-terminator #\?) 1)

  ViewVC Help
Powered by ViewVC 1.1.5