mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
Currently this example crashes on input such as "T (x) + y;". The same example with glr.c works properly. * examples/c++/glr/Makefile, examples/c++/glr/README.md, * examples/c++/glr/c++-types.test, examples/c++/glr/c++-types.yy, * examples/c++/glr/local.mk, examples/c++/local.mk: New. Based on examples/c/glr/c++-types.y.
29 lines
653 B
Makefile
29 lines
653 B
Makefile
# This Makefile is designed to be simple and readable. It does not
|
|
# aim at portability. It requires GNU Make.
|
|
|
|
BASE = c++-types
|
|
BISON = bison
|
|
XSLTPROC = xsltproc
|
|
|
|
all: $(BASE)
|
|
|
|
%.c %.h %.xml %.gv: %.y
|
|
$(BISON) $(BISONFLAGS) --defines --xml --graph=$*.gv -o $*.c $<
|
|
|
|
$(BASE): $(BASE).o
|
|
$(CC) $(CFLAGS) -o $@ $^
|
|
|
|
run: $(BASE)
|
|
@echo "Type C++ declarations or expressions. Quit with ctrl-d."
|
|
./$<
|
|
|
|
html: $(BASE).html
|
|
%.html: %.xml
|
|
$(XSLTPROC) $(XSLTPROCFLAGS) -o $@ $$($(BISON) --print-datadir)/xslt/xml2xhtml.xsl $<
|
|
|
|
CLEANFILES = \
|
|
$(BASE) *.o $(BASE).[ch] $(BASE).output $(BASE).xml $(BASE).html $(BASE).gv
|
|
|
|
clean:
|
|
rm -f $(CLEANFILES)
|