examples: calc++: a Makefile and a README

* examples/calc++/Makefile, examples/calc++/README: New.
* examples/calc++/local.mk: Ship and install them.
* doc/bison.texi: Formatting changes.
This commit is contained in:
Akim Demaille
2018-08-25 08:04:37 +02:00
parent 280c40a350
commit de64159e7f
6 changed files with 97 additions and 18 deletions

27
examples/calc++/Makefile Normal file
View File

@@ -0,0 +1,27 @@
# This Makefile is designed to be simple and readable. It does not
# aim at portability. It requires GNU Make.
BISON = bison
CXX = g++
FLEX = flex
all: calc++
%.cc %.hh: %.yy
$(BISON) $(BISONFLAGS) -o $*.cc $<
%.cc: %.ll
$(FLEX) $(FLEXFLAGS) -o$@ $<
%.o: %.cc
$(CXX) $(CXXFLAGS) -c -o$@ $<
calc++: calc++.o driver.o parser.o scanner.o
$(CXX) -o $@ $^
calc++.o: parser.hh
parser.o: parser.hh
scanner.o: parser.hh
clean:
rm -f calc++ *.o parser.hh parser.cc scanner.cc