mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
examples: add a simple infix calculator in C
Currently we have no simple example: rpcalc in reverse Polish, mfcalc has functions, and lexcalc is using lex. * examples/c/calc/Makefile, examples/c/calc/calc.y, * examples/c/calc/calc.test, examples/c/calc/local.mk: New.
This commit is contained in:
@@ -15,7 +15,7 @@ all: $(BASE)
|
||||
$(FLEX) $(FLEXFLAGS) -o$@ $<
|
||||
|
||||
scan.o: parse.h
|
||||
lexcalc: parse.o scan.o
|
||||
$(BASE): parse.o scan.o
|
||||
$(CC) $(CFLAGS) -o $@ $^
|
||||
|
||||
run: $(BASE)
|
||||
|
||||
Reference in New Issue
Block a user