Hi, :) I have not encountered this problem yet. but i think msbuild task - right way. As alternative - run some script before msbuild. script can does the same thing as custom tool - call ragel.exe + scaned params + file. or scan directories for .rl files, scan file for command line params and call ragel.
Best regards, Denis Naumov. 2011/3/25 Shawn Hoover <[email protected]>: > Hi Denis, > I also made a Ragel custom code generator recently. It also suffered the > parameters issue, of course, but I mainly stopped using it because it > doesn't work from command line builds, only in VS. Do you have a way around > that? I changed to a prebuild event instead and just type out all the > parameters there and each ragel file manually. Unfortunately that runs for > every build instead of just when the .rl file changes. Now I'm working on > developing an msbuild task that can be used in .csproj the same way Compile > appears there. > Shawn > > On Fri, Mar 25, 2011 at 2:38 AM, Denis Naumov <[email protected]> > wrote: >> >> Thanks :) >> >> I know about .rules files. but this is a little not what I need. >> It's not problem to setup project options after project creation. >> But... >> >> before ragel i used re2c compiler and there was in-file-options like >> /*!re2c >> re2c:yyfill:enable = 1; >> re2c:yyfill:check = 1; >> ... >> >> */ >> >> and before re2c i used flex. Flex has in-file scanner options like >> %option 8bit reentrant bison-bridge >> %option warn nodefault >> %option yylineno >> %option outfile="scanner.c" header-file="scanner.h" >> >> >> For my developing i use VisualStudio .NET/2008/2010 and C++/C#. >> >> build .rules file - used in VS.NET/2008, but VS 2010 - not work with >> this. 2010 have .target files for this. >> and this all - only for C/C++. In C# projects there is no .rules files at >> all. >> For C# projects VS use "Custom tool" - for code generators. I write >> custom tool extention for VS to call ragel, but command line options - >> it's problem. >> There is no simple way to pass command line options to ragel. >> Now my custom tool read comment like this: >> // BUILD-COMMAND-LINE: -L -A >> from first string of rl file and pass it to ragel. >> >> In this all situations - simplest universal way to save options for >> various projects - save them in rl file (IMHO). >> like re2c or flex. Something like >> %%option name = value; >> And - this options is simple to change from IDE while writing file. >> Just change text in file rather than clicks for menu and dialog boxes >> every time. >> >> If the same option set from rl file and from command line - option >> value from command line have max priority or vice versa. >> >> Ragel have %%alphtype ... %%variable ... and other commands. I think >> it's not so difficult to add %% option name=value; command for command >> line options. >> >> it's all my IMHO. :) >> >> Best regards, >> Denis Naumov. >> >> PS: Sprry for bad english. :) >> >> 2011/3/24 <[email protected]>: >> > Whoops---I probably deleted part of a sentence shortly before I hit the >> > send >> > button... >> > >> > ... >> > The build chain is just a little bit longer. Due to the mapping betwen >> > the >> > suffix .rl to the rules, Ragel now looks almost like a VisualStudio >> > tool. >> > >> > jg >> > >> > _______________________________________________ >> > ragel-users mailing list >> > [email protected] >> > http://www.complang.org/mailman/listinfo/ragel-users >> > >> >> _______________________________________________ >> ragel-users mailing list >> [email protected] >> http://www.complang.org/mailman/listinfo/ragel-users > > > _______________________________________________ > ragel-users mailing list > [email protected] > http://www.complang.org/mailman/listinfo/ragel-users > _______________________________________________ ragel-users mailing list [email protected] http://www.complang.org/mailman/listinfo/ragel-users
