summaryrefslogtreecommitdiff
path: root/usr.bin/yacc/PSD.doc/ssd
blob: 8c2371f990fae8f3aa4325e7090601bc0555219c (plain)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.\"	$OpenBSD: ssd,v 1.1 2002/12/03 21:36:35 mickey Exp $
.\"
.\" Copyright (C) Caldera International Inc.  2001-2002.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code and documentation must retain the above
.\"    copyright notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed or owned by Caldera
.\"	International, Inc.
.\" 4. Neither the name of Caldera International, Inc. nor the names of other
.\"    contributors may be used to endorse or promote products derived from
.\"    this software without specific prior written permission.
.\"
.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
.\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT,
.\" INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.\"	@(#)ssd	8.1 (Berkeley) 6/8/93
.\"
.SH
Appendix D: Old Features Supported but not Encouraged
.PP
This Appendix mentions synonyms and features which are supported for historical
continuity, but, for various reasons, are not encouraged.
.IP 1.
Literals may also be delimited by double quotes ``"''.
.IP 2.
Literals may be more than one character long.
If all the characters are alphabetic, numeric, or \_, the type number of the literal is defined,
just as if the literal did not have the quotes around it.
Otherwise, it is difficult to find the value for such literals.
.IP
The use of multi-character literals is likely to mislead those unfamiliar with
Yacc, since it suggests that Yacc is doing a job which must be actually done by the lexical analyzer.
.IP 3.
Most places where % is legal, backslash ``\e'' may be used.
In particular, \e\e is the same as %%, \eleft the same as %left, etc.
.IP 4.
There are a number of other synonyms:
.DS
%< is the same as %left
%> is the same as %right
%binary and %2 are the same as %nonassoc
%0 and %term are the same as %token
%= is the same as %prec
.DE
.IP 5.
Actions may also have the form
.DS
={ . . . }
.DE
and the curly braces can be dropped if the action is a
single C statement.
.IP 6.
C code between %{ and %} used to be permitted at the
head of the rules section, as well as in the
declaration section.