Skip to content

Instantly share code, notes, and snippets.

@erikbgithub
Created September 28, 2010 12:49
Show Gist options
  • Save erikbgithub/600915 to your computer and use it in GitHub Desktop.
Save erikbgithub/600915 to your computer and use it in GitHub Desktop.
#Words
<Inner_Block> ::= <Block_Start><Block><Block_End>
<Block>* ::= <Expression>(<Exp_Sep><Expression>)*
<Expression> ::= <Sum>|<Assignment>
<Assignment> ::= <Name><Assign_Op><Inner_Block>
<Sum> ::= <Difference>(<Add_Op><Difference>)*
<Difference> ::= <Product>(<Sub_Op><Product>)*
<Product> ::= <Quotient>(<Mul_Op><Quotient>)*
<Quotient> ::= <Term>(<Div_Op><Term>)*
<Term> ::= <Number>|<Call>|<Inner_Block>
<Call> ::= <Call_Op><Name><Inner_Block>
<Number> ::= {<Sign>}<Digit><Digit_0>*
<Name> ::= <Letter>(<Letter><Digit_0><U_Score>)*
<Sign> ::= <Add_Op>|<Sub_Op>
# Consts
<Letter> ::= [a-zA-Z]
<Digit> ::= [1-9]
<Digit_0> ::= [0-9]
<Exp_Sep> ::= ";"
<Block_Start> ::= "("
<Block_End> ::= ")"
<Add_Op> ::= "+"
<Sub_Op> ::= "-"
<Mul_Op> ::= "*"
<Div_Op> ::= "/"
<Call_Op> ::= "$"
<U_Score> ::= "_"
@erikbgithub
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment