home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / doc / yacc / ss.. next >
Encoding:
Text File  |  1979-01-10  |  1.8 KB  |  53 lines

  1. .RP
  2. .ND "July 31, 1978"
  3. .TL
  4. Yacc:
  5. Yet Another Compiler-Compiler
  6. .AU "MH 2C-559" 3968
  7. Stephen C. Johnson
  8. .AI
  9. .MH
  10. .AB
  11. .PP
  12. Computer program input generally has some structure;
  13. in fact, every computer program that does input can be thought of as defining
  14. an ``input language'' which it accepts.
  15. An input language may be as complex as a programming language, or as simple as
  16. a sequence of numbers.
  17. Unfortunately, usual input facilities
  18. are limited, difficult to use,
  19. and often are lax about checking their inputs for validity.
  20. .PP
  21. Yacc provides a general tool for describing
  22. the input to a computer program.
  23. The Yacc user specifies the structures
  24. of his input, together with code to be invoked as
  25. each such structure is recognized.
  26. Yacc turns such a specification into a subroutine that
  27. handles the input process;
  28. frequently, it is convenient and appropriate to have most
  29. of the flow of control in the user's application
  30. handled by this subroutine.
  31. .PP
  32. The input subroutine produced by Yacc calls a user-supplied routine to
  33. return the next basic input item.
  34. Thus, the user can specify his input in terms of individual input characters, or
  35. in terms of higher level constructs such as names and numbers.
  36. The user-supplied routine may also handle idiomatic features such as
  37. comment and continuation conventions, which typically defy easy grammatical specification.
  38. .PP
  39. Yacc is written in portable C.
  40. The class of specifications accepted is a very general one: LALR(1)
  41. grammars with disambiguating rules.
  42. .PP
  43. In addition to compilers for C, APL, Pascal, RATFOR, etc., Yacc
  44. has also been used for less conventional languages,
  45. including a phototypesetter language, several desk calculator languages, a document retrieval system,
  46. and a Fortran debugging system.
  47. .AE
  48. .OK
  49. Computer Languages
  50. Compilers
  51. Formal Language Theory
  52. .CS 23 11 34 0 0 8
  53.