home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / doc / yacc / ssb < prev    next >
Encoding:
Text File  |  1975-06-26  |  1.0 KB  |  44 lines

  1. .SH
  2. Appendix B: Use of Yacc on Unix
  3. .PP
  4. Suppose that the Yacc specification is on a file called
  5. yfile.
  6. If the actions are in C, Yacc is invoked by
  7. .DS
  8. yacc yfile
  9. .DE
  10. The output appears on file y.tab.c 
  11. To compile the parser and load it with
  12. the Yacc library, use the command
  13. .DS
  14. cc y.tab.c \-ly
  15. .DE
  16. If Yacc is invoked with the option \-v:
  17. .DS
  18. yacc \-v yfile
  19. .DE
  20. a verbose description of the parser is produced on file y.output.
  21. The C user should consult section
  22. 6C for more information about the run time environment.
  23. .PP
  24. If the actions are in Ratfor,
  25. the user should invoke Yacc with the option \-r:
  26. .DS
  27. yacc \-r yfile
  28. .DE
  29. The Ratfor output appears on file y.tab.r 
  30. It may be compiled by
  31. .DS
  32. rc \-2 y.tab.r
  33. .DE
  34. Note that when Yacc is used to produce Ratfor
  35. programs, there is no need to load these programs with any library.
  36. .PP
  37. If the \-v action is also invoked:
  38. .DS
  39. yacc \-rv yfile
  40. .DE
  41. a verbose description of the parser is produced on file y.output.
  42. The Ratfor user should consult section 6R for more information about
  43. the run time environment.
  44.