[ragel-users] Splitting common definitions and actions implementation
thurs... at cs.queensu.ca
Mon Mar 31 16:45:19 UTC 2008
Here's an example of this minus the state references in actions.
The java and c .rl files define actions and then include the common.rl,
which contains all the machine definitions. You don't need to worry
about circular dependencies since references to states are resolved
after all the input (including all included files) is read in.
Martin Pirker wrote:
> Hello ragel-users...
> I was pondering, if I want to use the same Ragel machine with different
> language backends, how would it be possible to seperate common logic
> from language dependent action implementation.
> E.g., I have a core.rl file with the bulk of common logic and I want a
> c.rl and java.rl file which "include core.rl".
> In core I need to reference actions which are not defined there, in the
> language dependent files I need to reference constants/states of the
> common logic.
> Do I have to duplicate common definitions if I want to develop two
> language implementations simultaneously, or am I missing a way to
> workaround this circular dependency problem?
> PS: Did anybody read the ~500 lines of Google Terms of Service to create a
> Google account, just to be able to join this list/group to ask a question? :-/
More information about the ragel-users