ROSE 0.11.145.192
Public Member Functions | List of all members
Sawyer::Language::Clexer::TokenStream Class Reference

Description

Definition at line 93 of file Clexer.h.

Public Member Functions

 TokenStream (const std::string &fileName)
 
 TokenStream (const std::string &fileName, const Sawyer::Container::Buffer< size_t, char >::Ptr &buffer)
 
 TokenStream (TokenStream &super, const Indices &region)
 
const std::string fileName () const
 
bool skipPreprocessorTokens () const
 
void skipPreprocessorTokens (bool b)
 
bool skipCommentTokens () const
 
void skipCommentTokens (bool b)
 
int getChar (size_t position)
 
const Tokenoperator[] (size_t lookahead)
 
void consume (size_t n=1)
 
std::string lexeme (const Token &t) const
 
std::string toString (const Token &t) const
 
std::string line (const Token &t) const
 
bool matches (const Token &token, const char *s2) const
 
bool startsWith (const Token &token, const char *prefix) const
 
void emit (std::ostream &out, const std::string &fileName, const Token &token, const std::string &message) const
 
void emit (std::ostream &out, const std::string &fileName, const Token &begin, const Token &locus, const Token &end, const std::string &message) const
 
std::pair< size_t, size_t > location (const Token &token) const
 
const Sawyer::Container::LineVectorcontent () const
 

Constructor & Destructor Documentation

◆ TokenStream() [1/3]

Sawyer::Language::Clexer::TokenStream::TokenStream ( const std::string &  fileName)
inlineexplicit

Definition at line 106 of file Clexer.h.

◆ TokenStream() [2/3]

Sawyer::Language::Clexer::TokenStream::TokenStream ( const std::string &  fileName,
const Sawyer::Container::Buffer< size_t, char >::Ptr &  buffer 
)
inline

Definition at line 111 of file Clexer.h.

◆ TokenStream() [3/3]

Sawyer::Language::Clexer::TokenStream::TokenStream ( TokenStream super,
const Indices region 
)
inline

Definition at line 116 of file Clexer.h.

Member Function Documentation

◆ fileName()

const std::string Sawyer::Language::Clexer::TokenStream::fileName ( ) const
inline

Definition at line 122 of file Clexer.h.

◆ skipPreprocessorTokens() [1/2]

bool Sawyer::Language::Clexer::TokenStream::skipPreprocessorTokens ( ) const
inline

Definition at line 124 of file Clexer.h.

◆ skipPreprocessorTokens() [2/2]

void Sawyer::Language::Clexer::TokenStream::skipPreprocessorTokens ( bool  b)
inline

Definition at line 125 of file Clexer.h.

◆ skipCommentTokens() [1/2]

bool Sawyer::Language::Clexer::TokenStream::skipCommentTokens ( ) const
inline

Definition at line 127 of file Clexer.h.

◆ skipCommentTokens() [2/2]

void Sawyer::Language::Clexer::TokenStream::skipCommentTokens ( bool  b)
inline

Definition at line 128 of file Clexer.h.

◆ content()

const Sawyer::Container::LineVector & Sawyer::Language::Clexer::TokenStream::content ( ) const
inline

Definition at line 153 of file Clexer.h.


The documentation for this class was generated from the following file: