Qt 4.8
|
#include <qscriptlexer_p.h>
Classes | |
struct | keyword |
Public Types | |
enum | Error { NoError, IllegalCharacter, UnclosedStringLiteral, IllegalEscapeSequence, IllegalUnicodeEscapeSequence, UnclosedComment, IllegalExponentIndicator, IllegalIdentifier } |
enum | ParenthesesState { IgnoreParentheses, CountParentheses, BalancedParentheses } |
enum | RegExpBodyPrefix { NoPrefix, EqualPrefix } |
enum | State { Start, Identifier, InIdentifier, InSingleLineComment, InMultiLineComment, InNum, InNum0, InHex, InOctal, InDecimal, InExponentIndicator, InExponent, Hex, Octal, Number, String, Eof, InString, InEscapeSequence, InHexEscape, InUnicodeEscape, Other, Bad } |
Public Functions | |
const QChar * | characterBuffer () const |
int | characterCount () const |
void | clearError () |
int | currentColumnNo () const |
int | currentLineNo () const |
double | dval () const |
int | endColumnNo () const |
int | endLineNo () const |
Error | error () const |
QString | errorMessage () const |
int | ival () const |
int | lex () |
Lexer (QScriptEnginePrivate *eng) | |
State | lexerState () const |
bool | prevTerminator () const |
bool | scanRegExp (RegExpBodyPrefix prefix=NoPrefix) |
void | setCode (const QString &c, int lineno) |
void | setErrorMessage (const QString &err) |
void | setErrorMessage (const char *err) |
int | startColumnNo () const |
int | startLineNo () const |
QScriptNameIdImpl * | ustr () const |
~Lexer () | |
Static Public Functions | |
static unsigned char | convertHex (ushort c1) |
static unsigned char | convertHex (ushort c1, ushort c2) |
static QChar | convertUnicode (ushort c1, ushort c2, ushort c3, ushort c4) |
static bool | isDecimalDigit (ushort c) |
static bool | isIdentLetter (ushort c) |
Public Variables | |
int | flags |
QScriptNameIdImpl * | pattern |
double | dval |
int | ival |
QScriptNameIdImpl * | ustr |
Private Functions | |
ushort | convertOctal (ushort c1, ushort c2, ushort c3) const |
int | findReservedWord (const QChar *buffer, int size) const |
bool | isHexDigit (ushort c) const |
bool | isLineTerminator () const |
bool | isOctalDigit (ushort c) const |
bool | isWhiteSpace () const |
int | lookupKeyword (const char *) |
int | matchPunctuator (ushort c1, ushort c2, ushort c3, ushort c4) |
void | record16 (QChar c) |
void | record8 (ushort c) |
void | recordStartPos () |
void | setDone (State s) |
void | shift (uint p) |
ushort | singleEscape (ushort c) const |
void | syncProhibitAutomaticSemicolon () |
Properties | |
int | bol |
QChar * | buffer16 |
char * | buffer8 |
bool | check_reserved |
const QChar * | code |
ushort | current |
bool | delimited |
bool | done |
QScriptEnginePrivate * | driver |
Error | err |
QString | errmsg |
uint | length |
ushort | next1 |
ushort | next2 |
ushort | next3 |
int | parenthesesCount |
ParenthesesState | parenthesesState |
uint | pos |
uint | pos16 |
uint | pos8 |
bool | prohibitAutomaticSemicolon |
union { | |
double dval | |
int ival | |
QScriptNameIdImpl * ustr | |
} | qsyylval |
bool | restrKeyword |
uint | size16 |
uint | size8 |
int | stackToken |
int | startcolumn |
int | startlineno |
State | state |
bool | terminator |
bool | wantRx |
int | yycolumn |
int | yylineno |
Definition at line 47 of file qscriptlexer_p.h.
Enumerator | |
---|---|
NoError | |
IllegalCharacter | |
UnclosedStringLiteral | |
IllegalEscapeSequence | |
IllegalUnicodeEscapeSequence | |
UnclosedComment | |
IllegalExponentIndicator | |
IllegalIdentifier |
Definition at line 92 of file qscriptlexer_p.h.
Enumerator | |
---|---|
IgnoreParentheses | |
CountParentheses | |
BalancedParentheses |
Definition at line 103 of file qscriptlexer_p.h.
Enumerator | |
---|---|
NoPrefix | |
EqualPrefix |
Definition at line 109 of file qscriptlexer_p.h.
Definition at line 68 of file qscriptlexer_p.h.
QScript::Lexer::Lexer | ( | QScriptEnginePrivate * | eng | ) |
Definition at line 51 of file qscriptlexer.cpp.
QScript::Lexer::~Lexer | ( | ) |
Definition at line 72 of file qscriptlexer.cpp.
|
inline |
|
inline |
|
inline |
Definition at line 131 of file qscriptlexer_p.h.
|
static |
Definition at line 966 of file qscriptlexer.cpp.
Referenced by convertHex(), convertUnicode(), and lex().
Definition at line 976 of file qscriptlexer.cpp.
Definition at line 960 of file qscriptlexer.cpp.
Referenced by lex().
Definition at line 981 of file qscriptlexer.cpp.
Referenced by lex().
|
inline |
|
inline |
|
inline |
Definition at line 173 of file qscriptlexer_p.h.
Referenced by lex().
|
inline |
|
inline |
|
inline |
Definition at line 129 of file qscriptlexer_p.h.
Referenced by QScript::SyntaxChecker::checkSyntax().
|
inline |
Definition at line 122 of file qscriptlexer_p.h.
Referenced by QScript::SyntaxChecker::checkSyntax(), and QScriptParser::parse().
|
private |
Definition at line 116 of file qscriptlexer.cpp.
Referenced by characterCount(), and lex().
|
static |
Definition at line 810 of file qscriptlexer.cpp.
Referenced by lex().
|
private |
|
static |
Definition at line 801 of file qscriptlexer.cpp.
Referenced by lex(), and scanRegExp().
|
private |
|
private |
Definition at line 822 of file qscriptlexer.cpp.
Referenced by lex().
|
private |
|
inline |
Definition at line 172 of file qscriptlexer_p.h.
int QScript::Lexer::lex | ( | ) |
Definition at line 404 of file qscriptlexer.cpp.
Referenced by QScript::SyntaxChecker::checkSyntax(), and QScriptParser::parse().
|
inline |
Definition at line 119 of file qscriptlexer_p.h.
|
private |
Definition at line 827 of file qscriptlexer.cpp.
Referenced by lex().
|
inline |
|
private |
Definition at line 1004 of file qscriptlexer.cpp.
Referenced by characterCount(), lex(), and scanRegExp().
|
private |
|
private |
bool QScript::Lexer::scanRegExp | ( | RegExpBodyPrefix | prefix = NoPrefix | ) |
Definition at line 1024 of file qscriptlexer.cpp.
Referenced by QScript::SyntaxChecker::checkSyntax(), and QScriptParser::parse().
void QScript::Lexer::setCode | ( | const QString & | c, |
int | lineno | ||
) |
Definition at line 78 of file qscriptlexer.cpp.
Referenced by QScript::SyntaxChecker::checkSyntax().
|
private |
|
inline |
|
inline |
Definition at line 126 of file qscriptlexer_p.h.
|
private |
Definition at line 98 of file qscriptlexer.cpp.
Referenced by lex(), matchPunctuator(), and scanRegExp().
|
inline |
Definition at line 60 of file qscriptlexer_p.h.
Referenced by QScript::SyntaxChecker::checkSyntax(), location(), and QScriptParser::parse().
|
inline |
Definition at line 59 of file qscriptlexer_p.h.
Referenced by QScript::SyntaxChecker::checkSyntax(), location(), and QScriptParser::parse().
|
private |
Definition at line 1080 of file qscriptlexer.cpp.
Referenced by characterCount(), and lex().
|
inline |
Definition at line 174 of file qscriptlexer_p.h.
|
private |
Definition at line 193 of file qscriptlexer_p.h.
|
private |
Definition at line 139 of file qscriptlexer_p.h.
Referenced by characterBuffer(), lex(), Lexer(), record16(), and ~Lexer().
|
private |
|
private |
Definition at line 213 of file qscriptlexer_p.h.
Referenced by findReservedWord().
|
private |
Definition at line 188 of file qscriptlexer_p.h.
|
private |
Definition at line 202 of file qscriptlexer_p.h.
Referenced by isLineTerminator(), isWhiteSpace(), lex(), scanRegExp(), setCode(), and shift().
|
private |
Definition at line 145 of file qscriptlexer_p.h.
|
private |
Definition at line 137 of file qscriptlexer_p.h.
|
private |
Definition at line 135 of file qscriptlexer_p.h.
Referenced by lex(), and scanRegExp().
double QScript::Lexer::dval |
Definition at line 197 of file qscriptlexer_p.h.
Referenced by QScriptParser::parse().
|
private |
Definition at line 210 of file qscriptlexer_p.h.
Referenced by clearError(), error(), lex(), and setErrorMessage().
|
private |
Definition at line 209 of file qscriptlexer_p.h.
Referenced by errorMessage(), lex(), scanRegExp(), setCode(), and setErrorMessage().
int QScript::Lexer::flags |
Definition at line 117 of file qscriptlexer_p.h.
Referenced by Lexer(), QScriptParser::parse(), and scanRegExp().
int QScript::Lexer::ival |
Definition at line 196 of file qscriptlexer_p.h.
|
private |
Definition at line 189 of file qscriptlexer_p.h.
|
private |
Definition at line 202 of file qscriptlexer_p.h.
|
private |
Definition at line 202 of file qscriptlexer_p.h.
|
private |
Definition at line 202 of file qscriptlexer_p.h.
|
private |
Definition at line 216 of file qscriptlexer_p.h.
Referenced by lex().
|
private |
Definition at line 215 of file qscriptlexer_p.h.
Referenced by lex(), and syncProhibitAutomaticSemicolon().
QScriptNameIdImpl* QScript::Lexer::pattern |
Definition at line 116 of file qscriptlexer_p.h.
Referenced by Lexer(), QScriptParser::parse(), and scanRegExp().
|
private |
Definition at line 150 of file qscriptlexer_p.h.
|
private |
Definition at line 141 of file qscriptlexer_p.h.
Referenced by characterCount(), lex(), record16(), and scanRegExp().
|
private |
Definition at line 141 of file qscriptlexer_p.h.
|
private |
Definition at line 217 of file qscriptlexer_p.h.
Referenced by lex(), and syncProhibitAutomaticSemicolon().
|
private |
Definition at line 143 of file qscriptlexer_p.h.
|
private |
Definition at line 140 of file qscriptlexer_p.h.
Referenced by Lexer(), and record16().
|
private |
Definition at line 140 of file qscriptlexer_p.h.
|
private |
Definition at line 146 of file qscriptlexer_p.h.
|
private |
Definition at line 192 of file qscriptlexer_p.h.
Referenced by recordStartPos(), and startColumnNo().
|
private |
Definition at line 191 of file qscriptlexer_p.h.
Referenced by recordStartPos(), and startLineNo().
|
private |
Definition at line 148 of file qscriptlexer_p.h.
Referenced by lex(), lexerState(), and setDone().
|
private |
Definition at line 142 of file qscriptlexer_p.h.
Referenced by lex(), and prevTerminator().
QScriptNameIdImpl* QScript::Lexer::ustr |
Definition at line 198 of file qscriptlexer_p.h.
|
private |
Definition at line 212 of file qscriptlexer_p.h.
|
private |
Definition at line 190 of file qscriptlexer_p.h.
Referenced by currentColumnNo(), lex(), recordStartPos(), setCode(), and shift().
|
private |
Definition at line 136 of file qscriptlexer_p.h.
Referenced by currentLineNo(), lex(), recordStartPos(), and setCode().