Tokens to patterns?

Maury Markowitz <[email protected]> Wed, 30 Dec 2020 12:44:54 -0500
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
Early imperative languages like FORTRAN and BASIC are marked by a large number of keywords. In my bison code I have pages of %token lines for PRINT and INPUT etc, which I then replicate in my flex with something like PRINT { return PRINT; }. This seems wasteful and just the thing the system should be automating away, am I missing a way to “autoflex” my tokens?