Menu

Ruleset (*.targets/*.props) support for Visual Studio 2010 and later?

Michael
2014-03-23
2014-03-27
  • Michael

    Michael - 2014-03-23

    Following this article on MSDN, you can download an outdated FlexBison.rules file (includes sample project vccustombr), which works great for Visual Studio versions up to 2008. I have also successfully found an in-depth, step-by-step tutorial on using win_flex and win_bison specifically, but this proves to be more difficult for any version beyond VS2008...

    This is because, as discussed here, custom rules have changed to require a set of 2 to 3 files: XML, props and targets...
    Trying to upgrade from FlexBison.rules to these files using the built-in migration tools appears to be very specific to the inner-workings of the command-line tools they are associated with. In the case of upgrading the VS2008 sample project vccustombr to VS2012, it does in fact upgrade these rules files too -- but only for specific GNU bison and flex command-line flags, and not all the ones provided by win_flex and win_bison (most importantly, the --wincompat option). Also, without the target and props ruleset files, this would appear to remain specific to that sample project only (which is of no use to any new project created in later versions of MSVC)...

    It would be incredibly useful if the necessary ruleset files for VS2010 and above came either in the same winbisonflex package, or as a separate optional download (and that they included the complete list of command-line flags within the ruleset). This would enable developers to flawlessly use winflexbison as a fully integrated Visual Studio tool. All lexer and parser input files could be added and edited directly in the IDE, and would automatically be run through their respective command-line counterparts during build time, with the output shown in the IDE and the output files automatically placed within and linked to the project.

    Is there any hope that this could be supported in the future?

     

    Last edit: Michael 2014-03-23
  • Alex Zhondin

    Alex Zhondin - 2014-03-24

    Hi Michael!
    Thank you for such detailed and clear question. I agree with you it will be very useful to have such VS rulesets in the package. I will investigate this and update package ASAP.

    P.S. Thank you for links.

     
  • Alex Zhondin

    Alex Zhondin - 2014-03-26

    Hi Michael!
    I've added winflexbison_cusom_build.zip archive to Files section. Please check if it's that you expect to have. Especially "default" options for win_flex and win_bison tools.

    Any suggestions and comments are welcome.

     
  • Alex Zhondin

    Alex Zhondin - 2014-03-27

    I've added wiki page to explain Custom Build Rules.

     

Log in to post a comment.