For the purposes of code modularization, it would be very desirable to
be able to do two things:
- redefine (override) machine definitions
- attach actions to definitions separately from their original
definition and without overriding said original definition

Supposing that the former would be implemented such that a
redefinition could reference its previous definition, the latter is
natural; e.g.

%%{
  machine ex;

  action from_a {
    printf("got an A\n");
  }

  a = ('a');
  a = (super | 'A') %from_a;
}%%

Perhaps this is a more moderate proposal to
http://www.complang.org/pipermail/ragel-users/2008-July/001960.html
which would solve some of the same problems. It is also pretty nice
for being able to modularize your Ragel machines out of your code,
providing the base machine separately and overriding parts piecemeal
or attaching transition actions to your code as necessary.

k

_______________________________________________
ragel-users mailing list
ragel-users@complang.org
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to