Qt 4.8
|
#include <qdeclarativejslexer_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 (Engine *eng, bool tokenizeComments=false) | |
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 |
int | tokenLength () const |
int | tokenOffset () const |
NameId * | 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 |
NameId * | pattern |
double | dval |
int | ival |
NameId * | 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 |
Engine * | 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 | |
NameId * ustr | |
} | qsyylval |
bool | restrKeyword |
uint | size16 |
uint | size8 |
int | stackToken |
int | startcolumn |
int | startlineno |
int | startpos |
State | state |
bool | terminator |
bool | tokenizeComments |
bool | wantRx |
int | yycolumn |
int | yylineno |
Definition at line 67 of file qdeclarativejslexer_p.h.
Enumerator | |
---|---|
NoError | |
IllegalCharacter | |
UnclosedStringLiteral | |
IllegalEscapeSequence | |
IllegalUnicodeEscapeSequence | |
UnclosedComment | |
IllegalExponentIndicator | |
IllegalIdentifier |
Definition at line 115 of file qdeclarativejslexer_p.h.
Enumerator | |
---|---|
IgnoreParentheses | |
CountParentheses | |
BalancedParentheses |
Definition at line 126 of file qdeclarativejslexer_p.h.
Definition at line 91 of file qdeclarativejslexer_p.h.
Lexer::Lexer | ( | Engine * | eng, |
bool | tokenizeComments = false |
||
) |
Definition at line 80 of file qdeclarativejslexer.cpp.
Lexer::~Lexer | ( | ) |
Definition at line 115 of file qdeclarativejslexer.cpp.
|
inline |
Definition at line 199 of file qdeclarativejslexer_p.h.
Referenced by QDeclarativeScriptParser::extractMetaData(), and QDeclarativeJS::Parser::parse().
|
inline |
Definition at line 200 of file qdeclarativejslexer_p.h.
Referenced by QDeclarativeScriptParser::extractMetaData(), and QDeclarativeJS::Parser::parse().
|
inline |
Definition at line 154 of file qdeclarativejslexer_p.h.
|
static |
Definition at line 1088 of file qdeclarativejslexer.cpp.
Referenced by convertHex(), convertUnicode(), and lex().
Definition at line 1098 of file qdeclarativejslexer.cpp.
Definition at line 1082 of file qdeclarativejslexer.cpp.
Referenced by lex().
Definition at line 1103 of file qdeclarativejslexer.cpp.
Referenced by lex().
|
inline |
Definition at line 77 of file qdeclarativejslexer_p.h.
|
inline |
Definition at line 76 of file qdeclarativejslexer_p.h.
Referenced by QDeclarativeScriptParser::extractMetaData(), and QDeclarativeScriptParser::extractPragmas().
|
inline |
Definition at line 196 of file qdeclarativejslexer_p.h.
Referenced by lex().
|
inline |
Definition at line 86 of file qdeclarativejslexer_p.h.
|
inline |
Definition at line 85 of file qdeclarativejslexer_p.h.
|
inline |
Definition at line 152 of file qdeclarativejslexer_p.h.
|
inline |
Definition at line 145 of file qdeclarativejslexer_p.h.
Referenced by QDeclarativeJS::Parser::parse().
|
private |
|
static |
Definition at line 932 of file qdeclarativejslexer.cpp.
Referenced by lex().
|
private |
|
static |
Definition at line 918 of file qdeclarativejslexer.cpp.
Referenced by lex(), and scanRegExp().
|
private |
|
private |
Definition at line 944 of file qdeclarativejslexer.cpp.
Referenced by lex().
|
private |
|
inline |
Definition at line 195 of file qdeclarativejslexer_p.h.
int Lexer::lex | ( | ) |
Definition at line 469 of file qdeclarativejslexer.cpp.
Referenced by QDeclarativeScriptParser::extractMetaData(), QDeclarativeScriptParser::extractPragmas(), and QDeclarativeJS::Parser::parse().
|
inline |
Definition at line 142 of file qdeclarativejslexer_p.h.
|
private |
|
inline |
|
private |
|
private |
|
private |
bool Lexer::scanRegExp | ( | RegExpBodyPrefix | prefix = NoPrefix | ) |
Definition at line 1147 of file qdeclarativejslexer.cpp.
Referenced by QDeclarativeJS::Parser::parse().
void Lexer::setCode | ( | const QString & | c, |
int | lineno | ||
) |
Definition at line 121 of file qdeclarativejslexer.cpp.
Referenced by QDeclarativeScriptParser::extractMetaData(), QDeclarativeScriptParser::extractPragmas(), QDeclarativeRewrite::SharedBindingTester::isSharable(), QDeclarativeRewrite::RewriteBinding::operator()(), and QDeclarativeScriptParser::parse().
|
private |
|
inline |
Definition at line 147 of file qdeclarativejslexer_p.h.
|
inline |
Definition at line 149 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 141 of file qdeclarativejslexer.cpp.
Referenced by lex(), matchPunctuator(), and scanRegExp().
|
inline |
|
inline |
|
private |
Definition at line 1243 of file qdeclarativejslexer.cpp.
Referenced by lex().
|
inline |
Definition at line 80 of file qdeclarativejslexer_p.h.
Referenced by QDeclarativeScriptParser::extractMetaData(), QDeclarativeScriptParser::extractPragmas(), lex(), location(), and QDeclarativeJS::Parser::parse().
|
inline |
Definition at line 79 of file qdeclarativejslexer_p.h.
Referenced by QDeclarativeScriptParser::extractMetaData(), QDeclarativeScriptParser::extractPragmas(), and location().
|
inline |
Definition at line 197 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 217 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 162 of file qdeclarativejslexer_p.h.
Referenced by lex(), Lexer(), record16(), scanRegExp(), and ~Lexer().
|
private |
|
private |
Definition at line 237 of file qdeclarativejslexer_p.h.
Referenced by findReservedWord().
|
private |
Definition at line 211 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 226 of file qdeclarativejslexer_p.h.
Referenced by isLineTerminator(), isWhiteSpace(), lex(), scanRegExp(), setCode(), and shift().
|
private |
Definition at line 168 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 160 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 158 of file qdeclarativejslexer_p.h.
Referenced by lex(), Lexer(), and scanRegExp().
double QDeclarativeJS::Lexer::dval |
Definition at line 221 of file qdeclarativejslexer_p.h.
Referenced by QDeclarativeJS::Parser::parse().
|
private |
Definition at line 234 of file qdeclarativejslexer_p.h.
Referenced by lex().
|
private |
Definition at line 233 of file qdeclarativejslexer_p.h.
Referenced by lex(), scanRegExp(), and setCode().
int QDeclarativeJS::Lexer::flags |
Definition at line 140 of file qdeclarativejslexer_p.h.
Referenced by Lexer(), QDeclarativeJS::Parser::parse(), and scanRegExp().
int QDeclarativeJS::Lexer::ival |
Definition at line 220 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 212 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 226 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 226 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 226 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 240 of file qdeclarativejslexer_p.h.
Referenced by lex().
|
private |
Definition at line 239 of file qdeclarativejslexer_p.h.
Referenced by lex(), and syncProhibitAutomaticSemicolon().
NameId* QDeclarativeJS::Lexer::pattern |
Definition at line 139 of file qdeclarativejslexer_p.h.
Referenced by Lexer(), QDeclarativeJS::Parser::parse(), and scanRegExp().
|
private |
Definition at line 173 of file qdeclarativejslexer_p.h.
Referenced by recordStartPos(), setCode(), and shift().
|
private |
Definition at line 164 of file qdeclarativejslexer_p.h.
Referenced by lex(), record16(), and scanRegExp().
|
private |
Definition at line 164 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 241 of file qdeclarativejslexer_p.h.
Referenced by lex(), and syncProhibitAutomaticSemicolon().
union { ... } QDeclarativeJS::Lexer::qsyylval |
Referenced by lex().
|
private |
Definition at line 166 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 163 of file qdeclarativejslexer_p.h.
Referenced by Lexer(), and record16().
|
private |
Definition at line 163 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 169 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 216 of file qdeclarativejslexer_p.h.
Referenced by lex(), and recordStartPos().
|
private |
Definition at line 215 of file qdeclarativejslexer_p.h.
Referenced by lex(), and recordStartPos().
|
private |
Definition at line 214 of file qdeclarativejslexer_p.h.
Referenced by lex(), and recordStartPos().
|
private |
Definition at line 171 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 165 of file qdeclarativejslexer_p.h.
Referenced by lex().
|
private |
Definition at line 242 of file qdeclarativejslexer_p.h.
NameId* QDeclarativeJS::Lexer::ustr |
Definition at line 222 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 236 of file qdeclarativejslexer_p.h.
|
private |
Definition at line 213 of file qdeclarativejslexer_p.h.
Referenced by lex(), recordStartPos(), setCode(), and shift().
|
private |
Definition at line 159 of file qdeclarativejslexer_p.h.
Referenced by lex(), recordStartPos(), and setCode().