home *** CD-ROM | disk | FTP | other *** search
-
- # Lex and Yacc examples makefile V0.0 2-23-89, V0.1 11-21-89 AG,
- # V0.2 1-14-90 AG.
- # This makefile, when run through Borland's make, generates the executable
- # (.EXE) files for the sample Lex and Yacc applications on the distribution
- # disk, provided that the Turbo Pascal compiler, Lex and Yacc have been
- # installed properly.
- # The command line driven Turbo Pascal compiler, tpc.exe, as well as yacc.exe
- # and lex.exe must either be in the current directory, or in some directory
- # on the DOS PATH, before make is run.
- # Sample Lex programs:
- # - CREF.L: a cross reference utility for Turbo Pascal programs
- # - DIGRAM.L: produces digram tables
- # - FINDPROC.L: finds function and procedure headings in multiple Turbo
- # Pascal source files
- # - LENGS.L: counts word lengths in input file
- # - STRIP.L: strips whitespace from input file
- # - TABLE.L: demonstration of character tables (%T) in Lex programs
- # Sample Yacc programs:
- # - EXPR.Y: a simple arithmetic expression calculator
- # - EXPRLEX.L: Lex source of the lexical analyzer for EXPR.Y
- # - PAS.Y: Yacc source for complete ISO Level 0 Pascal parser
- # - PASLEX.L: Lex source of the lexical analyzer for PAS.Y
- # To compile all examples (except the Pascal parser), simply issue the
- # command `make'. To compile all examples (including the Pascal parser),
- # issue the command `make all'; note that the Pascal parser will take
- # quite a while and will require 640 KB RAM to be compiled (if you
- # don't have that much main memory, run yacc on pas.y manually, and then
- # execute `make all').
- # To generate a particular example, specify that program as an argument
- # to make, e.g. `make pas.exe'.
-
- examples: cref.exe digram.exe expr.exe findproc.exe lengs.exe\
- strip.exe table.exe
- all: cref.exe digram.exe expr.exe findproc.exe lengs.exe\
- pas.exe strip.exe table.exe
- .pas.exe:
- tpc $* /m
- .l.pas:
- lex $*
- .y.pas:
- yacc $*
- cref.exe: cref.pas
- digram.exe: digram.pas
- expr.exe: expr.pas exprlex.pas
- findproc.exe: findproc.pas
- lengs.exe: lengs.pas
- pas.exe: pas.pas paslex.pas
- strip.exe: strip.pas
- table.exe: table.pas