Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created August 14, 2011 07:34
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 jnthn/1144673 to your computer and use it in GitHub Desktop.
Save jnthn/1144673 to your computer and use it in GitHub Desktop.
grammar SalesExport {
token TOP { ^ <country>+ $ }
token country {
<name> \n
<destination>+
}
token destination {
\t <name> \s+ ':' \s+
<lat=.num> ',' <long=.num> \s+ ':' \s+
<sales=.integer> \n
}
token name { \w+ [ \s \w+ ]* }
token num { '-'? \d+ [\.\d+]? }
token integer { '-'? \d+ }
}
say "alive";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment