top | up | prev | next

pp Namespace

Classes

struct File
struct PP
class ProjectHeaderFileSet

Functions

std::vector<soulng::lexer::Token> ConvertPPTokensToTextTokens(const std::vector<soulng::lexer::Token>& ppTokens)
std::vector<soulng::lexer::Token> ConvertTextTokensToCppTokens(const std::vector<soulng::lexer::Token>& textTokens, const PP* pp)
void Done()
void GetLine(const char32_t*& p, const char32_t* e, const char32_t*& begin, const char32_t*& end, int& numNewLines)
void Init()
void InitPPTokenTextTokenMap()
void InitTextTokenCppTokenMap()
bool IsPPLine(const char32_t* p, const char32_t* e) inline
std::vector<soulng::lexer::Token> MacroExpand(const std::vector<soulng::lexer::Token>& tokens, const PP* pp)
std::string ParseAngleHeaderName(const std::string& fileName, const soulng::lexer::Token& headerNameToken)
std::string ParseQuoteHeaderName(const std::string& fileName, const soulng::lexer::Token& headerNameToken)
void Preprocess(const std::string& fileName, PP* pp)
void SkipLineEnd(const char32_t*& p, const char32_t* e) inline

Variables

const char32_t* emptyStr
const soulng::lexer::Lexeme ndebug
const char32_t* ndebugStr
const soulng::lexer::Lexeme oneLexeme
const char32_t* oneStr
const soulng::lexer::Token oneToken
const soulng::lexer::Lexeme zeroLexeme
const char32_t* zeroStr
const soulng::lexer::Token zeroToken

Function Details

ConvertPPTokensToTextTokens Function

std::vector<soulng::lexer::Token> sngcpp::pp::ConvertPPTokensToTextTokens(const std::vector<soulng::lexer::Token>& ppTokens)

Definition at line 204 of PP.cpp :
205 {
206     std::vector<soulng::lexer::Token> textTokens;
207     for (const soulng::lexer::Token& ppToken : ppTokens)
208     {
209         textTokens.push_back(std::move(soulng::lexer::Token(ppTokenTextTokenMap[ppToken.id]ppToken.matchppToken.line)));
210     }
211     return textTokens;
212 }


Called by: sngcpp::pp::PP::EndDefine , sngcpp::pp::PP::Evaluate


ConvertTextTokensToCppTokens Function

std::vector<soulng::lexer::Token> sngcpp::pp::ConvertTextTokensToCppTokens(const std::vector<soulng::lexer::Token>& textTokens, const PP * pp)

Definition at line 221 of PP.cpp

Calls: sngcpp::pp::PP::IsDefined

Called by: sngcpp::pp::PP::Evaluate


Done Function

void sngcpp::pp::Done()

Definition at line 17 of InitDone.cpp :
18 {
19 }


Declaration at line 13 of InitDone.hpp


GetLine Function

void sngcpp::pp::GetLine(const char32_t *& p, const char32_t * e, const char32_t *& begin, const char32_t *& end, int & numNewLines)

Definition at line 611 of PP.cpp


Init Function

void sngcpp::pp::Init()

Definition at line 11 of InitDone.cpp :
12 {
13     InitTextTokenCppTokenMap();
14     InitPPTokenTextTokenMap();
15 }


Declaration at line 12 of InitDone.hpp


InitPPTokenTextTokenMap Function

void sngcpp::pp::InitPPTokenTextTokenMap()

Definition at line 95 of PP.cpp
Declaration at line 72 of PP.hpp


InitTextTokenCppTokenMap Function

void sngcpp::pp::InitTextTokenCppTokenMap()

Definition at line 33 of PP.cpp
Declaration at line 71 of PP.hpp


IsPPLine Function

bool sngcpp::pp::IsPPLine(const char32_t * p, const char32_t * e) inline

Definition at line 589 of PP.cpp :
590 {
591     while (p != e&&(  *p == ' ' || *p == '\t'))
592     {
593         ++p;
594     }
595     if (p != e && *p == '#') return true;
596     return false;
597 }



MacroExpand Function

std::vector<soulng::lexer::Token> sngcpp::pp::MacroExpand(const std::vector<soulng::lexer::Token>& tokens, const PP * pp)

Definition at line 162 of PP.cpp

Called by: sngcpp::pp::PP::Evaluate


ParseAngleHeaderName Function

std::string sngcpp::pp::ParseAngleHeaderName(const std::string& fileName, const soulng::lexer::Token& headerNameToken)

Definition at line 790 of PP.cpp
Declaration at line 73 of PP.hpp

Called by: PPLineParser::Include


ParseQuoteHeaderName Function

std::string sngcpp::pp::ParseQuoteHeaderName(const std::string& fileName, const soulng::lexer::Token& headerNameToken)

Definition at line 828 of PP.cpp
Declaration at line 74 of PP.hpp

Called by: PPLineParser::Include


Preprocess Function

void sngcpp::pp::Preprocess(const std::string& fileName, PP * pp)

Definition at line 866 of PP.cpp
Declaration at line 75 of PP.hpp

Calls: PPLineParser::Parse , sngcpp::pp::PP::Emit

Called by: sngcpp::pp::PP::Include


SkipLineEnd Function

void sngcpp::pp::SkipLineEnd(const char32_t *& p, const char32_t * e) inline

Definition at line 599 of PP.cpp :
600 {
601     if (p != e && *p == '\r')
602     {
603         ++p;
604     }
605     if (p != e && *p == '\n')
606     {
607         ++p;
608     }
609 }



top | up | prev | next