Genivia / RE-flex

A high-performance C++ regex library and lexical analyzer generator with Unicode support. Extends Flex++ with Unicode support, indent/dedent anchors, lazy quantifiers, functions for lex and syntax error reporting and more. Seamlessly integrates with Bison and other parsers.
https://www.genivia.com/doc/reflex/html
BSD 3-Clause "New" or "Revised" License
504 stars 85 forks source link

Setting up a project that uses a lexer is a bit complicated #186

Closed butlerem01 closed 1 year ago

butlerem01 commented 1 year ago

Every time I set up a C++ project that uses this lexer I have to add one or more of the .cpp files in Reflex's lib directory to my project. Not knowing what I should add or what I shouldn't, I just add all the .cpp files to my project. But it seems excessive. Does it really have to be like this? With Flex, I only need to add the main Flex directory as an include directory so FlexLexer.h can be included, but with Reflex it produces all these dependencies for my project.

genivia-inc commented 1 year ago

The lib/libreflex library has everything. The lib/libreflexmin library is minimized with only the essentials. See the reflex/doc/index.html or visit the manual and read section Minimized library and cross compiling and The RE/flex regex library.

You can build everything from source too, which may require all C++ files in reflex/lib to be compiled, but there aren't that many IMO:

image