re2c icon indicating copy to clipboard operation
re2c copied to clipboard

Feature request: Need re2c:flags:no-generation-date config option

Open Durimar opened this issue 6 years ago • 1 comments

Hello.

I found that for some usefull command line options there is no configuration with re2c : flags : *** API.

--no-generation-date => need re2c:flags:no-generation-date = 1/0;
--no-version => need re2c:flags:no-version = 1/0;

May be some other options (i didn't check all options)

Thanks.

Durimar avatar Apr 17 '18 13:04 Durimar

The reason why these options (and some others) were not added as configurations is because they only make sense for the entire file, not for each particular re2c block. It's not clear what should happen in a case like this:

/*!re2c
    re2c:flags:no-generation-date = 1;
*/
...
/*!re2c
    re2c:flags:no-generation-date = 0;
*/

On one hand, we can say that the latest configuration overrides all the previous ones, and in that case the date must be generated. On the other hand, date logically belongs to the program start, so it makes sense to pick the option from the first re2c block.

Once we agree on the right behavior, implementing the configurations should not be that hard.

skvadrik avatar Apr 18 '18 19:04 skvadrik