gameServer2/src/protocol/hwprotocol.lalrpop
changeset 12132 1525923cd7e3
parent 12131 a4d22f197bd2
child 12133 81df2e1f9ae9
--- a/gameServer2/src/protocol/hwprotocol.lalrpop	Fri Jan 06 01:00:21 2017 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-use std::string;
-use std::str::FromStr;
-
-use super::messages::HWProtocolMessage::*;
-use super::messages::*;
-
-grammar;
-
-pub ProtocolMessage: HWProtocolMessage = {
-    <SpecificMessage> "\n\n",
-};
-
-SpecificMessage: HWProtocolMessage = {
-    "NICK" "\n" <ProtocolString> => Nick(<>),
-    "PONG" => Pong,
-    "PING" => Ping,
-    "PROTO" "\n" <Num32> => Proto(<>),
-};
-
-Num32: u32 =
-    <Digit*> => number(<>);
-
-ProtocolString: String =
-    <ProtocolChar*> => <>.join("");
-
-ProtocolChar: &'input str =
-    r"[^\n]" => <>;
-
-Digit: u8 = {
-    "0" => 0,
-    "1" => 1,
-    "2" => 2,
-    "3" => 3,
-    "4" => 4,
-    "5" => 5,
-    "6" => 6,
-    "7" => 7,
-    "8" => 8,
-    "9" => 9,
-};