Skip to content

Instantly share code, notes, and snippets.

@seancribbs
Created June 16, 2009 00:46
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 seancribbs/130453 to your computer and use it in GitHub Desktop.
Save seancribbs/130453 to your computer and use it in GitHub Desktop.
additive <- multitive "+" additive / multitive;
multitive <- primary "*" multitive / primary;
primary <- "(" additive ")" / decimal;
decimal <- [0-9];
[[],
[{head,[[97,"dditive"],
" ","<-"," ",
[{head,[{head,[[],[109,"ultitive"]]},
{tail,[[" ",[[],["\"",{string,[[[],43]]},"\""]]],
[" ",[[],[97,"dditive"]]]]}]},
{tail,[[" ","/"," ",[109,"ultitive"]]]}],
[],";"]},
{tail,[["\n",
[[109,"iveitive"],
" ","<-"," ",
[{head,[{head,[[],[112,"rimary"]]},
{tail,[[" ",[[],["\"",{string,...},[...]]]],
[" ",[[],[109,[...]]]]]}]},
{tail,[[" ","/"," ",[112,"rimary"]]]}],
[],";"]],
["\n",
[[112,"yimary"],
" ","<-"," ",
[{head,[{head,[[],["\"",{string,[[[]|...]]},"\""]]},
{tail,[[" ",[[],[97,[...]]]],[" ",[[],[[...]|...]]]]}]},
{tail,[[" ","/"," ",[100,"ecimal"]]]}],
[],";"]],
["\n",
[[100,"lcimal"],
" ","<-"," ",
["[",
{characters,[[[],[[],48]],[[],[[],45]],[[],[[],57]]]},
"]"],
[],";"]]]}],
[]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment