Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
tokenizer.cpp File Reference

(5212645b4665917019a96ba873d9e98c1a136b5f)

#include "tokenizer.h"
#include "config.h"
#include "generator.h"
#include <QtCore/qfile.h>
#include <QtCore/qhash.h>
#include <QtCore/qregularexpression.h>
#include <QtCore/qstring.h>
#include <QtCore/qstringconverter.h>
#include <cctype>
#include <cstring>
#include <utility>
+ Include dependency graph for tokenizer.cpp:

Go to the source code of this file.

Macros

#define LANGUAGE_CPP   "Cpp"
 

Functions

static int hashKword (const char *s, int len)
 
static void insertKwordIntoHash (const char *s, int number)
 

Variables

static const char * kwords []
 
static const int KwordHashTableSize = 4096
 
static int kwordHashTable [KwordHashTableSize]
 
static QHash< QByteArray, bool > * ignoredTokensAndDirectives = nullptr
 
static QRegularExpressioncomment = nullptr
 
static QRegularExpressionversionX = nullptr
 
static QRegularExpressiondefinedX = nullptr
 
static QRegularExpressiondefines = nullptr
 
static QRegularExpressionfalsehoods = nullptr
 
static QStringDecoder sourceDecoder
 

Macro Definition Documentation

◆ LANGUAGE_CPP

#define LANGUAGE_CPP   "Cpp"

Definition at line 21 of file tokenizer.cpp.

Function Documentation

◆ hashKword()

static int hashKword ( const char * s,
int len )
static

Definition at line 104 of file tokenizer.cpp.

Referenced by insertKwordIntoHash().

+ Here is the caller graph for this function:

◆ insertKwordIntoHash()

static void insertKwordIntoHash ( const char * s,
int number )
static

Definition at line 109 of file tokenizer.cpp.

References hashKword(), kwordHashTable, and KwordHashTableSize.

+ Here is the call graph for this function:

Variable Documentation

◆ comment

static QRegularExpression * comment = nullptr
static

Definition at line 90 of file tokenizer.cpp.

Referenced by Tokenizer::terminate().

◆ definedX

static QRegularExpression * definedX = nullptr
static

Definition at line 92 of file tokenizer.cpp.

Referenced by Tokenizer::isTrue(), and Tokenizer::terminate().

◆ defines

static QRegularExpression * defines = nullptr
static

Definition at line 94 of file tokenizer.cpp.

Referenced by Tokenizer::isTrue(), and Tokenizer::terminate().

◆ falsehoods

static QRegularExpression * falsehoods = nullptr
static

Definition at line 95 of file tokenizer.cpp.

Referenced by Tokenizer::isTrue(), and Tokenizer::terminate().

◆ ignoredTokensAndDirectives

static QHash< QByteArray, bool > * ignoredTokensAndDirectives = nullptr
static

Definition at line 88 of file tokenizer.cpp.

Referenced by Tokenizer::getToken(), and Tokenizer::terminate().

◆ kwordHashTable

static int kwordHashTable
static

Definition at line 86 of file tokenizer.cpp.

Referenced by Tokenizer::getToken(), Tokenizer::initialize(), and insertKwordIntoHash().

◆ KwordHashTableSize

static const int KwordHashTableSize = 4096
static

Definition at line 85 of file tokenizer.cpp.

Referenced by Tokenizer::getToken(), and insertKwordIntoHash().

◆ kwords

static const char * kwords
static

Definition at line 28 of file tokenizer.cpp.

◆ sourceDecoder

static QStringDecoder sourceDecoder
static

Definition at line 97 of file tokenizer.cpp.

Referenced by Tokenizer::initialize().

◆ versionX

static QRegularExpression * versionX = nullptr
static

Definition at line 91 of file tokenizer.cpp.

Referenced by Tokenizer::terminate().