The calc++ example uses flex in Makefile, which generates a C file, instead of flex++, which generates cpp files. Although scanner.ll may contain C++ code, flex treats it as a C program.

What the example shows is how to connect a Bison C++ program to a Flex C program, not a Bison C++ program to a Flex C++ program. In this sense the description in the Bison 3.8.1  manual is misleading and the text should be changed to reflect what the true issues are.

By-the-by, changing FLEX=flex to FLEX=flex++ produces a linkable file with errors and not calc++.exe file.


Reply via email to