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
java.cpp File Reference

(a5bb88c896170ec0c719c3a73ce932cb8d5205ca)

#include "lupdate.h"
#include <translator.h>
#include <QtCore/QDebug>
#include <QtCore/QFile>
#include <QtCore/QStack>
#include <QtCore/QString>
#include <QtCore/QCoreApplication>
#include <QtCore/QStringConverter>
#include <QtCore/QTextStream>
#include <iostream>
#include <ctype.h>
+ Include dependency graph for java.cpp:

Go to the source code of this file.

Classes

class  Scope
 

Enumerations

enum  {
  Tok_Eof , Tok_class , Tok_return , Tok_tr ,
  Tok_translate , Tok_Ident , Tok_Package , Tok_Comment ,
  Tok_String , Tok_Colon , Tok_Dot , Tok_LeftBrace ,
  Tok_RightBrace , Tok_LeftParen , Tok_RightParen , Tok_Comma ,
  Tok_Semicolon , Tok_Integer , Tok_Plus , Tok_PlusPlus ,
  Tok_PlusEq , Tok_null
}
 
enum  {
  Tok_Eof , Tok_class , Tok_return , Tok_tr ,
  Tok_translate , Tok_Ident , Tok_Package , Tok_Comment ,
  Tok_String , Tok_Colon , Tok_Dot , Tok_LeftBrace ,
  Tok_RightBrace , Tok_LeftParen , Tok_RightParen , Tok_Comma ,
  Tok_Semicolon , Tok_Integer , Tok_Plus , Tok_PlusPlus ,
  Tok_PlusEq , Tok_null
}
 

Functions

std::ostream & yyMsg (int line=0)
 
static QChar getChar ()
 
static int getToken ()
 
static bool match (int t)
 
static bool matchString (QString &s)
 
static bool matchStringOrNull (QString &s)
 
static bool matchExpression ()
 
static const QString context ()
 
static void recordMessage (Translator *tor, const QString &context, const QString &text, const QString &comment, const QString &extracomment, bool plural, ConversionData &cd)
 
static void parse (Translator *tor, ConversionData &cd)
 
bool loadJava (Translator &translator, const QString &filename, ConversionData &cd)
 

Variables

static QString yyFileName
 
static QChar yyCh
 
static QString yyIdent
 
static QString yyComment
 
static QString yyString
 
static bool yyEOF = false
 
static qlonglong yyInteger
 
static int yyParenDepth
 
static int yyLineNo
 
static int yyCurLineNo
 
static int yyParenLineNo
 
static int yyTok
 
static QString yyInStr
 
static int yyInPos
 
static QString yyPackage
 
static QStack< Scope * > yyScope
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
Tok_Eof 
Tok_class 
Tok_return 
Tok_tr 
Tok_translate 
Tok_Ident 
Tok_Package 
Tok_Comment 
Tok_String 
Tok_Colon 
Tok_Dot 
Tok_LeftBrace 
Tok_RightBrace 
Tok_LeftParen 
Tok_RightParen 
Tok_Comma 
Tok_Semicolon 
Tok_Integer 
Tok_Plus 
Tok_PlusPlus 
Tok_PlusEq 
Tok_null 

Definition at line 23 of file java.cpp.

◆ anonymous enum

anonymous enum
Enumerator
Tok_Eof 
Tok_class 
Tok_return 
Tok_tr 
Tok_translate 
Tok_Ident 
Tok_Package 
Tok_Comment 
Tok_String 
Tok_Colon 
Tok_Dot 
Tok_LeftBrace 
Tok_RightBrace 
Tok_LeftParen 
Tok_RightParen 
Tok_Comma 
Tok_Semicolon 
Tok_Integer 
Tok_Plus 
Tok_PlusPlus 
Tok_PlusEq 
Tok_null 

Definition at line 23 of file java.cpp.

Function Documentation

◆ context()

static const QString context ( )
static

Definition at line 394 of file java.cpp.

References Scope::Clazz, and yyScope.

Referenced by org.qtproject.qt.android.QtQuickView::QtQuickView(), org.qtproject.qt.android.QtQuickView::QtQuickView(), and org.qtproject.qt.android.QtQuickView::QtQuickView().

+ Here is the caller graph for this function:

◆ getChar()

static QChar getChar ( )
static

Definition at line 79 of file java.cpp.

References yyCurLineNo, yyEOF, and yyInPos.

◆ getToken()

static int getToken ( )
static

Definition at line 91 of file java.cpp.

References yyCh, yyComment, yyCurLineNo, yyEOF, yyIdent, yyInteger, yyLineNo, yyMsg(), yyParenDepth, yyParenLineNo, yyString, and yyTok.

Referenced by match(), matchExpression(), matchString(), matchStringOrNull(), and parse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadJava()

bool loadJava ( Translator & translator,
const QString & filename,
ConversionData & cd )

Definition at line 562 of file java.cpp.

References parse(), yyCurLineNo, yyFileName, yyInPos, yyInStr, yyPackage, yyParenDepth, yyParenLineNo, yyScope, and yyTok.

+ Here is the call graph for this function:

◆ match()

static bool match ( int t)
static

Definition at line 311 of file java.cpp.

References getToken(), and yyTok.

Referenced by matchExpression(), and parse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matchExpression()

static bool matchExpression ( )
static

Definition at line 366 of file java.cpp.

References getToken(), match(), and yyTok.

Referenced by parse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matchString()

static bool matchString ( QString & s)
static

Definition at line 319 of file java.cpp.

References getToken(), yyMsg(), and yyTok.

+ Here is the call graph for this function:

◆ matchStringOrNull()

static bool matchStringOrNull ( QString & s)
static

Definition at line 341 of file java.cpp.

References getToken(), and yyTok.

+ Here is the call graph for this function:

◆ parse()

static void parse ( Translator * tor,
ConversionData & cd )
static

Definition at line 424 of file java.cpp.

References Scope::Clazz, getToken(), match(), matchExpression(), Scope::Other, yyComment, yyEOF, yyLineNo, yyMsg(), yyPackage, yyParenDepth, yyParenLineNo, yyScope, and yyTok.

Referenced by loadJava().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ recordMessage()

static void recordMessage ( Translator * tor,
const QString & context,
const QString & text,
const QString & comment,
const QString & extracomment,
bool plural,
ConversionData & cd )
static

Definition at line 412 of file java.cpp.

References Translator::extend(), TranslatorMessage::Unfinished, and yyLineNo.

+ Here is the call graph for this function:

◆ yyMsg()

std::ostream & yyMsg ( int line = 0)

Definition at line 74 of file java.cpp.

References yyLineNo.

Referenced by getToken(), matchString(), and parse().

+ Here is the caller graph for this function:

Variable Documentation

◆ yyCh

static QChar yyCh
static

Definition at line 53 of file java.cpp.

Referenced by getToken().

◆ yyComment

static QString yyComment
static

Definition at line 55 of file java.cpp.

Referenced by getToken(), and parse().

◆ yyCurLineNo

static int yyCurLineNo
static

Definition at line 62 of file java.cpp.

Referenced by getChar(), getToken(), and loadJava().

◆ yyEOF

static bool yyEOF = false
static

Definition at line 57 of file java.cpp.

Referenced by getChar(), getToken(), and parse().

◆ yyFileName

static QString yyFileName
static

Definition at line 52 of file java.cpp.

Referenced by loadJava().

◆ yyIdent

static QString yyIdent
static

Definition at line 54 of file java.cpp.

Referenced by getToken().

◆ yyInPos

static int yyInPos
static

Definition at line 68 of file java.cpp.

Referenced by getChar(), and loadJava().

◆ yyInStr

static QString yyInStr
static

Definition at line 67 of file java.cpp.

Referenced by loadJava().

◆ yyInteger

static qlonglong yyInteger
static

Definition at line 59 of file java.cpp.

Referenced by getToken().

◆ yyLineNo

static int yyLineNo
static

Definition at line 61 of file java.cpp.

Referenced by getToken(), parse(), recordMessage(), and yyMsg().

◆ yyPackage

static QString yyPackage
static

Definition at line 71 of file java.cpp.

Referenced by loadJava(), and parse().

◆ yyParenDepth

static int yyParenDepth
static

Definition at line 60 of file java.cpp.

Referenced by getToken(), loadJava(), and parse().

◆ yyParenLineNo

static int yyParenLineNo
static

Definition at line 63 of file java.cpp.

Referenced by getToken(), loadJava(), and parse().

◆ yyScope

static QStack< Scope * > yyScope
static

Definition at line 72 of file java.cpp.

Referenced by context(), loadJava(), and parse().

◆ yyString

static QString yyString
static

Definition at line 56 of file java.cpp.

Referenced by getToken().

◆ yyTok

static int yyTok
static

Definition at line 64 of file java.cpp.

Referenced by getToken(), loadJava(), match(), matchExpression(), matchString(), matchStringOrNull(), and parse().