BSD 3 development
[unix-history] / usr / doc / yacc / ssd
CommitLineData
8340f87c
BJ
1.SH
2Appendix D: Old Features Supported but not Encouraged
3.PP
4This Appendix mentions synonyms and features which are supported for historical
5continuity, but, for various reasons, are not encouraged.
6.IP 1.
7Literals may also be delimited by double quotes ``"''.
8.IP 2.
9Literals may be more than one character long.
10If all the characters are alphabetic, numeric, or \_, the type number of the literal is defined,
11just as if the literal did not have the quotes around it.
12Otherwise, it is difficult to find the value for such literals.
13.IP
14The use of multi-character literals is likely to mislead those unfamiliar with
15Yacc, since it suggests that Yacc is doing a job which must be actually done by the lexical analyzer.
16.IP 3.
17Most places where % is legal, backslash ``\e'' may be used.
18In particular, \e\e is the same as %%, \eleft the same as %left, etc.
19.IP 4.
20There are a number of other synonyms:
21.DS
22%< is the same as %left
23%> is the same as %right
24%binary and %2 are the same as %nonassoc
25%0 and %term are the same as %token
26%= is the same as %prec
27.DE
28.IP 5.
29Actions may also have the form
30.DS
31={ . . . }
32.DE
33and the curly braces can be dropped if the action is a
34single C statement.
35.IP 6.
36C code between %{ and %} used to be permitted at the
37head of the rules section, as well as in the
38declaration section.