1pyacc(1)                    Pascal parser generator                   pyacc(1)
2
3
4

NAME

6       pyacc - Pascal Yacc compiler compiler.
7
8
9

USAGE

11       yacc [options] yacc-file[.y] [output-file[.pas]]
12
13
14       SH OPTIONS
15
16
17       -v     Verbose:  Pascal  Yacc  generates  a readable description of the
18              generated parser, written to yacc-file with new extension .lst.
19
20       -d     Debug: TP Yacc generates a parser with debugging output.
21
22

DESCRIPTION

24       TP Yacc is a program that lets you prepare parsers from the description
25       of input languages by BNF-like grammars. You simply specify the grammar
26       for your target language, augmented with the Turbo Pascal  code  neces‐
27       sary  to  process the syntactic constructs, and TP Yacc translates your
28       grammar into the Turbo Pascal code for a corresponding  parser  subrou‐
29       tine named yyparse.
30
31       TP  Yacc parses the source grammar contained in yacc-file (with default
32       suffix .y) and writes the constructed parser subroutine to  the  speci‐
33       fied output-file (with default suffix .pas); if no output file is spec‐
34       ified, output goes to yacc-file with new suffix .pas. If any errors are
35       found  during  compilation, error messages are written to the list file
36       (yacc-file with new suffix .lst).
37
38       The generated parser routine, yyparse, is declared as:
39
40          function yyparse : Integer;
41
42       This routine may be called by your main program to execute the  parser.
43       The  return  value of the yyparse routine denotes success or failure of
44       the parser (possible return values: 0 = success, 1 = unrecoverable syn‐
45       tax error or parse stack overflow).
46
47       Similar  to  TP  Lex,  the code template for the yyparse routine may be
48       found in the yyparse.cod file. The rules for  locating  this  file  are
49       analogous to those of TP Lex (see Section `TP Lex').
50
51       The  TP Yacc library (YaccLib) unit is required by programs using Yacc-
52       generated parsers; you will therefore have to put an  appropriate  uses
53       clause  into your program or unit that contains the parser routine. The
54       YaccLib unit also provides some routines which may be used  to  control
55       the  actions of the parser. See the file yacclib.pas for further infor‐
56       mation.
57
58
59

More information

61       For more information, see the documentation that comes with TP lex  and
62       yacc.
63
64

AUTHOR

66       Albert   Graeff   (<ag@muwiinfa.geschichte.uni-mainz.de>,  <Dr.Graef@t-
67       online.de>)
68
69

SEE ALSO

71       ppc386(1) plex(1)
72
73
74
75Free Pascal                       19 Jan 2000                         pyacc(1)
Impressum