Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

sreader.hpp File Reference


Detailed Description

Intelib Reader.

The file invents a flexible syntax analyzer (the IntelibGenericReader class), which can be used for reading in different kinds of heterogenous data. If you just want to read S-expressions, use the IntelibReader class; it is derived from IntelibGenericReader and tunes its ancestor to fit the traditional syntax of Lisp S-expressions.

Definition in file sreader.hpp.

#include "../sexpress/sexpress.hpp"
#include "../sexpress/sstring.hpp"
#include "../sexpress/squeue.hpp"
#include "sstream.hpp"

Include dependency graph for sreader.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void add_vectors_to_reader (class IntelibReader &reader)
 Tune a reader to recognize vectors.
void add_hashtables_to_reader (class IntelibReader &reader)
 Tune a reader to recognize hash tables.

Variables

IntelibDummyPackage TheDummyPackage
IntelibGenericReaderPTheIntelibReader
 The global IntelibGenericReader pointer.


Function Documentation

void add_vectors_to_reader class IntelibReader reader  ) 
 

Tune a reader to recognize vectors.

Make the given reader object recognize constructs like #(1 2 3) or #~(1 2 3) and return the appropriate vectors, respectively, of fixed or variable size

Definition at line 45 of file vecread.cpp.

Referenced by LispReader::LispReader(), and SchemeReader::SchemeReader().

void add_hashtables_to_reader class IntelibReader reader  ) 
 

Tune a reader to recognize hash tables.

Make the given reader object recognize constructs like #S(EQL (KEY . VAL) ...) and return the appropriately constructed object of the SExpressionHashTable class

Definition at line 50 of file hshread.cpp.

Referenced by LispReader::LispReader(), and SchemeReader::SchemeReader().


Variable Documentation

IntelibDummyPackage TheDummyPackage
 

Definition at line 464 of file sreader.cpp.

Referenced by IntelibGenericReader::IntelibGenericReader().

IntelibGenericReader* PTheIntelibReader
 

The global IntelibGenericReader pointer.

The library functions READ, SAFEREAD and READFROMSTRING use this pointer to determine whether to use a custom (possibly fine-tuned) IntelibGenericReader. If the pointer remains NULL (0), the functions create an object locally each time they're called. The library doesn't assign this pointer to any object, so it remains zero unless you explicitly change it.

Note:
If you decide to change the pointer, it might be not a bad idea to save its value and restore it after you finish with your operation.

Definition at line 470 of file sreader.cpp.


Generated on Tue Dec 18 00:40:32 2007 for InteLib by  doxygen 1.4.1