Debian Codegraph @

reference/scanner_special.html

raw symbols SCIP
1
2 <HTML>
3 <!--
4 ***********************************************************************
5 FUNNELWEB MANUAL WEB PAGE
6 =========================
7 Copyright (c) Ross N. Williams 1992,1999. All rights reserved.
8
9 Permission is granted to redistribute and use this manual in
10 any medium, with or without modification, provided that all
11 notices (including, without limitation, the copyright
12 notice, this permission notice, any record of modification,
13 and all legal notices) are preserved on all copies, that all
14 modifications are clearly marked, and that modified versions
15 are not represented as the original version unless all the
16 modifications since the manual's original release by Ross N.
17 Williams (www.ross.net) consist of translations or other
18 transformations that alter only the manual's form, not its
19 content. THIS MANUAL IS PROVIDED "AS IS" AND WITHOUT ANY
20 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
21 LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
22 FITNESS FOR A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY
23 LAW THERE IS ABSOLUTELY NO WARRANTY.
24
25 ***********************************************************************
26 -->
27
28 <HEAD>
29 <TITLE>3.2 Special Sequences</TITLE>
30 <STYLE TYPE="text/css"> <!-- A {text-decoration: none} // --> </STYLE>
31 </HEAD>
32 <BODY BACKGROUND="binary/background.gif"
33 BGCOLOR="#FFFFFF"
34 TEXT="#000000"
35 VLINK="#660000"
36 LINK="#FF0000"
37 ALINK="#CC0000">
38
39 <TABLE WIDTH="490">
40 <TR>
41 <TD WIDTH="130" VALIGN="top">
42 <IMG SRC="binary/d_clear.gif" ALT="" WIDTH="130" HEIGHT="1"><BR>
43
44 <FONT SIZE="2">
45 <BR>
46
47 <A HREF="http://www.ross.net/"
48 TARGET="rosshome"
49 onClick="window.open('','rosshome','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
50 >
51 <IMG SRC="binary/rossnet_logo.gif"
52 WIDTH="64" HEIGHT="32"
53 BORDER="0" ALT="RossNet"
54 HSPACE="0" VSPACE="1"></A><BR>
55 <BR>
56
57 <A HREF="../index.shtml"
58 TARGET="funnelweb"
59 onClick="window.open('','funnelweb','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
60 >
61 <IMG SRC="binary/linklogo.gif"
62 WIDTH="64" HEIGHT="32"
63 BORDER="0" ALT="FunnelWeb"
64 HSPACE="0" VSPACE="1"></A><BR>
65 <BR>
66 <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><TD BGCOLOR="#000000">
67 <A HREF="../tutorial/index.html"
68 TARGET="funnelwebtutorial"
69 onClick="window.open('','funnelwebtutorial','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
70 ><FONT COLOR="#FFFFFF"><B>Tutorial</B></FONT></A><BR>
71 <BR>
72 <A HREF="../developer/index.html"
73 TARGET="funnelwebdeveloper"
74 onClick="window.open('','funnelwebdeveloper','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
75 ><FONT COLOR="#FFFFFF"><B>Developer</B></FONT></A><BR>
76 <BR>
77 <A HREF="index.html"><FONT COLOR="#FFFFFF"><B>Reference</B></FONT></A><BR>
78 <A HREF="intro.html"><FONT COLOR="#FFFFFF">1 Introduction</FONT></A><BR>
79 <A HREF="interface.html"><FONT COLOR="#FFFFFF">2 Interface</FONT></A><BR>
80 <A HREF="scanner.html"><FONT COLOR="#FFFFFF">3 Scanner</FONT></A><BR>
81 <A HREF="parser.html"><FONT COLOR="#FFFFFF">4 Parser</FONT></A><BR>
82 <A HREF="analyser.html"><FONT COLOR="#FFFFFF">5 Analyser</FONT></A><BR>
83 <A HREF="tangle.html"><FONT COLOR="#FFFFFF">6 Tangle</FONT></A><BR>
84 <A HREF="weave.html"><FONT COLOR="#FFFFFF">7 Weave</FONT></A><BR>
85 <A HREF="shell.html"><FONT COLOR="#FFFFFF">8 Shell</FONT></A><BR>
86 <A HREF="commands.html"><FONT COLOR="#FFFFFF">9 Commands</FONT></A><BR>
87 <A HREF="glossary.html"><FONT COLOR="#FFFFFF">10 Glossary</FONT></A><BR>
88 <A HREF="references.html"><FONT COLOR="#FFFFFF">11 References</FONT></A><BR>
89
90 <BR>
91 <A HREF="search.html"><FONT COLOR="#FFFFFF"><B>SEARCH</B></FONT></A><BR>
92 </FONT>
93 </TD></TR></TABLE>
94
95
96 </TD>
97 <TD WIDTH="360" VALIGN="top">
98 <FONT SIZE="3">
99
100
101 <A HREF="index.html"><IMG SRC="binary/title.gif"
102 WIDTH="316" HEIGHT="24"
103 BORDER="0" ALT="FunnelWeb Reference Manual"
104 HSPACE="0" VSPACE="0"></A>
105 <P><FONT SIZE="5">3.2 Special Sequences</FONT><BR>
106
107
108 <P>The scanner scans the input file from top to bottom,
109 left to right, treating the input as ordinary text (to be
110 handed directly to the parser as a text token) unless it
111 encounters the <STRONG>special character</STRONG> which
112 introduces a <STRONG>special sequence</STRONG>. Thus, the
113 scanner partitions the input file into ordinary text and
114 special sequences. (Note: This sort of character is often
115 referred to as the "escape character" or the
116 "control character" in other systems. However, as
117 there is great potential to confuse these names with the
118 "escape" character (ASCII 27) and ASCII
119 "control" characters, the term "special" has
120 been chosen instead. This results in the terms
121 <I>special character</I>&nbsp; and <I>special sequence</I>&nbsp;.
122
123 <P>
124 <PRE>
125 input_file = { ordinary_text | special_sequence }
126 </PRE>
127
128 <P>Upon startup, the special
129 character is
130 <SAMP>@</SAMP>, but it can be changed using the
131 &lt;special&gt;<SAMP>=</SAMP>&lt;new_special&gt; special sequence.
132 Rather than using &lt;special&gt; whenever the special
133 character appears, this document uses the default special
134 character "<TT>@</TT>" to represent the current special
135 character. More importantly, FunnelWeb's error messages all
136 use the default special character in examples,
137 even if the special character has been changed.
138
139 <P>An occurrence of the special character in the input
140 file introduces a special sequence. The kind of special
141 sequence is determined by the character following the
142 special character. Only printable characters can follow the
143 special character.
144
145 <P>The following list gives all the possible characters
146 that can follow the special character, and the legality of
147 each sequence. The first column gives the ASCII number of
148 each ASCII character. The second column gives the special
149 sequence for that character. The next column contains one of
150 three characters: "<TT>-</TT>" means that the sequence is
151 illegal. "<TT>S</TT>" indicates that the sequence is a
152 <STRONG>simple sequence</STRONG> (with no attributes or side
153 effects) that appears exactly as shown and is converted
154 directly into a token and fed to the parser. Finally,
155 "<TT>C</TT>" indicates that the special sequence is complex,
156 possibly having a following syntax or producing funny side
157 effects.
158
159 <P>
160 <PRE>
161 ASC SEQ COMMENT
162 -----------------
163 000 \
164 016 | Unprintable chars (illegal specials).
165 031 /
166 032 @ - Illegal (space).
167 033 @! C Comment.
168 034 @" S Parameter delimeter.
169 035 @# C Short name sequence.
170 036 @$ S Start of macro definition.
171 037 @% - Illegal.
172 038 @& - Illegal.
173 039 @' - Illegal.
174 040 @( S Open parameter list.
175 041 @) S Close parameter list.
176 042 @* - Illegal.
177 043 @+ C Insert newline.
178 044 @, S Parameter separator.
179 045 @- C Suppress end of line marker.
180 046 @. - Illegal.
181 047 @/ S Open or close emphasised text.
182 048 @0 - Illegal.
183 049 @1 S Formal parameter 1.
184 050 @2 S Formal parameter 2.
185 051 @3 S Formal parameter 3.
186 052 @4 S Formal parameter 4.
187 053 @5 S Formal parameter 5.
188 054 @6 S Formal parameter 6.
189 055 @7 S Formal parameter 7.
190 056 @8 S Formal parameter 8.
191 057 @9 S Formal parameter 9.
192 058 @: - Illegal.
193 059 @; - Illegal.
194 060 @< S Open macro name.
195 061 @= C Set special character.
196 062 @> S Close macro name.
197 063 @? - Illegal. Reserved for future use.
198 064 @@ C Insert special character into text.
199 065 @A S New section (level 1).
200 066 @B S New section (level 2).
201 067 @C S New section (level 3).
202 068 @D S New section (level 4).
203 069 @E S New section (level 5).
204 070 @F - Illegal.
205 071 @G - Illegal.
206 072 @H - Illegal.
207 073 @I C Include file.
208 074 @J - Illegal.
209 075 @K - Illegal.
210 076 @L S Macro is library macro.
211 077 @M S Macro may be called many times.
212 078 @N - Illegal.
213 079 @O S Macro is attached to product file.
214 080 @P C Pragma.
215 081 @Q - Illegal.
216 082 @R - Illegal.
217 083 @S - Illegal.
218 084 @T C Typesetter directive.
219 085 @U - Illegal.
220 086 @V - Illegal.
221 087 @W - Illegal.
222 088 @X - Illegal.
223 089 @Y - Illegal.
224 090 @Z S Macro may be called zero times.
225 091 @[ - Illegal. Reserved for future use.
226 092 @\ - Illegal.
227 093 @] - Illegal. Reserved for future use.
228 094 @^ C Insert control character into text
229 095 @_ - Illegal.
230 096 @` - Illegal.
231 097 @a \
232 109 @m | Identical to @A..@Z.
233 122 @z /
234 123 @{ S Open macro body/Open literal directive.
235 124 @| - Illegal.
236 125 @} S Close macro body/Close literal directive.
237 126 @~ - Illegal.
238 127 to 255 - Illegal specials (as non-standard ASCII).
239 </PRE>
240
241 <P>The most important thing to remember about the scanner
242 is that <I>nothing happens unless the special character
243 is seen.</I>&nbsp; There are no funny sequences that will cause
244 strange things to happen. The best way to view a FunnelWeb
245 document at the scanner level is as a body of text
246 punctuated by special sequences that serve to structure the
247 text at a higher level.
248
249 <P>The remaining description of the scanner consists of a
250 detailed description of the effect of each complex special
251 sequence.
252
253
254 <P>
255 <TABLE WIDTH="100%">
256 <TR>
257 <TD ALIGN="left" VALIGN="bottom"><A HREF="scanner_basic.html"><IMG SRC="binary/fw_left.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Prev"></A></TD>
258 <TD ALIGN="center" VALIGN="bottom"><A HREF="scanner.html"><IMG SRC="binary/fw_up.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Up"></A></TD>
259 <TD ALIGN="right" VALIGN="bottom"><A HREF="scanner_special_set.html"><IMG SRC="binary/fw_right.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Next"></A></TD>
260 </TR>
261 </TABLE>
262
263
264
265 <P>
266 <HR>
267 <FONT SIZE="2">
268 <A HREF="mailto:[email protected]">Webmaster</A>&nbsp;&nbsp;&nbsp;
269 <A HREF="copyright.html">Copyright &copy; Ross N. Williams 1992,1999. All rights reserved.</A><BR>
270 </FONT>
271
272 </FONT>
273 </TD>
274 </TR>
275 </TABLE>
276
277
278 </FONT>
279 </BODY>
280
281 <!-- *********************************************************************** -->
282 <!-- End Of A FunnelWeb Manual Web Page (www.ross.net/funnelweb/) -->
283 <!-- *********************************************************************** -->
284
285 </HTML>