lib/marvin/parsers/ragel_parser.rl in Sutto-marvin-0.4.0 vs lib/marvin/parsers/ragel_parser.rl in Sutto-marvin-0.8.0.0

- old
+ new

@@ -1,13 +1,12 @@ -# Ragel Parser comes from the Arrbot Guys - -# Kudos to Halogrium and Epitron. +# Ragel Parser comes from the Arrbot Guys - Kudos to Halogrium and Epitron. %%{ machine irc; action prefix_servername_start { - server = Marvin::Parsers::Prefixes::Server.new + server = Prefixes::Server.new } action prefix_servername { server.name << fc } @@ -15,15 +14,15 @@ action prefix_servername_finish { command.prefix = server } action prefix_hostmask_start { - hostmask = Marvin::Parsers::Prefixes::HostMask.new + hostmask = Prefixes::HostMask.new } action hostmask_nickname { - hostmask.nickname << fc + hostmask.nick << fc } action hostmask_user { hostmask.user << fc } @@ -125,18 +124,18 @@ cs = 0 hostmask = nil server = nil code = nil - command = Marvin::Parsers::Command.new(data) + command = Command.new(data) %% write init; %% write exec; if cs >= irc_first_final command else - raise UnparseableMessage, "Failed to parse the message: #{input.inspect}" + raise UnparseableMessage, "Failed to parse the message: #{line.strip}" end end end end