Skip to content

Instantly share code, notes, and snippets.

@zengargoyle
Created June 7, 2017 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zengargoyle/6c3732e6a688a07aa5740a5b06db4039 to your computer and use it in GitHub Desktop.
Save zengargoyle/6c3732e6a688a07aa5740a5b06db4039 to your computer and use it in GitHub Desktop.
grammar A {
rule TOP { ^ ';' <angles> <dig> <title> <angles> <url> $ }
token angles { '<<>>' }
token dig { 'DiG' }
token title { \S+ }
token url { \S+ }
}
A.new.parse('; <<>> DiG 9.10.3-P4-Ubuntu <<>> seed.bitcoin.sipa.be').say;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment