These are small, special purpose evaluators.
More...
|
| UStatus | ur_parseBlock (UThread *ut, UBuffer *blk, UIndex start, UIndex end, UIndex *parsePos, const UBuffer *ruleBlk, UStatus(*eval)(UThread *, const UCell *)) |
| | Parse a block using the parse language.
|
| |
| UStatus | ur_parseString (UThread *ut, UBuffer *str, UIndex start, UIndex end, UIndex *parsePos, const UBuffer *ruleBlk, UStatus(*eval)(UThread *, const UCell *), int matchCase) |
| | Parse a string or binary using the parse language.
|
| |
These are small, special purpose evaluators.
◆ ur_parseBlock()
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.
◆ ur_parseString()
Parse a string or binary using the parse language.
- Note
- 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.