Boron 0.1.0

Domain Languages
[Urlan Datatype System]

These are small, special purpose evaluators. More...

Functions

int ur_parseBinary (UThread *ut, UBuffer *bin, UIndex start, UIndex end, UIndex *parsePos, const UBuffer *ruleBlk, int(*eval)(UThread *, const UCell *))
 Parse a binary data format.
int ur_parseBlock (UThread *ut, UBuffer *blk, UIndex start, UIndex end, UIndex *parsePos, const UBuffer *ruleBlk, int(*eval)(UThread *, const UCell *))
 Parse a block using the parse language.
int ur_parseString (UThread *ut, UBuffer *str, UIndex start, UIndex end, UIndex *parsePos, const UBuffer *ruleBlk, int(*eval)(UThread *, const UCell *), int matchCase)
 Parse a string using the parse language.

Detailed Description

These are small, special purpose evaluators.


Function Documentation

int ur_parseBinary ( UThread ut,
UBuffer bin,
UIndex  start,
UIndex  end,
UIndex *  parsePos,
const UBuffer ruleBlk,
int(*)(UThread *, const UCell *)  eval 
)

Parse a binary data format.

Parameters:
bin Input to parse, which must be in thread storage.
start Starting byte in input.
end Ending byte in input.
parsePos Index in input where parse ended.
ruleBlk Rules in the parse language. This block must be held and remain unchanged during the parsing.
eval Evaluator callback to do paren values in rule. The callback must return UR_OK/UR_THROW.
Returns:
UR_OK or UR_THROW.

int ur_parseBlock ( UThread ut,
UBuffer blk,
UIndex  start,
UIndex  end,
UIndex *  parsePos,
const UBuffer ruleBlk,
int(*)(UThread *, const UCell *)  eval 
)

Parse a block using the parse language.

Parameters:
blk Input to parse, which must be in thread storage.
start Starting cell in input.
end Ending cell in input.
parsePos Index in input where parse ended.
ruleBlk Rules in the parse language. This block must be held and remain unchanged during the parsing.
eval Evaluator callback to do paren values in rule. The callback must return UR_OK/UR_THROW.
Returns:
UR_OK or UR_THROW.

int ur_parseString ( UThread ut,
UBuffer str,
UIndex  start,
UIndex  end,
UIndex *  parsePos,
const UBuffer ruleBlk,
int(*)(UThread *, const UCell *)  eval,
int  matchCase 
)

Parse a string using the parse language.

Note:
Currently, the encoding of any pattern strings must be the same as the input encoding.

UR_ENC_UTF8 strings are accepted but multi-byte characters are not handled.

Parameters:
str Input to parse, which must be in thread storage.
start Starting character in input.
end Ending character in input.
parsePos Index in input where parse ended.
ruleBlk Rules in the parse language. This block must be held and remain unchanged during the parsing.
eval Evaluator callback to do paren values in rule. The callback must return UR_OK/UR_THROW.
matchCase Use character case when comparing strings.
Returns:
UR_OK or UR_THROW.


Generated on 27 Jan 2012 by Doxygen 1.5.1