MAN page from RedHat EL 8 fpc-3.2.0-1.el8.x86_64.rpm
pyacc
Section: Pascal parser generator (1)
Updated: 19 Jan 2000
Index NAME
pyacc - Pascal Yacc compiler compiler.
USAGE
yacc [options] yacc-file[.y] [output-file[.pas]]
SH OPTIONS
- -v
- Verbose:Pascal Yacc generates a readable description of the generatedparser, written to yacc-file with new extension .lst.
- -d
- Debug:TP Yacc generates a parser with debugging output.
DESCRIPTION
TP Yaccis a program that lets you prepare parsers from the descriptionof input languages by BNF-like grammars. You simply specify the grammarfor your target language, augmented with the Turbo Pascal code necessaryto process the syntactic constructs, and TP Yacc translates your grammarinto the Turbo Pascal code for a corresponding parser subroutine namedyyparse.
TP Yacc parses the source grammar contained in yacc-file (with defaultsuffix .y) and writes the constructed parser subroutine to the specifiedoutput-file (with default suffix .pas); if no output file is specified,output goes to yacc-file with new suffix .pas. If any errors are foundduring compilation, error messages are written to the list file (yacc-filewith new suffix .lst).
The generated parser routine, yyparse, is declared as:
function yyparse : Integer;
This routine may be called by your main program to execute the parser.The return value of the yyparse routine denotes success or failure ofthe parser (possible return values: 0 = success, 1 = unrecoverable syntaxerror or parse stack overflow).
Similar to TP Lex, the code template for the yyparse routine may be found inthe yyparse.cod file. The rules for locating this file are analogous to thoseof TP Lex (see Section `TP Lex').
The TP Yacc library (YaccLib) unit is required by programs using Yacc-generated parsers; you will therefore have to put an appropriate uses clauseinto your program or unit that contains the parser routine. The YaccLib unitalso provides some routines which may be used to control the actions of theparser. See the file yacclib.pas for further information.
More information
For more information, see the documentation that comes with TP lex and yacc.
AUTHOR
Albert Graeff (<
ag@muwiinfa.geschichte.uni-mainz.de>, <Dr.GraefAATTt-online.de>)
SEE ALSO
ppc386(1)
plex(1)
Index
- NAME
- USAGE
- DESCRIPTION
- More information
- AUTHOR
- SEE ALSO
This document was created byman2html,using the manual pages.