0

I upgraded to MacOS High Sierra and Xcode 9, and now when I run flex (lex / lexical analyzer), it gives no output.

Why, and how can I fix it?

eg, flex -t testfile.lex gives no output (for any valid file). If I change the file so there's an error in it, I will get the error message. Running flex on that same file worked fine on MacOS Sierra and Xcode 8.

Anon
  • 3

1 Answers1

1

I had the same symptoms. In my case it was a broken install of m4 (left behind by macports, and ahead of the system m4 in my PATH). flex calls m4 behind the scenes. If m4 crashes without output, flex will just exit without an error message.

See if calling m4 from the command line works. If not, there's your culprit.

user873687
  • 26
  • 1