[ragel-users] ragel didn't rename data variable for C# code.

Denis Naumov alexander.me at gmail.com
Thu Mar 24 09:21:17 UTC 2011

Hi Adrian,

A week ago i start ragel and found that it is a very usefull tool.

I use it for generate C and C# code (from Microsoft Visual Studio).

it seems that ragel didn't rename data variable for C# code.

            %% variable  data   _ctx.data;
            %% variable  p        _ctx.current;
            %% variable  pe      _ctx.end;

code will:

  ...  if ( data[(      _ctx.current)] < _test_trans_keys[_mid] ) ...

Also i have some feature request:
Sometime it would be very convenient to set options in rl file rathe
than command line.
something like:
   %% option lang = C#                         (in addition to -C, -A ...)

   %% option line  = on/off/1/0/yes/no   (-L)

   %% option minimization = off/end/most/every   (-n/-m/-l/-e)

   %% option mode = table/table1/flat/flat1/goto/goto1 ...  (-T0/-T1...)

   %% option output = "<filename>"  (-o <filename>)

   %% option error = gnu/msvc ...

to change this from IDE more convenient than change project settings.
This can be alternative way to set options and options from command
line (if set) will have max priority.

Mode for option -o <filename>.
-o -  (-o "-") - for output generated code into stdout.
This usefull for VS custom tool (custom code generator extention for
Now i create temp file for output - read it to std-stream and delete
temp file to work around this.

Best regards,
Denis Naumov.

PS: sorry for my english :)

ragel-users mailing list
ragel-users at complang.org

More information about the ragel-users mailing list