cutext/lsource.h: Wide Character Source for Lexical Analysis
[cutext: Unicode and Text Handling]

Data Structures

struct  cutext_lsource

Functions

void cutext_lsource_init (cutext_lsource_t lsrc, cutext_source_t src, cu_locbound_t locb_start)
cu_bool_t cutext_lsource_init_fopen (cutext_lsource_t lsrc, char const *enc, cu_str_t path)
cutext_lsource_t cutext_lsource_new (cutext_source_t subsrc, cu_locbound_t locb_start)
cutext_lsource_t cutext_lsource_new_fopen (char const *enc, cu_str_t path)
cu_locbound_t cutext_lsource_locbound (cutext_lsource_t src)
int cutext_lsource_indentation (cutext_lsource_t src)
size_t cutext_lsource_read (cutext_lsource_t lsrc, cu_wchar_t *buf, size_t size)
size_t cutext_lsource_skip (cutext_lsource_t lsrc, size_t size)
cu_wchar_t const * cutext_lsource_look (cutext_lsource_t lsrc, size_t size, size_t *size_out)
cu_wchar_t cutext_lsource_peek (cutext_lsource_t src)
cu_wchar_t cutext_lsource_get (cutext_lsource_t src)
void cutext_locbound_put_wchar (cu_locbound_t locb, cu_wchar_t ch)

Detailed Description

This provides a wide character source with lookahead and tracking of source location and indentation. As the name suggests, it's indented to provide input for lexical analyzers, but may be suitable for other textual processing, as well.

See also:
cutext/source.h: Text Source with Optional Lookahead

Function Documentation

void cutext_locbound_put_wchar ( cu_locbound_t  locb,
cu_wchar_t  ch 
)

A currently rough approximation to a Unicode version of cu_locbound_put_char.

cu_wchar_t cutext_lsource_get ( cutext_lsource_t  src  ) 

Returns and skips over the next character of src.

cu_wchar_t cutext_lsource_peek ( cutext_lsource_t  src  ) 

Returns the next character from the source, without skipping over it.

Generated 2009-11-23 for culibs-0.25 using Doxygen. Maintained by Petter Urkedal.