Version 1 (modified by archibald, 8 years ago) (diff) |
---|
Expression Syntax
This is just an area win which I'm exploring a simple expression syntax ...
operators := ( "+" | "-" | "*" | "/" | "%" ); expression := ( identifier | operator /* monadic */ expression ( operator /* diadic */ expression ) | "(" expression ")" );
The above syntax should let you have any operator as either monadic or diadic ... and has no implicit precedence (ie the brackets are required to produce the precedence)