Parse tree interface


Functions

u_int RCUC_add_instruction (u_int i, u_int lab)
u_int RCUC_OFFSET_resolve (int off)
u_int RCUC_LABEL_resolve ()


Function Documentation

u_int RCUC_add_instruction u_int  i,
u_int  lab
 

Add an instruction to the instruction set.

This is called by the parser to add an instruction to the instruction set.

Parameters:
i The instruction
lab If non-zero, this instruction will have a label
Returns:
the instruction.

u_int RCUC_LABEL_resolve  ) 
 

Get the absolute address of the label refered to by the LOOP or JUMP instruction.

Note, that the label must already be defined. This makes sense, as there's no branching constructions in the RCU language, so it makes little sense to jump to a later instrustion. Note, that the label is set by the lexical analyser, so no arguments need be passed to this function.

Returns:
The absolute address of the label.

u_int RCUC_OFFSET_resolve int  off  ) 
 

Resolve an offset given to a LOOP or JUMP instruction.

This is called from the parser to turn relative off sets into absolute addresses

Parameters:
off The address of set
Returns:
The absolute address pointed to by off

Top of page Last update Fri Jul 21 19:48:34 2006
Copyright © 2004 Christian Holm Created by DoxyGen 1.3.5