home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / doc / yacc / ssd < prev   
Encoding:
Text File  |  1979-01-10  |  1.3 KB  |  39 lines

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