Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

sobj_op.c File Reference


Detailed Description

Information tables and access functions for expression types.

#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include "sobject_p.h"

Include dependency graph for sobj_op.c:

Include dependency graph

Data Structures

struct  sobj_op_spec
 Operator specification. More...

Functions

void sobj_op_sign_copy (const char **, char *)
 Copy a part of an operator sign.
int sobj_op_priority (enum sobj_type op)
 Get the parsing priority of an operator.
void sobj_op_sign (enum sobj_expr_type op, bool compact, char *op_sign_0, char *op_sign_1, char *op_sign_2, enum sobj_text_context *op2_context, int *op_n)
 Get operator sign information for an operator.
int sobj_op_bin_code (enum sobj_expr_type op)
 Get the binary serialization code for an operator.
int sobj_op_n (enum sobj_expr_type op)
 Get the number of operands for an operator.

Variables

const struct sobj_op_spec sobj_op_spec []
 Table of operator specifications.

Function Documentation

int sobj_op_bin_code enum sobj_expr_type  op  ) 
 

Get the binary serialization code for an operator.

Parameters:
op The operator (represented by an expression type).
Returns:
The binary serialization code.

int sobj_op_n enum sobj_expr_type  op  ) 
 

Get the number of operands for an operator.

Parameters:
op The operator (represented by an expression type).
Returns:
The number of operands.

int sobj_op_priority enum sobj_type  op  ) 
 

Get the parsing priority of an operator.

Parameters:
op The operator (represented by an expression type).
Returns:
The operator priority.

void sobj_op_sign enum sobj_expr_type  op,
bool  compact,
char *  op_sign_0,
char *  op_sign_1,
char *  op_sign_2,
enum sobj_text_context op2_context,
int *  op_n
 

Get operator sign information for an operator.

Parameters:
op The operator (represented by an expression type).
compact Flag indicating if the compact variant of the operator sign is requested.
op_sign_0 Buffer receiving the first part of the operator sign. This part is put before the first operand.
op_sign_1 Buffer receiving the second part of the operator sign. This part is put after the first operand and before the second operand (if the operator has more than one operand).
op_sign_2 Buffer receiving the third part of the operator sign. This part is put after the second operand.
op2_context If this is not a null-pointer, the parsing context for the second operand is stored to *op2_context.
op_n If this is not a null-pointer, the number of operands is stored to *op_n.
Note:
The buffers receiving the operator signs must be large enough to hold the copy. The buffer sizes should be at least 8 bytes.

void sobj_op_sign_copy const char **  ptr,
char *  op_sign
[static]
 

Copy a part of an operator sign.

Parameters:
ptr Pointer to the callers variable pointing to the operator sign specification.
op_sign Buffer receiving the copy.


Variable Documentation

const struct sobj_op_spec sobj_op_spec[] [static]
 

Table of operator specifications.


Generated on Sat Jul 23 16:05:27 2005 for sobject by  doxygen 1.3.9.1