module Fonte module Parsers grammar SourcePlayer include Number include Word include SteamID rule source_player nickname "<" uid ">" "<" steam_id:player_steam_id ">" "<" team ">" { def value text_value end } end rule nickname (![<>] character)* { def value text_value end } end rule uid integer end rule player_steam_id steam_id / "" { def value nil end } end rule team (![<>] character)* { def value text_value == "Unassigned" || text_value == "Console" || text_value == "" ? nil : text_value end } end end end end