[ragel-users] access prefix
brian at brimworks.com
Tue Apr 26 04:02:24 UTC 2011
If it makes a difference, I actually keep p, pe, and eof in my
"struct" for managing ragel state, so if %access defined a prefix for
*all* state variables, then it would be a welcome change from my
Although Adrian is right about p, pe, and eof being rather
"transient", I find it easier to write functions that take a single
"struct" argument that manages the ragel state. This way I can write
a function called state_machine that encapsulates all my actions for
the state machine, but ends up delegating each action to a function
that takes the "struct" as an argument. I just find this way of
writing code is easier for me and my editor to digest.
On Mon, Apr 25, 2011 at 9:06 AM, Adrian Thurston <thurston at complang.org> wrote:
> The p, pe, and eof variables are not modified because they do not need to be
> maintained across partial executions of state machines. They are normally
> declared as local variables in the function that contains the write exec.
> The cs variable should be modified. If you are finding it isn't for some
> language, then that would definitely be a bug.
> On 11-04-25 12:37 AM, ygrek wrote:
>> Is there any reason why %access defines prefix for all state variables
>> except some (p,pe,cs,eof)?
>> I think it would be useful to specify prefix for all state variables (and
>> then override some variables if
>> needed with individual %variable declarations).
> Dr. Adrian D. Thurston
> ragel-users mailing list
> ragel-users at complang.org
Brian Maher >> Glory to God <<
ragel-users mailing list
ragel-users at complang.org
More information about the ragel-users