APG
… an ABNF Parser Generator
|
Header file for the 32-bit integer version of the lines objects. More...
Go to the source code of this file.
Data Structures | |
struct | line_u |
Carries detailed information about the characters and line endings. One for each line in the input grammar file. More... | |
Functions | |
void * | vpLinesuCtor (exception *spEx, const uint32_t *uipInput, aint uiLength) |
The linesu object constructor. More... | |
void | vLinesuDtor (void *vpCtx) |
The linesu object destructor. More... | |
line_u * | spLinesuFirst (void *vpCtx) |
Initialize an iterator over the lines. More... | |
line_u * | spLinesuNext (void *vpCtx) |
Returns the next line from the iterator. More... | |
aint | uiLinesuCount (void *vpCtx) |
Returns the number of lines. More... | |
aint | uiLinesuLength (void *vpCtx) |
Returns the number of integers in the 32-bit integer array. More... | |
abool | bLinesuFindLine (void *vpCtx, aint uiOffset, aint *uipLine, aint *uipRelOffset) |
Find the line that the given integer is in. More... | |
Header file for the 32-bit integer version of the lines objects.
Definition in file linesu.h.
Find the line that the given integer is in.
vpCtx | Pointer to a valid linesu context, previously returned from vpLinesuCtor() If not valid the application will silently exit with a BAD_CONTEXT exit code. |
uiOffset | The zero-based offset of the integer to find. |
uipLine | Pointer to an integer, set to the found line number on return. |
uipRelOffset | Pointer to an integer, set to the relative offset of the integer in the found line. |
line_u* spLinesuFirst | ( | void * | vpCtx | ) |
Initialize an iterator over the lines.
Sets up the iterator and returns the first line.
vpCtx | Pointer to a valid linesu context, previously returned from vpLinesuCtor() If not valid the application will silently exit with a BAD_CONTEXT exit code. |
line_u* spLinesuNext | ( | void * | vpCtx | ) |
Returns the next line from the iterator.
vpCtx | Pointer to a valid linesu context, previously returned from vpLinesuCtor() If not valid the application will silently exit with a BAD_CONTEXT exit code. |
aint uiLinesuCount | ( | void * | vpCtx | ) |
Returns the number of lines.
vpCtx | Pointer to a valid linesu context, previously returned from vpLinesuCtor() If not valid the application will silently exit with a BAD_CONTEXT exit code. |
aint uiLinesuLength | ( | void * | vpCtx | ) |
Returns the number of integers in the 32-bit integer array.
Count includes the line ending integers.
vpCtx | Pointer to a valid linesu context, previously returned from vpLinesuCtor() If not valid the application will silently exit with a BAD_CONTEXT exit code. |
void vLinesuDtor | ( | void * | vpCtx | ) |
The linesu
object destructor.
Releases all allocated memory and clears the context to prevent accidental reuse.
vpCtx | A pointer to a valid lines context previously return from vpLinesuCtor(). Silently ignored if NULL. However, if non-NULL it must be a valid lines context pointer. The application will silently exit with BAD_CONTEXT exit code if vpCtx is invalid. |
The linesu
object constructor.
Reads the 32-bint integer input and separates it into individual lines, generating a list of line_u structures, one for each line.
spEx | Pointer to a valid exception structure initialized with XCTOR(). If not valid the application will silently exit with a BAD_CONTEXT exit code. |
uipInput | Pointer to the array of integers |
uiLength | - the number of integers in the array |