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

Pass parameters with using FLEXFIX #201

Closed Albertweiku closed 5 months ago

Albertweiku commented 5 months ago

How does reflex use the FLEXFIX argument to pass arguments to yylex like flex?

genivia-inc commented 5 months ago

Can you point to the Flex documentation that defines this FLEXFIX argument? It's not mentioned in the official Flex documentation.

Arguments passed to yylex() depend on options. The argument list can also be extended with whatever parameters you want using %option params="PARAMS" see manual and also YY_DECL alternatives

Albertweiku commented 5 months ago

I solved the problem of passing parameter values by using %option params="PARAMS", thanks.