Skip to content

Instantly share code, notes, and snippets.

@ThariqS
Created October 25, 2012 18:56
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 ThariqS/3954686 to your computer and use it in GitHub Desktop.
Save ThariqS/3954686 to your computer and use it in GitHub Desktop.
operations
type
: INT_T
| FLOAT_T
| BOOL_T
| VEC_T
| IVEC_T
| BVEC_T
;
expression
: constructor
| function
| INT_C
| FLOAT_C
| ID
| variable
| unary_op expression
| expression binary_op expression
| TRUE_C
| FALSE_C
| '(' expression ')'
;
variable
: ID
| ID '[' INT_C ']'
;
unary_op
: '!'
| '-'
;
binary_op
: AND
| OR
| NEQ
| LEQ
| GEQ
| EQ
| '+'
| '-'
| '*'
| '/'
| '^'
;
constructor
: type '(' arguments ')'
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment