Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- grammar Grammar {
- token TOP { <chunk>+ }
- token chunk {
- || <text>
- || <subnegotiation>
- || <negotiation>
- || <command: NOP..GA>
- }
- # All bytes passed are encoded as latin1.
- token byte { . }
- # TELNET data is ASCII encoded. xtended ASCII is supported, but characters
- # outside the normal ASCII range are sent as XASCII subnegotiations.
- token text { <:ascii>+ }
- token command($guard) {
- \x[FF]
- <( <[ \x[F0]..\x[FE] ]> )>
- <?{ ~$/ ~~ $guard }>
- }
- token negotiation {
- <command: WILL..DONT>
- <option=.byte>
- }
- proto token subnegotiation {*}
- token subnegotiation:sym(NAWS) {
- <command: SB>
- <option=.sym>
- <byte> ** 4
- <command: SE>
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement