mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
examples: bistromathic: don't use Flex
This example will soon use GNU readline, so its scanner should be easy to use (concurrently) on strings, not streams. This is not a place where Flex shines, and anyway, these are examples of Bison, not Flex. There's already lexcalc and reccalc that demonstrate the use of Flex. * examples/c/bistromathic/scan.l: Remove. * examples/c/bistromathic/parse.y (yylex): New. Adjust dependencies.
This commit is contained in:
@@ -19,18 +19,16 @@ bistromathicdir = $(docdir)/%D%
|
||||
## Bistromathics. ##
|
||||
## --------------- ##
|
||||
|
||||
if FLEX_WORKS
|
||||
check_PROGRAMS += %D%/bistromathic
|
||||
TESTS += %D%/bistromathic.test
|
||||
EXTRA_DIST += %D%/bistromathic.test
|
||||
nodist_%C%_bistromathic_SOURCES = %D%/parse.y %D%/parse.h %D%/scan.l
|
||||
%D%/calc.c: $(dependencies)
|
||||
check_PROGRAMS += %D%/bistromathic
|
||||
TESTS += %D%/bistromathic.test
|
||||
EXTRA_DIST += %D%/bistromathic.test
|
||||
nodist_%C%_bistromathic_SOURCES = %D%/parse.y %D%/parse.h
|
||||
%D%/calc.c: $(dependencies)
|
||||
|
||||
# Don't use gnulib's system headers.
|
||||
%C%_bistromathic_CPPFLAGS = -I$(top_srcdir)/%D% -I$(top_builddir)/%D%
|
||||
%C%_bistromathic_LDADD = -lm
|
||||
endif FLEX_WORKS
|
||||
# Don't use gnulib's system headers.
|
||||
%C%_bistromathic_CPPFLAGS = -I$(top_srcdir)/%D% -I$(top_builddir)/%D%
|
||||
%C%_bistromathic_LDADD = -lm
|
||||
|
||||
dist_bistromathic_DATA = %D%/parse.y %D%/scan.l %D%/Makefile %D%/README.md
|
||||
CLEANFILES += %D%/parse.[ch] %D%/scan.c %D%/parse.output
|
||||
dist_bistromathic_DATA = %D%/parse.y %D%/Makefile %D%/README.md
|
||||
CLEANFILES += %D%/parse.[ch] %D%/parse.output
|
||||
CLEANDIRS += %D%/*.dSYM
|
||||
|
||||
Reference in New Issue
Block a user