Paste: peg example

Author: doublec
Mode: factor
Date: Mon, 8 Dec 2008 03:47:41
Plain Text |
TUPLE: irc sender mask chan ;

EBNF: parse-irc
nobang = (!("!").)+ => [[ >string ]]
word   = (!(" ").)+ => [[ >string ]]
any    = (.)*       => [[ >string ]]
privmsg = ":" nobang:sender "!" word:mask 
          " PRIVMSG " word:chan " :"
           any:msg => [[ sender mask chan irc boa ]]
;EBNF

New Annotation

Summary:
Author:
Mode:
Body: