Barrelfish
Data Structures | Macros | Variables
opdefs.h File Reference

Header file for opcode definitions. More...

Data Structures

struct  op_def_t
 Defines a type for operator definition entries. More...
 

Macros

#define MAX_OPERATOR_STRING_LENGTH   9
 Maximum length of an operator string in characters.
 

Variables

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

Detailed Description

Header file for opcode definitions.

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!