P
Philipp Hofmann
Hi,
I've been trying to generate ruby with ragel. But the generated code
is complaing about undefined local variables
Here an excerpt of the generated code:
class MyParser
# more generated code here ...
class << self
attr_accessor :mymachine_start
end
# and here ...
def parse(input)
# ...
begin
cs = mymachine_start
end
# ...
end
end
If I prepend 'type.', which is deprecated, I know, it works for this
case. But there are other accessor that are being set private, e. g.
attr_accessor :_mymachine_trans_actions_wi
private :_mymachine_trans_actions_wi, :_mymachine_trans_actions_wi=
How is this mean to work?
And why isn't an accessor set at class level not accessible from within
an instance of this class in the first place?
g phil
I've been trying to generate ruby with ragel. But the generated code
is complaing about undefined local variables
Here an excerpt of the generated code:
class MyParser
# more generated code here ...
class << self
attr_accessor :mymachine_start
end
# and here ...
def parse(input)
# ...
begin
cs = mymachine_start
end
# ...
end
end
If I prepend 'type.', which is deprecated, I know, it works for this
case. But there are other accessor that are being set private, e. g.
attr_accessor :_mymachine_trans_actions_wi
private :_mymachine_trans_actions_wi, :_mymachine_trans_actions_wi=
How is this mean to work?
And why isn't an accessor set at class level not accessible from within
an instance of this class in the first place?
g phil