Synopsis/Lexer.hh

source code

Includes from this file:

Declarations in this file:

Classes in Synopsis

Buffer

Buffer holds the memory on top of which a parse tree / syntax tree is constructed.

Lexer

a Lexer reads tokens from a stream.

Classes in Synopsis::Lexer

Queue

a Queue is used to read in tokens from a stream without consuming them

Data members in Synopsis::Lexer::Queue

my_container

Data members in Synopsis::Lexer

my_buffer
my_comments
my_keywords
my_token
my_tokens

Enums in Synopsis::Lexer

TokenSet

Define sets of token that are to be recognized as special keywords (as opposed to identifiers).

Functions in Synopsis

is_blank(char)

Member functions in Synopsis::Lexer::InvalidChar

InvalidChar(const std::string&)

Member functions in Synopsis::Lexer

Lexer(Buffer*,int)

Construct a Lexer on the given Buffer using the given token set.

Member functions in Synopsis::Lexer::Queue

at(size_type)const
push(const Token&)

Member functions in Synopsis::Lexer

get_token(Token&)
look_ahead(size_t)
look_ahead(size_t,Token&)
origin(const char*,std::string&)const

Return the origin of the given pointer (filename and line number)

read_char_const(unsigned long)
read_number(char,unsigned long)
read_token(const char*&,size_t&)
restore(const char*)
save()
screen(const char*,size_t)
single_char_op(unsigned char)

Structs in Synopsis::Lexer

InvalidChar

Typedefs in Synopsis::Lexer

Comments
Dictionary

Typedefs in Synopsis::Lexer::Queue

Container
size_type