Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using --stdout and --full option does not output reflex_code_INITIAL #185

Closed
haihuayang opened this issue Jul 3, 2023 · 2 comments
Closed
Labels
enhancement New feature or request problem Something isn't working right due to a (minor) problem

Comments

@haihuayang
Copy link

Hi,
when I use both --stdout --full option to generate the lexer, reflex does not output reflex_code_INITIAL. it looks like in function Pattern::assemble opt_f is empty when using --stdout option.
if (!opt_.f.empty())
{
if (opt_.o)
gencode_dfa(start);
else
export_code();
}

is it by design or a bug?

Thanks,

@genivia-inc
Copy link
Member

There is no filename to save the source to, so it won't generate the source.

In other parts of the code there is a check for stdout.<extension> to generate the code. The <extension> determines what type of source to save. So it is potentially possible, but not done in the reflex tool. I don't remember the details why I could not get this done. But clearly this is not trivial, since there is also this code that checks if option --stdout is not used (options["stdout"].empty()) to generate the tables:

  if (options["matcher"].empty() && (!options["full"].empty() || !options["fast"].empty()) && options["tables_file"].empty() && options["stdout"].empty())
    write_banner("TABLES");

@genivia-inc genivia-inc added enhancement New feature or request problem Something isn't working right due to a (minor) problem labels Jul 6, 2023
@genivia-inc
Copy link
Member

This should be working now with the upcoming update v3.3.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request problem Something isn't working right due to a (minor) problem
Projects
None yet
Development

No branches or pull requests

2 participants