Skip to content

Instantly share code, notes, and snippets.

@swilly22
Created November 26, 2017 09:40
Show Gist options
  • Save swilly22/e626468468f15a5876a3e261839a8e25 to your computer and use it in GitHub Desktop.
Save swilly22/e626468468f15a5876a3e261839a8e25 to your computer and use it in GitHub Desktop.
Arithmetic expression grammar
// (exp)
arithmetic_expression ::= LEFT_PARENTHESIS arithmetic_expression RIGHT_PARENTHESIS.
// exp + exp
arithmetic_expression ::= arithmetic_expression binary_operator arithmetic_expression.
// func(exp)
arithmetic_expression ::= STRING LEFT_PARENTHESIS arithmetic_expression_list RIGHT_PARENTHESIS.
// 9
arithmetic_expression ::= value.
// friend.age
arithmetic_expression ::= variable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment