Pajdeg  0.2.2
Pajdeg
Files | Typedefs | Functions

An instance of a PDState in a scanner. More...

Files

file  PDEnv.h
 

Typedefs

typedef struct PDEnvPDEnvRef
 

Functions

PDEnvRef PDEnvCreate (PDStateRef state)
 

Detailed Description

An instance of a PDState in a scanner.

PDEnv objects are simple, low level instance representations of PDStateRef objects. That is to say, whenever a state is pushed onto the stack, an environment is created, wrapping that state, and the current environment is pushed onto the scanner's environment stack.

In practice, environments also keep track of the build and var stacks.

The build stack

The build stack is a pd_stack of objects making up a bigger object in the process of being scanned. For instance, if the scanner has just finished reading

<< /Info 1 2 R
/Type /Metadata
/Subtype

the build stack will consist of the /Info and /Type dictionary entries.

The var stack

The var stack is very similar to the build stack, except it is made up of one object being parsed. In the example above, the var stack would contain the PDF name "Subtype", because the value of the dictionary entry has not yet been scanned.

Typedef Documentation

typedef struct PDEnv* PDEnvRef

An environment.

Environments are instances of states.

Function Documentation

PDEnvRef PDEnvCreate ( PDStateRef  state)

Create an environment with the given state.

Parameters
stateThe state.
Returns
The environment.