pyacc.1 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. .TH pyacc 1 "19 Jan 2000" "Free Pascal" "Pascal parser generator"
  2. .SH NAME
  3. pyacc \- Pascal Yacc compiler compiler.
  4. .SH USAGE
  5. .B yacc [options] yacc-file[.y] [output-file[.pas]]
  6. SH OPTIONS
  7. .TP
  8. .B -v
  9. .I Verbose:
  10. Pascal Yacc generates a readable description of the generated
  11. parser, written to yacc-file with new extension
  12. .I .lst.
  13. .TP
  14. .B -d
  15. .I Debug:
  16. TP Yacc generates a parser with debugging output.
  17. .SH DESCRIPTION
  18. .B TP Yacc
  19. is a program that lets you prepare parsers from the description
  20. of input languages by BNF-like grammars. You simply specify the grammar
  21. for your target language, augmented with the Turbo Pascal code necessary
  22. to process the syntactic constructs, and TP Yacc translates your grammar
  23. into the Turbo Pascal code for a corresponding parser subroutine named
  24. yyparse.
  25. TP Yacc parses the source grammar contained in yacc-file (with default
  26. suffix .y) and writes the constructed parser subroutine to the specified
  27. output-file (with default suffix .pas); if no output file is specified,
  28. output goes to yacc-file with new suffix .pas. If any errors are found
  29. during compilation, error messages are written to the list file (yacc-file
  30. with new suffix .lst).
  31. The generated parser routine, yyparse, is declared as:
  32. function yyparse : Integer;
  33. This routine may be called by your main program to execute the parser.
  34. The return value of the yyparse routine denotes success or failure of
  35. the parser (possible return values: 0 = success, 1 = unrecoverable syntax
  36. error or parse stack overflow).
  37. Similar to TP Lex, the code template for the yyparse routine may be found in
  38. the yyparse.cod file. The rules for locating this file are analogous to those
  39. of TP Lex (see Section `TP Lex').
  40. The TP Yacc library (YaccLib) unit is required by programs using Yacc-
  41. generated parsers; you will therefore have to put an appropriate uses clause
  42. into your program or unit that contains the parser routine. The YaccLib unit
  43. also provides some routines which may be used to control the actions of the
  44. parser. See the file yacclib.pas for further information.
  45. .SH More information
  46. For more information, see the documentation that comes with TP lex and yacc.
  47. .SH AUTHOR
  48. Albert Graeff (<[email protected]>, <[email protected]>)
  49. .SH SEE ALSO
  50. .BR ppc386 (1)
  51. .BR plex (1)