class
LexScan
: public
ComTerpModule
(Return to index)
Lexical scanner for C tokens, with C-style comment skipping.
Type:
Instantiable
Base Classes:
public
ComTerpModule
Derived Classes
Include file:
Attribute/lexscan.h
Public:
LexScan
()
construct on stdin.
LexScan
(const char* path)
construct on 'path'.
LexScan
(void*, char*(*)(char*,int,void*), int(*)(void*), int(*)(void*))
construct on arbitrary function pointers, with arbitrary void* pointer to pass to them.
AttributeValue
*
get_attr
(char* buf, unsigned int bufsiz)
return
token
in newly allocated
AttributeValue
.
attr_value
get_next_token
(unsigned int& toktype)
return
token
in structure ready for constructing an
AttributeValue
.
const char*
get_next_token_string
(unsigned int& toktype)
return pointer to next
token
in internal buffer.
void
init
()
intialize comment delimeters and internal
token
buffer.
~LexScan
()
Protected:
char*
_begcmt
char*
_endcmt
char*
_tokbuf
(more documentation)