Standard Libraries

  • bytes
  • io (should be provided by the implementation)
  • datetime (should be provided by the implementation)
  • socket (should be provided by the implementation)
  • ffi (should be provided by the implementation)
  • regex
  • xml
  • http
  • json
  • log
  • markdown

Byte String

Byte string module provides bytes type and bidirectional codec interface between bytes and string.

  • bytes.<byte>
  • bytes.<byte-string> = <sequence> of <byte>
  • bytes.<encoding> = <string> for bytes.encodings.<encoding>
  • bytes.encodings.<encoding>

Standard library must implement following essential encodings:

  • bytes.encodings.<ascii>
  • bytes.encodings.<utf-8>
  • bytes.encodings.<utf-16>

It can provide more encodings than essential encodings. e.g.:

  • bytes.encodings.<euc-kr>
  • bytes.encodings.<shift-jis>

Input/Output

IO module contains common interfaces for IO stream (io) and standard IO (io.stdio).

  • io.<input> is a basic interface class of input stream. It forces to implement an instance method read!(size: <natural>) in order to subclass it.

    Instance methods are:

    • read!(size: <natural>) returns io.bytes.<byte-array>
    • read-line!() returns io.bytes.<byte-array>

    io.<input> implements <enumerator> interface also. So, following snippet works well:

    output.write-from!(input)
    input.for-each!({ output.write!(_) })
    

  • io.<output> is a basic interface class of output stream. It forces to implement an instance method write!(bytes: io.bytes.<bytes>) in order to subclass it.

Instance methods are:

  • write!(bytes: io.bytes.<bytes>)
  • write-line!(bytes: io.bytes.<bytes>)
  • write-from!(enumerator: <enumerator>)

Markdown

Markdown is an official documentation format for Veeyu programs including docstrings and user manuals. So, standard libraries of the Veeyu programming language should implement Markdown. Most implementations for Markdown doesn’t build syntax tree, but, the implementation in standard libraries of Veeyu have to parse it with document objects like HTML DOM.

  • markdown.<document>

    Constructor signatures are:

    markdown.<document>(text: <string>)
    markdown.<document>(input: io.<input>)
    markdown.<document>(text: io.<byte-sequence>,
                        encoding: <string> for io.bytes.<encoding>)
    
  • markdown.<inline-element>
    • markdown.<quotation>
  • markdown.<block-element>
    • markdown.<paragraph>
    • markdown.<block-quotation>
    • markdown.<list>
changed September 18, 2010