Skip to content

Instantly share code, notes, and snippets.

@weshoke
Forked from syntagmatic/README.md
Last active December 16, 2015 05:58
Show Gist options
  • Select an option

  • Save weshoke/5387765 to your computer and use it in GitHub Desktop.

Select an option

Save weshoke/5387765 to your computer and use it in GitHub Desktop.
op
= geomprod
geomprod
= left:innerprod "*" right:geomprod { return left + ".gp(" + right + ")"; }
/ innerprod
innerprod
= left:outerprod "<<" right:innerprod { return left + ".ip(" + right + ")"; }
/ outerprod
outerprod
= left:primary "^" right:outerprod { return left + ".op(" + right + ")"; }
/ primary
primary
= blade
/ "(" op:op ")" { return op; }
blade "blade"
= chars:[a-zA-Z0-9]+ { return chars.join(""); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment