2.2. lispparse Namespace Reference

Classes

Functions

Variables

2.2.1. Function Documentation

2.2.1.1. addArg()

lispparse.addArg ( arglist, inbuf, offset, length)

Adds an argument to the argument list.

Arguments:
    arglist: List of arguments.
    inbuf: Input buffer.
    offset: Starting offset in the input buffer.
    length: Length of the argument.

2.2.1.2. escaped_string()

lispparse.escaped_string ( string, quoted, terminators)

Escapes a string based on the provided terminators.

Arguments:
    string: Input string.
    quoted: Whether the string should be quoted.
    terminators: List of terminator characters.

Returns:
    str: Escaped string.

2.2.1.3. escaped_string2()

lispparse.escaped_string2 ( string, quoted, terminators)

Escapes a string based on the provided terminators 
(alternative implementation).

Arguments:
    string: Input string.
    quoted: Whether the string should be quoted.
    terminators: List of terminator characters.

Returns:
    str: Escaped string.

2.2.1.4. escaped_string_auto()

lispparse.escaped_string_auto ( string, quoted)

Automatically escapes a string based on whether it is quoted.

Arguments:
    string: Input string.
    quoted: Whether the string should be quoted.

Returns:
    str: Escaped string.

2.2.1.5. escaped_string_with_options()

lispparse.escaped_string_with_options ( string, quoted, special_only)

Escapes a string with options for special terminators.

Arguments:
    string: Input string.
    quoted: Whether the string should be quoted.
    special_only: Whether to use special terminators only.

Returns:
    str: Escaped string.

2.2.1.6. escaped_symbol()

lispparse.escaped_symbol ( string)

Escapes a symbol.

Arguments:
    string: Input string.

Returns:
    str: Escaped symbol.

2.2.1.7. initialize_terminators()

lispparse.initialize_terminators ( )

Initializes the terminator tables.

2.2.1.8. parse()

lispparse.parse ( buffer)

Parses a buffer containing LISP expressions.

Arguments:
    buffer: Input buffer.

Returns:
    list: List of parsed expressions.

2.2.1.9. SlEscapeChar()

lispparse.SlEscapeChar ( inbuf, offset, outbuf, outoffset)

Escapes a character in the input buffer and writes it to the 
output buffer.

Arguments:
    inbuf: Input buffer.
    offset: Offset in the input buffer.
    outbuf: Output buffer.
    outoffset: Offset in the output buffer.

Returns:
    int: Length of the escaped character.

2.2.1.10. SlSkipFast()

lispparse.SlSkipFast ( inbuf, offset, stop, maxbuf)

Skips characters in the input buffer quickly until a stop character 
is found.

Arguments:
    inbuf: Input buffer.
    offset: Starting offset in the input buffer.
    stop: Stop character.
    maxbuf: Maximum buffer length.

Returns:
    int: Offset of the first stop character or maxbuf if not found.

2.2.1.11. SlSkipTo()

lispparse.SlSkipTo ( inbuf, offset, stops, maxbuf)

Skips characters in the input buffer until a stop character is found.

Arguments:
    inbuf: Input buffer.
    offset: Starting offset in the input buffer.
    stops: String of stop characters.
    maxbuf: Maximum buffer length.

Returns:
    int: Offset of the first stop character or None if not found.

2.2.1.12. SlSkipToClosing()

lispparse.SlSkipToClosing ( buffer, offset, maxbuf, opening, closing)

Skips characters in the buffer until the closing character is found.

Arguments:
    buffer: Input buffer.
    offset: Starting offset in the buffer.
    maxbuf: Maximum buffer length.
    opening: Opening character.
    closing: Closing character.

Returns:
    int: Offset of the closing character or None if not found.

2.2.1.13. SlSkipWhite()

lispparse.SlSkipWhite ( buffer, offset, maxbuf)

Skips whitespace characters in the buffer.

Arguments:
    buffer: Input buffer.
    offset: Starting offset in the buffer.
    maxbuf: Maximum buffer length.

Returns:
    int: Offset of the first non-whitespace character or 
    None if not found.

2.2.1.14. UT_LispParseSafe()

lispparse.UT_LispParseSafe ( buffer, offset, buflen, flags)

Parses a LISP expression safely.

Arguments:
    buffer: Input buffer.
    offset: Starting offset in the buffer.
    buflen: Length of the buffer.
    flags: Parsing flags.

Returns:
    tuple: Offset of the first character after the expression and 
    an array of arguments.