Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. grammar Grammar {
  2. token TOP { <chunk>+ }
  3.  
  4. token chunk {
  5. || <text>
  6. || <subnegotiation>
  7. || <negotiation>
  8. || <command: NOP..GA>
  9. }
  10.  
  11. # All bytes passed are encoded as latin1.
  12. token byte { . }
  13.  
  14. # TELNET data is ASCII encoded. xtended ASCII is supported, but characters
  15. # outside the normal ASCII range are sent as XASCII subnegotiations.
  16. token text { <:ascii>+ }
  17.  
  18. token command($guard) {
  19. \x[FF]
  20. <( <[ \x[F0]..\x[FE] ]> )>
  21. <?{ ~$/ ~~ $guard }>
  22. }
  23.  
  24. token negotiation {
  25. <command: WILL..DONT>
  26. <option=.byte>
  27. }
  28.  
  29. proto token subnegotiation {*}
  30. token subnegotiation:sym(NAWS) {
  31. <command: SB>
  32. <option=.sym>
  33. <byte> ** 4
  34. <command: SE>
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement