As with any programming language we need to define a list of operators and how they behave. After years of C/C++ programming I simply copy the list from that language as a start. This first list show mathematical operators.
|+a||Positive signed variable/number|
|-a||Negative signed variable/number|
|—||Decrement with 1: –a or a–|
|++||Increment with 1: ++a or a++|
|~||Binary invert: ~a|
|>>||Bit rotate right|
|<<||Bit rotate left|
This next list show boolean operators that only is valid for boolean expressions.
|>=||Greater than or equal|
|<=||Less than or equal|
The trick with this is that I might have 3 operators related to a variable – one pre operator like a sign or ++, — etc, a post operator like ++ or — and a main operator. This needs to be handled by my expression parser.