Barrelfish
Variables
opdefs.c File Reference

Bfdmux core functionality. More...

Variables

op_def_t op_list []
 List of operators and opcodes. More...
 

Detailed Description

Bfdmux core functionality.

Operator precedence definition and opcode/opstring binding

Variable Documentation

op_def_t op_list[]

List of operators and opcodes.

Operators with lower indices have lower precedence.

Warning
If one operator string is contained in another one, the longer opstring needs to reside in a lower index in the array! Example: "<" and "<=". If this is not the case the string "4 <= 5" will be split into "4" < "= 5", which will lead to a compile error in the right subexpression!
Note
For OP_OR and OP_AND
5 specifies that 4 extra bytes should be left after the opcode: they will hold the left subtree length for skipping the right subtree evaluation if possible.
The empty operator signals the end of the operator list, do not remove it!