bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calc++ example


From: slipbits
Subject: Calc++ example
Date: Fri, 16 Jun 2023 12:10:51 -0700
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2

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

[Prev in Thread] Current Thread [Next in Thread]