translation_unit
comment "//=========================================================="...
comment "// "...
comment "// PonyProg - Serial Device Programmer "...
comment "// "...
comment "// Copyright (C) 1997-2025 Claudio Lanconelli "...
comment "// "...
comment "// https://github.com/lancos/ponyprog "...
comment "// "...
comment "//----------------------------------------------------------"...
comment "// "...
comment "// This program is free software; you can redistribute it an"...
comment "// modify it under the terms of the GNU General Public Lice"...
comment "// as published by the Free Software Foundation; either vers"...
comment "// the License, or (at your option) any later version. "...
comment "// "...
comment "// This program is distributed in the hope that it will be u"...
comment "// but WITHOUT ANY WARRANTY; without even the implied warran"...
comment "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See"...
comment "// General Public License for more details. "...
comment "// "...
comment "// You should have received a copy of the GNU General Publi"...
comment "// along with this program (see LICENSE); if not, write "...
comment "// Free Software Foundation, Inc., 675 Mass Ave, Cambridge, "...
comment "// "...
comment "//=========================================================="...
preproc_include
#include "#include"
system_lib_string "<QDir>"
preproc_include
#include "#include"
system_lib_string "<QDebug>"
preproc_include
#include "#include"
system_lib_string "<QTextStream>"
preproc_include
#include "#include"
system_lib_string "<QMessageBox>"
preproc_include
#include "#include"
system_lib_string "<QtCore>"
preproc_include
#include "#include"
string_literal
" "\""
string_content "version.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "Translator.h"
" "\""
declaration
template_type
type_identifier "QVector"
template_argument_list
< "<"
type_descriptor
type_identifier "QString"
> ">"
qualified_identifier
namespace_identifier "cTranslator"
:: "::"
identifier "translateTable"
; ";"
declaration (+1694 nodes collapsed)
function_definition
primitive_type "bool"
function_declarator
qualified_identifier
namespace_identifier "cTranslator"
:: "::"
identifier "loadTranslation"
parameter_list
( "("
parameter_declaration
type_qualifier
const "const"
type_identifier "QString"
identifier "fname"
) ")"
compound_statement
{ "{"
declaration
type_identifier "QFile"
function_declarator
identifier "langFile"
parameter_list
( "("
parameter_declaration
type_identifier "fname"
) ")"
; ";"
declaration (+32 nodes collapsed)
expression_statement
call_expression
field_expression
identifier "translateTable"
. "."
field_identifier "clear"
argument_list
( "("
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "translateTable"
. "."
field_identifier "resize"
argument_list
( "("
binary_expression
identifier "vecSize"
+ "+"
number_literal "1"
) ")"
; ";"
if_statement (+26 nodes collapsed)
declaration
type_identifier "QTextStream"
init_declarator
identifier "stream"
argument_list
( "("
pointer_expression
& "&"
identifier "langFile"
) ")"
; ";"
preproc_if (+38 nodes collapsed)
declaration
type_identifier "QString"
init_declarator
identifier "llEng"
= "="
call_expression
field_expression
identifier "stream"
. "."
field_identifier "readLine"
argument_list
( "("
) ")"
; ";"
if_statement (+33 nodes collapsed)
if_statement (+70 nodes collapsed)
declaration
primitive_type "bool"
init_declarator
identifier "begTranslation"
= "="
false "false"
; ";"
while_statement
while "while"
condition_clause
( "("
unary_expression
! "!"
call_expression
field_expression
identifier "stream"
. "."
field_identifier "atEnd"
argument_list
( "("
) ")"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
identifier "llEng"
= "="
call_expression
field_expression
identifier "stream"
. "."
field_identifier "readLine"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
condition_clause
( "("
binary_expression
identifier "llEng"
== "=="
string_literal
" "\""
string_content "LANGUAGE_CHARSET"
" "\""
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
identifier "llEng"
= "="
call_expression
field_expression
identifier "stream"
. "."
field_identifier "readLine"
argument_list
( "("
) ")"
; ";"
preproc_if
#if "#if"
binary_expression
identifier "USE_QT_VERSION"
== "=="
number_literal "6"
"\n"
expression_statement
call_expression
field_expression
identifier "stream"
. "."
field_identifier "setEncoding"
argument_list
( "("
qualified_identifier
namespace_identifier "QStringConverter"
:: "::"
identifier "Latin1"
) ")"
; ";"
preproc_else
#else "#else"
expression_statement
call_expression
field_expression
identifier "stream"
. "."
field_identifier "setCodec"
argument_list
( "("
call_expression
field_expression
identifier "llEng"
. "."
field_identifier "toLatin1"
argument_list
( "("
) ")"
) ")"
; ";"
#endif "#endif"
continue_statement
continue "continue"
; ";"
} "}"
declaration
type_identifier "QString"
init_declarator
identifier "tmpText"
= "="
call_expression
identifier "convertString"
argument_list
( "("
identifier "llEng"
) ")"
; ";"
comment "// when at end of string"
if_statement (+54 nodes collapsed)
preproc_if (+423 nodes collapsed)
} "}"
expression_statement
call_expression
field_expression
identifier "langFile"
. "."
field_identifier "close"
argument_list
( "("
) ")"
; ";"
return_statement
return "return"
parenthesized_expression
( "("
true "true"
) ")"
; ";"
} "}"
function_definition (+342 nodes collapsed)
function_definition (+220 nodes collapsed)