/share/doc/psd/15.yacc/ssd

https://bitbucket.org/freebsd/freebsd-head/ · #! · 76 lines · 76 code · 0 blank · 0 comment · 0 complexity · 0be5e51468f71119e3a3ecf6294321b5 MD5 · raw file

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