westes / flex

The Fast Lexical Analyzer - scanner generator for lexing in C and C++
Other
3.61k stars 537 forks source link

Call `input` rather than `yyinput` in src/scan.l: #544

Closed burke closed 1 year ago

burke commented 2 years ago

This allows the stage1 build to succeed even when using a currently-released (2.6.4) version of Flex.

Open to suggestions of how this could be done better if calling the legacy name is undersirable.

Mightyjo commented 2 years ago

What's your build environment where this was failing? It works as is in our CI/CD build.

burke commented 2 years ago

I'm on macOS, and observed this behaviour with both flex 2.6.4 Apple(flex-34) at /usr/bin/flex and flex 2.6.4 from Homebrew.

Mightyjo commented 2 years ago

Copy that, and thanks! Haven't been able to test on macOS for a while. (Although I think I saw it was back in GH Actions, so maybe soon.)

Explorer09 commented 2 years ago

I don't see it's a good idea if we call the old API without some kind of version check. By the way, it's the commit dad680611b8373cac2e5dc60e7552535bded79c2 that deprecated input() due to its name collision in C++ mode.

Explorer09 commented 1 year ago

Why close this PR? Does the issue no longer exist or is it something else?