diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/CMakeLists.txt mysql-workbench-6.3.8+dfsg/backend/wbprivate/CMakeLists.txt --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/CMakeLists.txt 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/CMakeLists.txt 2016-10-14 12:12:04.000000000 +0000 @@ -115,4 +115,10 @@ PROPERTIES VERSION ${WB_VERSION} SOVERSION ${WB_VERSION}) +if(COMMAND cotire) + set_target_properties(wbprivate PROPERTIES + COTIRE_PREFIX_HEADER_IGNORE_PATH "${PRECOMPILED_HEADERS_EXCLUDE_PATHS}") + + cotire(wbprivate) +endif() install(TARGETS wbprivate DESTINATION ${WB_INSTALL_LIB_DIR}) diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/model/wb_diagram_options.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/model/wb_diagram_options.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/model/wb_diagram_options.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/model/wb_diagram_options.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -56,6 +56,10 @@ set_allowed_resizing(false, false); } + ~SizerFigure() + { + } + virtual void draw_contents(mdc::CairoCtx *cr) { double pw= _paper_size.width; diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/model/wb_physical_model_diagram_features.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/model/wb_physical_model_diagram_features.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/model/wb_physical_model_diagram_features.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/model/wb_physical_model_diagram_features.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -54,7 +54,7 @@ void show(int x, int y) { _visible = true; - mforms::Popover::show(x, y, mforms::Right); + mforms::Popover::show(x, y, mforms::StartRight); } virtual void close() diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/db_sql_editor_history_be.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/db_sql_editor_history_be.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/db_sql_editor_history_be.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/db_sql_editor_history_be.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -442,10 +442,10 @@ statement = sql_text.ValueStr(); // decides whether to use or not the existing data - if (timestamp != _last_timestamp.repr() && timestamp != "~") + if (timestamp != _last_timestamp.toString() && timestamp != "~") _last_timestamp = timestamp; - if (statement != _last_statement.repr() && statement != "~") + if (statement != _last_statement.toString() && statement != "~") _last_statement = statement; _data.push_back(_last_statement); @@ -554,14 +554,14 @@ if (index % 2) { // decides whether to use or not the existing data - if (statement != _last_statement.repr()) + if (statement != _last_statement.toString()) _last_statement = statement; _data.push_back(_last_statement); } else { - if (statement != _last_timestamp.repr()) + if (statement != _last_timestamp.toString()) _last_timestamp = statement; _data.push_back(_last_timestamp); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/db_sql_editor_log.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/db_sql_editor_log.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/db_sql_editor_log.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/db_sql_editor_log.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -180,7 +180,7 @@ _readonly= true; add_column("", int()); // msg type (icon) - add_column("", int()); // sequence no. + add_column("#", int()); // sequence no. add_column("Time", std::string()); add_column("Action", std::string()); add_column("Message", std::string()); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/execute_routine_wizard.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/execute_routine_wizard.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/execute_routine_wizard.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/execute_routine_wizard.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -184,7 +184,7 @@ std::string schema_name = base::quote_identifier_if_needed(*_routine->owner()->name(), '`'); std::string routine_name = base::quote_identifier_if_needed(*_routine->name(), '`'); - if (_routine->routineType() == "procedure") + if (base::tolower(_routine->routineType()) == "procedure") { std::string parameters_list; std::string variables_list; @@ -194,7 +194,7 @@ { db_mysql_RoutineParamRef parameter = parameters[i]; bool quote = needs_quoting(parameter->datatype()); - if (parameter->paramType() == "in") + if (base::tolower(parameter->paramType()) == "in") { // A pure input parameter. Just add it to the parameter list. if (!parameters_list.empty()) @@ -219,7 +219,7 @@ result += "set @" + parameter_name + " = "; std::string value = "0"; - if (parameter->paramType() == "inout") + if (base::tolower(parameter->paramType()) == "inout") value = _edits[edit_index++]->get_string_value(); if (quote && is_quoted(value)) diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/query_side_palette.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/query_side_palette.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/query_side_palette.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/query_side_palette.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -218,7 +218,7 @@ _snippet_popover->set_read_only(false); _snippet_popover->set_text(description); _snippet_popover->set_read_only(true); - _snippet_popover->show(left_top.first, left_top.second, mforms::Left); + _snippet_popover->show(left_top.first, left_top.second, mforms::StartLeft); } //------------------------------------------------------------------------------------------------ diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_context_sqlide.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_context_sqlide.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_context_sqlide.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_context_sqlide.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -126,7 +126,17 @@ { boost::shared_ptr ref(_editor); if (ref) - return grt::IntegerRef(_editor->connected() ? 1 : 0); + { + if (_editor->offline()) + return grt::IntegerRef(-1); + else + { + if (_editor->connected()) + return grt::IntegerRef(1); + else + return grt::IntegerRef(0); + } + } return grt::IntegerRef(0); } @@ -829,7 +839,7 @@ cmdui->add_builtin_command("query.reconnect", boost::bind(call_reconnect, this)); - cmdui->add_builtin_command("query.stopOnError", boost::bind(call_continue_on_error, this)); + cmdui->add_builtin_command("query.continueOnError", boost::bind(call_continue_on_error, this)); cmdui->add_builtin_command("query.jump_to_placeholder", boost::bind(&WBContextSQLIDE::call_in_editor_panel, this, &SqlEditorPanel::jump_to_placeholder)); cmdui->add_builtin_command("list-members", boost::bind(&WBContextSQLIDE::call_in_editor_panel, this, &SqlEditorPanel::list_members), diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_live_schema_tree.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_live_schema_tree.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_live_schema_tree.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_live_schema_tree.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1515,7 +1515,7 @@ switch (current_type) { case Any: - case None: + case NoneType: break; case Schema: obj->type("db.Schema"); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_live_schema_tree.h mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_live_schema_tree.h --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_live_schema_tree.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_live_schema_tree.h 2016-10-14 12:12:04.000000000 +0000 @@ -116,7 +116,7 @@ ForeignKeyColumn, IndexColumn, Any, - None + NoneType }; // This will be used on different object type validations diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_buffer.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_buffer.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_buffer.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_buffer.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -268,15 +268,15 @@ if (base::file_exists(bec::make_path(workspace_path, "tab_order"))) { // new WB 6.2 format workspace - std::ifstream f(bec::make_path(workspace_path, "tab_order").c_str()); - + std::wifstream f; + openStream(bec::make_path(workspace_path, "tab_order"), f); std::vector editor_files; while (!f.eof()) { - std::string suffix; + std::wstring suffix; f >> suffix; if (!suffix.empty()) - editor_files.push_back(suffix); + editor_files.push_back(base::wstring_to_string(suffix)); } SqlEditorPanel *editor(add_sql_editor()); @@ -432,6 +432,7 @@ { SqlEditorPanel* editor(mforms::manage(new SqlEditorPanel(this, scratch, start_collapsed))); editor->editor_be()->register_file_drop_for(this); + editor->editor_be()->set_continue_on_error(continue_on_error()); editor->grtobj()->owner(grtobj()); grtobj()->queryEditors().insert(editor->grtobj()); @@ -578,22 +579,20 @@ void SqlEditorForm::save_workspace_order(const std::string &prefix) { - std::ofstream order_file; if (prefix.empty()) - { log_error("save with empty path\n"); - } - - order_file.open(bec::make_path(prefix, "tab_order").c_str(), std::ofstream::out); if (_tabdock) { + std::wofstream orderFile; + openStream(bec::make_path(prefix, "tab_order"), orderFile); for (int c = _tabdock->view_count(), i = 0; i < c; i++) { SqlEditorPanel *editor = sql_editor_panel(i); - if (editor) - order_file << editor->autosave_file_suffix() << "\n"; + if (editor && orderFile.good()) + orderFile << base::string_to_wstring(editor->autosave_file_suffix()) << std::endl; } + orderFile.close(); } } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_form.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_form.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_form.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_form.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. +/* + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -210,7 +210,7 @@ "4 Make sure you are both providing a password if needed and using the correct password for %server% connecting from the host address you're connecting from"; message = bec::replace_string(message, "%user%", target->parameterValues().get_string("userName")); - message = bec::replace_string(message, "%port%", target->parameterValues().get("port").repr()); + message = bec::replace_string(message, "%port%", target->parameterValues().get("port").toString()); message = bec::replace_string(message, "%server%", target->parameterValues().get_string("hostName", "localhost")); message = bec::replace_string(message, "%error%", error); @@ -231,7 +231,7 @@ message += "' from your host to server at ";//%server%:%port%\n"; message += target->parameterValues().get_string("hostName", "localhost"); message += ":"; - message += target->parameterValues().get("port").repr() + "\n"; + message += target->parameterValues().get("port").toString() + "\n"; if (info.errNo == 3159) message += "Only connections with enabled SSL support are accepted.\n"; else if (info.errNo == 3032) @@ -269,7 +269,8 @@ _live_tree(SqlEditorTreeController::create(this)), _side_palette_host(NULL), _side_palette(NULL), - _history(DbSqlEditorHistory::create(_grtm)) + _history(DbSqlEditorHistory::create(_grtm)), + _serverIsOffline(false) { _startup_done = false; _log = DbSqlEditorLog::create(this, _grtm, 500); @@ -286,8 +287,10 @@ _last_log_message_timestamp = timestamp(); int keep_alive_interval= _grtm->get_app_option_int("DbSqlEditor:KeepAliveInterval", 600); + if (keep_alive_interval != 0) { + log_debug3("Create KeepAliveInterval timer\n"); _keep_alive_thread= TimerActionThread::create(boost::bind(&SqlEditorForm::send_message_keep_alive, this), keep_alive_interval*1000); _keep_alive_thread->on_exit.connect(boost::bind(&SqlEditorForm::reset_keep_alive_thread, this)); } @@ -388,7 +391,7 @@ try { _auto_completion_cache = new AutoCompleteCache(sanitize_file_name(get_session_name()), - boost::bind(&SqlEditorForm::get_autocompletion_connection, this, _1), cache_dir, + boost::bind(&SqlEditorForm::getAuxConnection, this, _1, false), cache_dir, boost::bind(&SqlEditorForm::on_cache_action, this, _1)); _auto_completion_cache->refresh_schema_list(); // Start fetching schema names immediately. } @@ -410,16 +413,57 @@ this->check_server_problems(); + + // We need to check this before sending GRNSQLEditorOpened cause offline() function that's called + // from python which is connected to this notification will deadlock on PythonLock. + checkIfOffline(); + // refresh snippets again, in case the initial load from DB is pending for shared snippets _side_palette->refresh_snippets(); GRTNotificationCenter::get()->send_grt("GRNSQLEditorOpened", grtobj(), grt::DictRef()); + int keep_alive_interval= _grtm->get_app_option_int("DbSqlEditor:KeepAliveInterval", 600); + + // We have to set these variables so that the server doesn't timeout before we ping everytime + // From http://dev.mysql.com/doc/refman/5.7/en/communication-errors.html for reasones to loose the connection + // - The client had been sleeping more than wait_timeout or interactive_timeout seconds without issuing any requests to the server + // We're adding 10 seconds for communication delays + { + std::string value; + + if (get_session_variable(_usr_dbc_conn->ref.get(), "wait_timeout", value) && base::atoi(value) < keep_alive_interval) + exec_main_sql(base::strfmt("SET @@SESSION.wait_timeout=%d", keep_alive_interval + 10), false); + + if (get_session_variable(_usr_dbc_conn->ref.get(), "interactive_timeout", value) && base::atoi(value) < keep_alive_interval) + exec_main_sql(base::strfmt("SET @@SESSION.interactive_timeout=%d", keep_alive_interval + 10), false); + } + _startup_done = true; } //-------------------------------------------------------------------------------------------------- +base::RecMutexLock SqlEditorForm::getAuxConnection(sql::Dbc_connection_handler::Ref &conn, bool lockOnly) + { + RecMutexLock lock(ensure_valid_aux_connection(false, lockOnly)); + conn = _aux_dbc_conn; + return lock; + } + + + +//-------------------------------------------------------------------------------------------------- + +base::RecMutexLock SqlEditorForm::getUserConnection(sql::Dbc_connection_handler::Ref &conn, bool lockOnly) +{ + RecMutexLock lock(ensure_valid_usr_connection(false, lockOnly)); + conn = _usr_dbc_conn; + return lock; +} + +//-------------------------------------------------------------------------------------------------- + db_query_EditorRef SqlEditorForm::grtobj() { return wbsql()->get_grt_editor_object(this); @@ -478,12 +522,27 @@ { db_mgmt_ConnectionRef conn(db_mgmt_ConnectionRef::cast_from(info.get("connection"))); - ServerState new_state = (info.get_int("state") != 0 ? RunningState : PossiblyStoppedState); + ServerState new_state = UnknownState; + if (info.get_int("state") == 1) + { + _serverIsOffline = false; + new_state = RunningState; + } + else if (info.get_int("state") == -1) + { + _serverIsOffline = true; + new_state = OfflineState; + } + else + { + _serverIsOffline = false; + new_state = PossiblyStoppedState; + } if (_last_server_running_state != new_state) { _last_server_running_state = new_state; - if (new_state == RunningState && ping()) + if ((new_state == RunningState || new_state == OfflineState) && ping()) { // if new state is running but we're already connected, don't do anything return; @@ -674,7 +733,6 @@ return false; } - void SqlEditorForm::schema_tree_did_populate() { if (!_pending_expand_nodes.empty() && _grtm->get_app_option_int("DbSqlEditor:SchemaTreeRestoreState", 1)) @@ -1118,9 +1176,10 @@ sql::AuthenticationError *auth_error; bool password_expired; bool server_probably_down; + bool serverIsOffline; grt::server_denied *serverException; - ConnectionErrorInfo() : auth_error(NULL), password_expired(false), server_probably_down(false), serverException(NULL) {} + ConnectionErrorInfo() : auth_error(NULL), password_expired(false), server_probably_down(false), serverIsOffline(false), serverException(NULL) {} ~ConnectionErrorInfo() { delete auth_error; @@ -1194,7 +1253,7 @@ return false; } } - catch (grt::grt_runtime_error &err) + catch (grt::grt_runtime_error &/*err*/) { if (error_ptr.serverException != NULL) throw grt::server_denied(*error_ptr.serverException); @@ -1204,7 +1263,7 @@ if (!error_ptr.auth_error) throw; - else if (error_ptr.server_probably_down) + else if (error_ptr.server_probably_down || error_ptr.serverIsOffline) return false; //check if user cancelled @@ -1325,7 +1384,7 @@ // open connections create_connection(_aux_dbc_conn, _connection, tunnel, auth, _aux_dbc_conn->autocommit_mode, false); create_connection(_usr_dbc_conn, _connection, tunnel, auth, _usr_dbc_conn->autocommit_mode, true); - + _serverIsOffline = false; cache_sql_mode(); try @@ -1423,7 +1482,33 @@ return grt::StringRef(); } - else if (exc.getErrorCode() == 3159 || exc.getErrorCode() == 3032) //require SSL, offline mode + else if (exc.getErrorCode() == 3032) + { + err_ptr->serverIsOffline = true; + _serverIsOffline = true; + add_log_message(WarningMsg, exc.what(), "Could not connect, server is in offline mode.", ""); + + if (_connection.is_valid()) + { + // if there's no connection, then we continue anyway if this is a local connection or + // a remote connection with remote admin enabled.. + _grtm->get_grt()->get_module("WbAdmin"); + grt::BaseListRef args(_grtm->get_grt()); + args.ginsert(_connection); + } + + log_info("Error %i connecting to server, server is in offline mode. Only superuser connection are allowed. Opening editor with no connection\n", + exc.getErrorCode()); + + // Create a parser with some sensible defaults if we cannot connect. + // We specify no charsets here, disabling parsing of repertoires. + parser::MySQLParserServices::Ref services = parser::MySQLParserServices::get(grt); + _work_parser_context = services->createParserContext(GrtCharacterSetsRef(grt), bec::int_to_version(grt, 50503), true); + _work_parser_context->use_sql_mode(_sql_mode); + + return grt::StringRef(); + } + else if (exc.getErrorCode() == 3159) //require SSL, offline mode { err_ptr->serverException = new grt::server_denied(exc.what(), exc.getErrorCode()); // we need to change exception type so we can properly handle it in } @@ -1439,15 +1524,6 @@ //-------------------------------------------------------------------------------------------------- -base::RecMutexLock SqlEditorForm::get_autocompletion_connection(sql::Dbc_connection_handler::Ref &conn) -{ - RecMutexLock lock(ensure_valid_aux_connection()); - conn = _aux_dbc_conn; - return lock; -} - -//-------------------------------------------------------------------------------------------------- - /** * Triggered when the auto completion cache switches activity. We use this to update our busy * indicator. @@ -1472,13 +1548,55 @@ } +void SqlEditorForm::checkIfOffline() +{ + base::RecMutexTryLock tmp(_usr_dbc_conn_mutex); + int counter = 1; + while(!tmp.locked()) + { + if (counter >= 30) + { + log_error("Can't lock conn mutex for 30 seconds, assuming server is not offline."); + return; + } + + log_debug3("Can't lock conn mutex, trying again in one sec."); +#if _WIN32 + Sleep(1); +#else + sleep(1); +#endif + counter++; + tmp.retry_lock(_usr_dbc_conn_mutex); + } + + + std::string result; + if (_usr_dbc_conn && get_session_variable(_usr_dbc_conn->ref.get(), "offline_mode", result)) + { + if (base::string_compare(result, "ON") == 0) + _serverIsOffline = true; + } +} + +bool SqlEditorForm::offline() +{ + + if (_serverIsOffline) + return true; + + if (!connected()) + return false; + + return _serverIsOffline; +} + bool SqlEditorForm::ping() const { { base::RecMutexTryLock tmp(_usr_dbc_conn_mutex); if (!tmp.locked()) //is conn mutex is locked by someone else, then we assume the conn is in use and thus, there'a a connection. return true; - if (_usr_dbc_conn && _usr_dbc_conn->ref.get_ptr()) { std::auto_ptr stmt(_usr_dbc_conn->ref->createStatement()); @@ -1487,32 +1605,33 @@ std::auto_ptr result(stmt->executeQuery("select 1")); return true; } - catch (...) + catch(const std::exception &ex) { - // failed + log_error("Failed to ping the server: %s\n", ex.what()); } + } } return false; } -base::RecMutexLock SqlEditorForm::ensure_valid_aux_connection(sql::Dbc_connection_handler::Ref &conn) +base::RecMutexLock SqlEditorForm::ensure_valid_aux_connection(sql::Dbc_connection_handler::Ref &conn, bool lockOnly) { - RecMutexLock lock(ensure_valid_dbc_connection(_aux_dbc_conn, _aux_dbc_conn_mutex)); + RecMutexLock lock(ensure_valid_dbc_connection(_aux_dbc_conn, _aux_dbc_conn_mutex, lockOnly)); conn = _aux_dbc_conn; return lock; } -RecMutexLock SqlEditorForm::ensure_valid_aux_connection(bool throw_on_block) +RecMutexLock SqlEditorForm::ensure_valid_aux_connection(bool throw_on_block, bool lockOnly) { - return ensure_valid_dbc_connection(_aux_dbc_conn, _aux_dbc_conn_mutex, throw_on_block); + return ensure_valid_dbc_connection(_aux_dbc_conn, _aux_dbc_conn_mutex, throw_on_block, lockOnly); } -RecMutexLock SqlEditorForm::ensure_valid_usr_connection(bool throw_on_block) +RecMutexLock SqlEditorForm::ensure_valid_usr_connection(bool throw_on_block, bool lockOnly) { - return ensure_valid_dbc_connection(_usr_dbc_conn, _usr_dbc_conn_mutex, throw_on_block); + return ensure_valid_dbc_connection(_usr_dbc_conn, _usr_dbc_conn_mutex, throw_on_block, lockOnly); } @@ -1534,15 +1653,28 @@ RecMutexLock SqlEditorForm::ensure_valid_dbc_connection(sql::Dbc_connection_handler::Ref &dbc_conn, base::RecMutex &dbc_conn_mutex, - bool throw_on_block) + bool throw_on_block, bool lockOnly) { RecMutexLock mutex_lock(dbc_conn_mutex, throw_on_block); - bool valid= false; + bool valid = false; sql::Dbc_connection_handler::Ref myref(dbc_conn); if (dbc_conn && dbc_conn->ref.get_ptr()) { - if (dbc_conn->ref->isClosed()) + if (lockOnly) //this is a special case, we need it in some situations like for example recordset_cdbc + return mutex_lock; + + try + { + //use connector::isValid to check if server connection is valid + //this will also ping the server and reconnect if needed + valid = dbc_conn->ref->isValid(); + } catch (std::exception &exc) + { + log_error("CppConn::isValid exception: %s", exc.what()); + valid = false; + } + if (!valid) { bool user_connection = _usr_dbc_conn ? dbc_conn->ref.get_ptr() == _usr_dbc_conn->ref.get_ptr() : false; @@ -1924,12 +2056,6 @@ std::pair statement_range; BOOST_FOREACH (statement_range, statement_ranges) { - if (total_result_count >= max_resultset_count) - { - results_left = true; - break; - } - statement = sql->substr(statement_range.first, statement_range.second); std::list sub_statements; sql_facade->splitSqlScript(statement, sub_statements); @@ -1963,8 +2089,8 @@ data_storage= Recordset_cdbc_storage::create(_grtm); data_storage->set_gather_field_info(true); data_storage->rdbms(rdbms()); - data_storage->dbms_conn(_usr_dbc_conn); - data_storage->aux_dbms_conn(_aux_dbc_conn); + data_storage->setUserConnectionGetter(boost::bind(&SqlEditorForm::getUserConnection, this, _1, _2)); + data_storage->setAuxConnectionGetter(boost::bind(&SqlEditorForm::getAuxConnection, this, _1, _2)); SqlFacade::String_tuple_list column_names; @@ -2071,10 +2197,10 @@ { int count= 0; const sql::SQLWarning *w = warnings; - while (w) + while (w) { warnings_message.append(strfmt("\n%i %s", w->getErrorCode(), w->getMessage().c_str())); - count++; + count++; w= w->getNextWarning(); } message.append(strfmt(_(", %i warning(s):"), count)); @@ -2085,7 +2211,7 @@ } if (!last_statement_info->empty()) message.append("\n").append(last_statement_info); - set_log_message(log_message_index, has_warning ? DbSqlEditorLog::WarningMsg : DbSqlEditorLog::OKMsg, message, statement, statement_exec_timer.duration_formatted()); + set_log_message(log_message_index, has_warning ? DbSqlEditorLog::WarningMsg : DbSqlEditorLog::OKMsg, message, statement, statement_exec_timer.duration_formatted()); } if (query_ps_stats) @@ -2101,22 +2227,26 @@ { for (size_t processed_substatements_count= 0; processed_substatements_count < multiple_statement_count; ++processed_substatements_count) { - if (total_result_count >= max_resultset_count) - { - results_left = true; - break; - } - do { - if (total_result_count >= max_resultset_count) - { - results_left = true; - break; - } - if (more_results) { + if (total_result_count == max_resultset_count) + { + int result = mforms::Utilities::show_warning(_("Maximum result count reached"), + "No further result tabs will be displayed as the maximm number has been reached. \nYou may stop the operation, leaving the connection out of sync. You'll have to got o 'Query->Reconnect to server' menu item to reset the state.\n\n Do you want to cancel the operation?", + "Yes", "No"); + if (result == mforms::ResultOk) + { + add_log_message(DbSqlEditorLog::ErrorMsg, "Not more results could be displayed. Operation cancelled by user", statement, ""); + dbc_statement->cancel(); + dbc_statement->close(); + return grt::StringRef(""); + } + add_log_message(DbSqlEditorLog::WarningMsg, "Not more results will be displayed because the maximum number of result sets was reached.", statement, ""); + } + + if (!reuse_log_msg && ((updated_rows_count >= 0) || (resultset_count))) log_message_index= add_log_message(DbSqlEditorLog::BusyMsg, _("Fetching..."), statement, "- / ?"); else @@ -2151,6 +2281,7 @@ err_msg= strfmt(_("Error Code: %i. %s"), e.getErrorCode(), e.what()); break; } + set_log_message(log_message_index, DbSqlEditorLog::ErrorMsg, err_msg, statement, statement_exec_timer.duration_formatted()); if (_continue_on_error) @@ -2159,15 +2290,21 @@ goto stop_processing_sql_script; } } - if (dbc_resultset) + + std::string exec_and_fetch_durations= + (((updated_rows_count >= 0) || (resultset_count)) ? std::string("-") : statement_exec_timer.duration_formatted()) + " / " + + statement_fetch_timer.duration_formatted(); + if (total_result_count >= max_resultset_count) + set_log_message(log_message_index, DbSqlEditorLog::OKMsg, "Row count could not be verified", statement, exec_and_fetch_durations); + else if (dbc_resultset) { if (!data_storage) { data_storage= Recordset_cdbc_storage::create(_grtm); data_storage->set_gather_field_info(true); data_storage->rdbms(rdbms()); - data_storage->dbms_conn(_usr_dbc_conn); - data_storage->aux_dbms_conn(_aux_dbc_conn); + data_storage->setUserConnectionGetter(boost::bind(&SqlEditorForm::getUserConnection, this, _1, _2)); + data_storage->setAuxConnectionGetter(boost::bind(&SqlEditorForm::getAuxConnection, this, _1, _2)); if (table_name.empty()) data_storage->sql_query(statement); data_storage->schema_name(schema_name); @@ -2194,13 +2331,7 @@ } rs->data_storage(data_storage); - - { - //We need this mutex, because reset(bool) is using aux_connection - //to query bestrowidentifier. - RecMutexLock aux_mtx(ensure_valid_aux_connection(_aux_dbc_conn)); - rs->reset(true); - } + rs->reset(true); if (data_storage->valid()) // query statement { @@ -2213,37 +2344,25 @@ std::string statement_res_msg = base::to_string(rs->row_count()) + _(" row(s) returned"); if (!last_statement_info->empty()) statement_res_msg.append("\n").append(last_statement_info); - std::string exec_and_fetch_durations= - (((updated_rows_count >= 0) || (resultset_count)) ? std::string("-") : statement_exec_timer.duration_formatted()) + " / " + - statement_fetch_timer.duration_formatted(); set_log_message(log_message_index, DbSqlEditorLog::OKMsg, statement_res_msg, statement, exec_and_fetch_durations); } - //! else failed to fetch data - //added_recordsets.push_back(rs); ++resultset_count; - ++total_result_count; } else { reuse_log_msg= true; } + ++total_result_count; data_storage.reset(); } } while ((more_results = dbc_statement->getMoreResults())); - - // If we stopped fetching before we got to the end of the result sets finish - // fetching here. - while (dbc_statement->getMoreResults()) - ; } } if ((updated_rows_count < 0) && !(resultset_count)) - { set_log_message(log_message_index, DbSqlEditorLog::OKMsg, _("OK"), statement, statement_exec_timer.duration_formatted()); - } } } } // BOOST_FOREACH (statement, statements) @@ -2353,7 +2472,7 @@ else if (object_type == "db.Schema") return LiveSchemaTree::Schema; - return LiveSchemaTree::None; + return LiveSchemaTree::NoneType; } void SqlEditorForm::handle_command_side_effects(const std::string &sql) @@ -2369,7 +2488,7 @@ { wb::LiveSchemaTree::ObjectType obj = str_to_object_type(object_type); - if (obj != wb::LiveSchemaTree::None) + if (obj != wb::LiveSchemaTree::NoneType) { std::vector >::reverse_iterator rit; @@ -2467,11 +2586,12 @@ return; _continue_on_error= val; - _grtm->set_app_option("DbSqlEditor:ContinueOnError", grt::IntegerRef((int)_continue_on_error)); + _grtm->set_app_option("DbSqlEditor:ContinueOnError", grt::IntegerRef((int)continue_on_error())); if (_menu) - _menu->set_item_checked("query.stopOnError", !continue_on_error()); - set_editor_tool_items_checked("query.stopOnError", !continue_on_error()); + _menu->set_item_checked("query.continueOnError", continue_on_error()); + set_editor_tool_items_checked("query.continueOnError", continue_on_error()); + active_sql_editor_panel()->editor_be()->set_continue_on_error(continue_on_error()); } @@ -2479,6 +2599,7 @@ { try { + log_debug3("KeepAliveInterval tick\n"); // ping server and reset connection timeout counter // this also checks the connection state and restores it if possible ensure_valid_aux_connection(); @@ -2496,11 +2617,15 @@ try { - RecMutexLock usr_dbc_conn_mutex= ensure_valid_usr_connection(); + bool auto_commit = false; + // we need transaction to enforce atomicity of change set // so if autocommit is currently enabled disable it temporarily - bool auto_commit= _usr_dbc_conn->ref->getAutoCommit(); + { + RecMutexLock usr_dbc_conn_mutex = ensure_valid_usr_connection(); + auto_commit = _usr_dbc_conn->ref->getAutoCommit(); + } ScopeExitTrigger autocommit_mode_keeper; int res= -2; @@ -2519,6 +2644,7 @@ autocommit_mode_keeper.slot= boost::bind( &sql::Connection::setAutoCommit, _usr_dbc_conn->ref.get(), auto_commit); + RecMutexLock usr_dbc_conn_mutex = ensure_valid_usr_connection(); _usr_dbc_conn->ref->setAutoCommit(false); } @@ -3147,35 +3273,42 @@ */ void SqlEditorForm::note_connection_open_outcome(int error) { - ServerState new_state; + ServerState newState; switch (error) { case 0: - new_state = RunningState; // success = running; + newState = RunningState; // success = running; break; case 2002: // CR_CONNECTION_ERROR case 2003: // CR_CONN_HOST_ERROR - new_state = PossiblyStoppedState; + newState = PossiblyStoppedState; break; case 2013: // Lost packet blabla, can happen on failure when using ssh tunnel - new_state = PossiblyStoppedState; + newState = PossiblyStoppedState; break; default: // there may be other errors that could indicate server stopped and maybe // some errors that can't tell anything about the server state - new_state = RunningState; + newState = RunningState; break; } - if (_last_server_running_state != new_state && new_state != UnknownState) + if (_last_server_running_state != newState && newState != UnknownState) { grt::DictRef info(_grtm->get_grt()); - _last_server_running_state = new_state; + _last_server_running_state = newState; + + if (newState == RunningState) + info.gset("state", 1); + else if (newState == OfflineState) + info.gset("state", -1); + else + info.gset("state", 0); - info.gset("state", new_state == RunningState); info.set("connection", connection_descriptor()); - log_debug("Notifying server state change of %s to %s\n", connection_descriptor()->hostIdentifier().c_str(), new_state == RunningState ? "running" : "not running"); + log_debug("Notifying server state change of %s to %s\n", connection_descriptor()->hostIdentifier().c_str(), + (newState == RunningState || newState == OfflineState) ? "running" : "not running"); GRTNotificationCenter::get()->send_grt("GRNServerStateChanged", grtobj(), info); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_form.h mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_form.h --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_form.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_form.h 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -81,7 +81,8 @@ { UnknownState, RunningState, - PossiblyStoppedState + PossiblyStoppedState, + OfflineState }; @@ -247,6 +248,8 @@ public: bool connect(boost::shared_ptr tunnel); bool connected() const; + void checkIfOffline(); + bool offline(); bool ping() const; void finish_startup(); void cancel_query(); @@ -293,12 +296,12 @@ void create_connection(sql::Dbc_connection_handler::Ref &dbc_conn, db_mgmt_ConnectionRef db_mgmt_conn, boost::shared_ptr tunnel, sql::Authentication::Ref auth, bool autocommit_mode, bool user_connection); void init_connection(sql::Connection* dbc_conn_ref, const db_mgmt_ConnectionRef& connectionProperties, sql::Dbc_connection_handler::Ref& dbc_conn, bool user_connection); void close_connection(sql::Dbc_connection_handler::Ref &dbc_conn); - base::RecMutexLock ensure_valid_dbc_connection(sql::Dbc_connection_handler::Ref &dbc_conn, base::RecMutex &dbc_conn_mutex, bool throw_on_block = false); - base::RecMutexLock ensure_valid_usr_connection(bool throw_on_block = false); - base::RecMutexLock ensure_valid_aux_connection(bool throw_on_block = false); + base::RecMutexLock ensure_valid_dbc_connection(sql::Dbc_connection_handler::Ref &dbc_conn, base::RecMutex &dbc_conn_mutex, bool throw_on_block = false, bool lockOnly = false); + base::RecMutexLock ensure_valid_usr_connection(bool throw_on_block = false, bool lockOnly = false); + base::RecMutexLock ensure_valid_aux_connection(bool throw_on_block = false, bool lockOnly = false); public: - base::RecMutexLock ensure_valid_aux_connection(sql::Dbc_connection_handler::Ref &conn); + base::RecMutexLock ensure_valid_aux_connection(sql::Dbc_connection_handler::Ref &conn, bool lockOnly = false); parser::ParserContext::Ref work_parser_context() { return _work_parser_context; }; private: @@ -322,8 +325,10 @@ ServerState _last_server_running_state; AutoCompleteCache *_auto_completion_cache; - base::RecMutexLock get_autocompletion_connection(sql::Dbc_connection_handler::Ref &conn); void on_cache_action(bool active); + base::RecMutexLock getAuxConnection(sql::Dbc_connection_handler::Ref &conn, bool lockOnly = false); + base::RecMutexLock getUserConnection(sql::Dbc_connection_handler::Ref &conn, bool lockOnly = false); + ColumnWidthCache *_column_width_cache; public: @@ -444,6 +449,7 @@ protected: DbSqlEditorLog::Ref _log; DbSqlEditorHistory::Ref _history; + bool _serverIsOffline; public: // Result should be RowId but that requires to change the task callback type (at least for 64bit builds). diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_form_ui.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_form_ui.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_form_ui.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_form_ui.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -165,7 +165,7 @@ _menu->set_item_enabled("query.discard_edits", false); _menu->set_item_enabled("query.export", false); - _menu->set_item_checked("query.stopOnError", !continue_on_error()); + _menu->set_item_checked("query.continueOnError", continue_on_error()); } return _menu; } @@ -193,7 +193,7 @@ _menu->set_item_enabled("query.explain_current_statement", !running && connected); _menu->set_item_enabled("query.commit", !running && !auto_commit() && connected); _menu->set_item_enabled("query.rollback", !running && !auto_commit() && connected); - _menu->set_item_enabled("query.stopOnError", connected); + _menu->set_item_enabled("query.continueOnError", connected); mforms::MenuItem *item = _menu->find_item("query.autocommit"); if (item) { @@ -230,9 +230,9 @@ set_editor_tool_items_enbled("query.commit", !running && !auto_commit() && connected); set_editor_tool_items_enbled("query.rollback", !running && !auto_commit() && connected); set_editor_tool_items_enbled("query.autocommit", !running && connected); - set_editor_tool_items_enbled("query.stopOnError", connected); + set_editor_tool_items_enbled("query.continueOnError", connected); set_editor_tool_items_checked("query.autocommit", auto_commit()); - set_editor_tool_items_checked("query.stopOnError", !_continue_on_error); + set_editor_tool_items_checked("query.continueOnError", _continue_on_error); set_editor_tool_items_checked("query.toggleLimit", _grtm->get_app_option_int("SqlEditor:LimitRows") != 0); } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_panel.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_panel.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_panel.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_panel.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -96,7 +96,7 @@ add(&_splitter, true, true); mforms::CodeEditor* code_editor = editor_be()->get_editor_control(); - + code_editor->set_name("code editor"); _editor_box.add(setup_editor_toolbar(), false, true); _editor_box.add_end(code_editor, true, true); @@ -386,12 +386,13 @@ SqlEditorPanel::AutoSaveInfo::AutoSaveInfo(const std::string &info_file) : word_wrap(false), show_special(false) { - char buffer[4098]; - std::ifstream f(info_file.c_str()); + wchar_t buffer[4098] = {0}; + std::wifstream f; + openStream(info_file, f); while (f.getline(buffer, sizeof(buffer))) { std::string key, value; - base::partition(buffer, "=", key, value); + base::partition(base::wstring_to_string(buffer), "=", key, value); if (key == "orig_encoding") orig_encoding = value; else if (key == "type") @@ -681,36 +682,39 @@ { // save info about the file { - std::ofstream f(bec::make_path(path, _autosave_file_suffix+".info").c_str()); - + std::wofstream f; + openStream(bec::make_path(path, _autosave_file_suffix + ".info"), f); + std::string content; if (_is_scratch) - f << "type=scratch\n"; + content += "type=scratch\n"; else - f << "type=file\n"; + content += "type=file\n"; if (!_is_scratch && !_filename.empty()) { - f << "filename=" << _filename << "\n"; + content += "filename=" + _filename + "\n"; } - f << "orig_encoding=" << _orig_encoding << "\n"; + content += "orig_encoding=" + _orig_encoding + "\n"; - f << "title="<<_title<<"\n"; + content += "title=" + _title + "\n"; if (get_toolbar()->get_item_checked("query.toggleInvisible")) - f << "show_special=1\n"; + content += "show_special=1\n"; else - f << "show_special=0\n"; + content += "show_special=0\n"; if (get_toolbar()->get_item_checked("query.toggleWordWrap")) - f << "word_wrap=1\n"; + content += "word_wrap=1\n"; else - f << "word_wrap=0\n"; + content += "word_wrap=0\n"; size_t caret_pos = _editor->get_editor_control()->get_caret_pos(); - f << "caret_pos=" << caret_pos << "\n"; + content += "caret_pos=" + base::to_string(caret_pos) + "\n"; size_t first_line = _editor->get_editor_control()->send_editor(SCI_GETFIRSTVISIBLELINE, 0, 0); - f << "first_visible_line=" << first_line << "\n"; + content += "first_visible_line=" + base::to_string(first_line) + "\n"; + if (f.good()) + f << base::string_to_wstring(content); f.close(); } @@ -784,7 +788,7 @@ mforms::ToolBar *SqlEditorPanel::setup_editor_toolbar() { - mforms::ToolBar *tbar(new mforms::ToolBar(mforms::SecondaryToolBar)); + mforms::ToolBar *tbar(mforms::manage(new mforms::ToolBar(mforms::SecondaryToolBar))); #ifdef _WIN32 tbar->set_size(-1, 27); #endif @@ -837,7 +841,7 @@ tbar->add_item(mforms::manage(new mforms::ToolBarItem(mforms::SeparatorItem))); item = mforms::manage(new mforms::ToolBarItem(mforms::ToggleItem)); - item->set_name("query.stopOnError"); + item->set_name("query.continueOnError"); item->set_alt_icon(IconManager::get_instance()->get_icon_path("qe_sql-editor-tb-icon_stop-on-error-on.png")); item->set_icon(IconManager::get_instance()->get_icon_path("qe_sql-editor-tb-icon_stop-on-error-off.png")); item->set_tooltip(_("Toggle whether execution of SQL script should continue after failed statements")); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_result_panel.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_result_panel.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_result_panel.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_result_panel.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -917,14 +917,11 @@ } int rows_of_text = (int)stages.size() / 3 + 1; - cairo_surface_t *surf = cairo_image_surface_create(CAIRO_FORMAT_RGB24, 800, 30 + 20 + rows_of_text * 25); + cairo_surface_t *surf = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 800, 30 + 20 + rows_of_text * 25); cairo_t *cr = cairo_create(surf); cairo_set_font_size(cr, 12); - cairo_set_line_width(cr, 1); - cairo_set_source_rgb(cr, 1, 1, 1); - cairo_paint(cr); double x = 0.0; for (size_t i = 0; i < stages.size(); i++) @@ -1003,14 +1000,11 @@ } int rows_of_text = (int)waits.size() / 2 + 1; - cairo_surface_t *surf = cairo_image_surface_create(CAIRO_FORMAT_RGB24, 800, 30 + 20 + rows_of_text * 25); + cairo_surface_t *surf = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 800, 30 + 20 + rows_of_text * 25); cairo_t *cr = cairo_create(surf); cairo_set_font_size(cr, 12); - cairo_set_line_width(cr, 1); - cairo_set_source_rgb(cr, 1, 1, 1); - cairo_paint(cr); double x = 0.0; for (size_t i = 0; i < waits.size(); i++) @@ -1096,7 +1090,7 @@ // if we're in a server with PS, show some extra PS goodies std::map &ps_stats(rsdata->ps_stat_info); - if (ps_stats.empty()) + if (ps_stats.size() <= 1) // "EVENT_ID" is always present { if (!rsdata->ps_stat_error.empty()) box->add(bold_label(rsdata->ps_stat_error), false, true); @@ -1185,7 +1179,7 @@ std::string file = render_stages(stages); mforms::ImageBox *image = mforms::manage(new mforms::ImageBox()); image->set_image(file); - table->add(image, 0, 2, 3, 4, mforms::HFillFlag); + table->add(image, 0, 2, 3, 4, mforms::FillAndExpand); } std::vector waits(rsdata->ps_wait_info); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_tree_controller.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_tree_controller.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/sqlide/wb_sql_editor_tree_controller.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/sqlide/wb_sql_editor_tree_controller.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -188,6 +188,7 @@ // Left hand sidebar tabview with admin and schema tree pages. _task_tabview = new mforms::TabView(mforms::TabViewSelectorSecondary); _schema_side_bar = (wb::SimpleSidebar *)mforms::TaskSidebar::create("SchemaTree"); + _schema_side_bar->set_grt_manager(_grtm); scoped_connect(_schema_side_bar->on_section_command(), boost::bind(&SqlEditorTreeController::sidebar_action, this, _1)); _admin_side_bar = (wb::SimpleSidebar *)mforms::TaskSidebar::create("Simple"); scoped_connect(_admin_side_bar->on_section_command(), boost::bind(&SqlEditorTreeController::sidebar_action, this, _1)); @@ -497,16 +498,17 @@ StringListPtr functions(new std::list()); MutexLock schema_contents_mutex(_schema_contents_mutex); - if (arrived_slot.empty()) return grt::StringRef(""); { sql::Dbc_connection_handler::Ref conn; RecMutexLock aux_dbc_conn_mutex(_owner->ensure_valid_aux_connection(conn)); + std::auto_ptr stmt(conn->ref->createStatement()); { - std::auto_ptr rs(conn->ref->createStatement()->executeQuery(std::string(sqlstring("SHOW FULL TABLES FROM !", 0) << schema_name))); + std::auto_ptr stmt(conn->ref->createStatement()); + std::auto_ptr rs(stmt->executeQuery(std::string(sqlstring("SHOW FULL TABLES FROM !", 0) << schema_name))); while (rs->next()) { std::string name = rs->getString(1); @@ -527,7 +529,7 @@ // will become unnecessary then try { - std::auto_ptr rs(conn->ref->createStatement()->executeQuery(std::string(sqlstring("SELECT name, type FROM mysql.proc WHERE Db=?", 0) << schema_name))); + std::auto_ptr rs(stmt->executeQuery(std::string(sqlstring("SELECT name, type FROM mysql.proc WHERE Db=?", 0) << schema_name))); while (rs->next()) { @@ -549,7 +551,7 @@ if (_use_show_procedure) { { - std::auto_ptr rs(conn->ref->createStatement()->executeQuery(std::string(sqlstring("SHOW PROCEDURE STATUS WHERE Db=?", 0) << schema_name))); + std::auto_ptr rs(stmt->executeQuery(std::string(sqlstring("SHOW PROCEDURE STATUS WHERE Db=?", 0) << schema_name))); while (rs->next()) { @@ -558,7 +560,7 @@ } } { - std::auto_ptr rs(conn->ref->createStatement()->executeQuery(std::string(sqlstring("SHOW FUNCTION STATUS WHERE Db=?", 0) << schema_name))); + std::auto_ptr rs(stmt->executeQuery(std::string(sqlstring("SHOW FUNCTION STATUS WHERE Db=?", 0) << schema_name))); while (rs->next()) { std::string name = rs->getString(2); @@ -1565,11 +1567,14 @@ return; } #endif - - db_object->customData().set("sqlMode", grt::StringRef(sql_mode)); - db_object->customData().set("originalObjectDDL", grt::StringRef(ddl_script)); - - open_alter_object_editor(db_object, server_state_catalog); + if (db_object.is_valid()) + { + db_object->customData().set("sqlMode", grt::StringRef(sql_mode)); + db_object->customData().set("originalObjectDDL", grt::StringRef(ddl_script)); + open_alter_object_editor(db_object, server_state_catalog); + } + else + log_warning("Failed to create/alter `%s`.`%s`", used_schema_name.c_str(), obj_name.c_str()); } catch (const std::exception &e) { @@ -1608,6 +1613,22 @@ //TODO use DB_Plugin here somehow comparer.load_db_options(conn->ref->getMetaData()); } + + db_mgmt_RdbmsRef rdbms= _owner->rdbms(); + //std::string database_package= *rdbms->databaseObjectPackage(); + + if (rdbms.is_valid()) + { + rdbms = grt::shallow_copy_object(rdbms); + rdbms->version(grt::shallow_copy_object(_owner->rdbms_version())); + rdbms->version()->owner(rdbms); + } + + if (!client_state_catalog->version().is_valid()) + client_state_catalog->version(rdbms->version()); + if (!server_state_catalog->version().is_valid()) + server_state_catalog->version(rdbms->version()); + object->customData().set("DBSettings", comparer.get_options_dict()); object->customData().set("liveRdbms", _owner->rdbms()); object->customData().set("ownerSqlEditor", _owner->wbsql()->get_grt_editor_object(_owner)); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/home_screen_connections.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/home_screen_connections.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/home_screen_connections.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/home_screen_connections.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -470,7 +470,7 @@ print_info_line(cr, line_bounds, _("Mode:"), parameter_values.get_string("fabric_mode")); line_bounds.pos.y += DETAILS_LINE_HEIGHT; - print_info_line(cr, line_bounds, _("Weight:"), parameter_values.get("fabric_weight").repr()); + print_info_line(cr, line_bounds, _("Weight:"), parameter_values.get("fabric_weight").toString()); line_bounds.pos.y += DETAILS_LINE_HEIGHT; } else @@ -1045,7 +1045,7 @@ virtual base::Color get_current_color(bool hot) { - std::string status = base::strip_text(connection->parameterValues().get("fabric_status").repr()); + std::string status = base::strip_text(connection->parameterValues().get("fabric_status").toString()); if (status == "PRIMARY") return hot ? owner->_managed_primary_tile_bk_color_hl : owner->_managed_primary_tile_bk_color; else if (status == "SECONDARY") @@ -1061,8 +1061,8 @@ { ConnectionEntry::draw_tile_text(cr, x, y, alpha, high_contrast); - std::string status = base::strip_text(connection->parameterValues().get("fabric_status").repr()); - std::string mode = base::strip_text(connection->parameterValues().get("fabric_mode").repr()); + std::string status = base::strip_text(connection->parameterValues().get("fabric_status").toString()); + std::string mode = base::strip_text(connection->parameterValues().get("fabric_mode").toString()); y = bounds.top() + 56 - image_height(owner->_managed_status_icon); draw_icon_with_text(cr, bounds.left() + bounds.width()*2/3, y, owner->_managed_status_icon, status, alpha, high_contrast); @@ -1073,7 +1073,7 @@ virtual std::string section_name() { - return "Group "+base::strip_text(connection->parameterValues().get("fabric_group_id").repr()); + return "Group " + base::strip_text(connection->parameterValues().get("fabric_group_id").toString()); } }; @@ -1202,7 +1202,7 @@ { ConnectionEntry::draw_tile_text(cr, x, y, alpha, high_contrast); { - std::string ha_filter = base::strip_text(connection->parameterValues().get("haGroupFilter").repr()); + std::string ha_filter = base::strip_text(connection->parameterValues().get("haGroupFilter").toString()); std::string tile_groups; if (ha_filter.length()) diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/home_screen.h mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/home_screen.h --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/home_screen.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/home_screen.h 2016-10-14 12:12:04.000000000 +0000 @@ -129,7 +129,7 @@ virtual std::string get_acc_name() { return name; } virtual std::string get_acc_default_action() { return default_action;} - virtual Accessible::Role get_acc_role() { return Accessible::PushButton;} + virtual Accessible::Role get_acc_role() { return mforms::Accessible::PushButton;} virtual base::Rect get_acc_bounds() { return bounds;} virtual void do_default_action() @@ -162,7 +162,7 @@ std::vector _oldAuthList; public: HomeScreen(CommandUI *cmdui, db_mgmt_ManagementRef rdbms); - ~HomeScreen(); + virtual ~HomeScreen(); db_mgmt_ManagementRef rdbms() { return _rdbms; }; diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/stdafx.h mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/stdafx.h --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/stdafx.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/stdafx.h 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -45,6 +45,7 @@ #include #include #include +#include #define _USE_MATH_DEFINES #include @@ -52,6 +53,8 @@ #include #include #include +#include +#include #include #include diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/unit-tests/wb_context_test.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/unit-tests/wb_context_test.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/unit-tests/wb_context_test.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/unit-tests/wb_context_test.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -46,7 +46,7 @@ // reverse engineered content from, nor where it was sync'ed to. So we have to mimic this here. std::string target_version = tester.wb->get_grt_manager()->get_app_option_string("DefaultTargetMySQLVersion"); if (target_version.empty()) - target_version = "5.5"; + target_version = "5.5.49"; tester.get_rdbms()->version(parse_version(tester.grt, target_version)); } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/unit-tests/wb_copy_paste_test.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/unit-tests/wb_copy_paste_test.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/unit-tests/wb_copy_paste_test.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/unit-tests/wb_copy_paste_test.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -53,7 +53,7 @@ value1= source.get_member(member->name); value2= copy.get_member(member->name); - ensure_equals(member->name, value1.repr(), value2.repr()); + ensure_equals(member->name, value1.toString(), value2.toString()); return true; } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_context.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_context.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_context.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_context.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -882,8 +882,6 @@ // Copy callbacks this->show_file_dialog= callbacks->show_file_dialog; - this->request_input= callbacks->request_input; - this->create_diagram= callbacks->create_diagram; this->destroy_view= callbacks->destroy_view; this->switched_view= callbacks->switched_view; @@ -1739,8 +1737,7 @@ set_default(options, "SynchronizeObjectColors", 1); // MySQL Defaults - set_default(options, "DefaultTargetMySQLVersion", "5.6"); - set_default(options, "@DefaultTargetMySQLVersion/Items", "5.0,5.1,5.5,5.6,5.7"); + set_default(options, "DefaultTargetMySQLVersion", "5.6.30"); set_default(options, "db.mysql.Table:tableEngine", "InnoDB"); set_default(options, "SqlGenerator.Mysql:SQL_MODE", "TRADITIONAL,ALLOW_INVALID_DATES"); @@ -1782,6 +1779,8 @@ // Default Fonts + set_default(options, "workbench.physical.FontSet:Name", "Default (Western)"); + set_default(options, "workbench.physical.TableFigure:TitleFont", DEFAULT_FONT_FAMILY" Bold 12"); set_default(options, "workbench.physical.TableFigure:SectionFont", DEFAULT_FONT_FAMILY" Bold 11"); set_default(options, "workbench.physical.TableFigure:ItemsFont", DEFAULT_FONT_FAMILY" 11"); @@ -2507,9 +2506,14 @@ refresh.str= str; refresh.ptr= ptr; refresh.timestamp= now; + +#if !defined(_WIN32) && !defined(__APPLE__) + // XXX: check this requirement. Probably already fixed since this hack was added. + // Do not remove the following refresh! W/o it linux version hangs at times. if (refresh_gui && _pending_refreshes.empty()) refresh_gui(RefreshNeeded, "", (NativeHandle)0); +#endif _pending_refreshes.push_back(refresh); } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_context.h mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_context.h --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_context.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_context.h 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -136,9 +136,6 @@ // Show some text in the application's status bar: must be thread-safe boost::function show_status_text; - // ok/cancel, title, flags, returnval - boost::function request_input; - // Open an editor // Args: grtmanager, module containing plugin, editor dll, editor class, edited object boost::function open_editor; @@ -501,11 +498,7 @@ public: // front end callbacks boost::function show_file_dialog; - boost::function show_status_text; - - boost::function request_input; - boost::function show_gui_plugin; boost::function create_diagram; diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_context_ui.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_context_ui.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_context_ui.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_context_ui.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -70,10 +70,6 @@ WBContextUI::WBContextUI(bool verbose) : _wb(new WBContext(this, verbose)), _command_ui(new CommandUI(_wb)) { - NodeId n; // workaround a bug causing crash when output tab is shown with GLib-ERROR **: The thread system is not yet initialized. - - base::NotificationCenter::get()->add_observer(this, "GNAppClosing"); - _shell_window= 0; _output_view = NULL; @@ -96,7 +92,7 @@ // stuff to do when the active form is switched in the UI (through set_active_form) _form_change_signal.connect(boost::bind(&WBContextUI::form_changed, this)); - _output_view = new OutputView(_wb); + _output_view = mforms::manage(new OutputView(_wb)); scoped_connect(_output_view->get_be()->signal_show(),boost::bind(&WBContextUI::show_output, this)); } @@ -104,40 +100,14 @@ WBContextUI::~WBContextUI() { - base::NotificationCenter::get()->remove_observer(this); - _wb->do_close_document(true); - // TODO: is it really necessary to set all member variables to NULL in a dtor? delete _addon_download_window; - _addon_download_window = 0; delete _plugin_install_window; - _plugin_install_window = 0; - if (_home_screen != NULL) - { - _home_screen->release(); - _home_screen = NULL; - } - - delete _output_view; - _output_view = 0; delete _shell_window; - _shell_window = NULL; - delete _wb; - _wb = NULL; - delete _command_ui; - _command_ui = NULL; -} - -//-------------------------------------------------------------------------------------------------- - -void WBContextUI::handle_notification(const std::string &name, void *sender, base::NotificationInfo &info) -{ - if (name == "GNAppClosing") - home_screen_closing(); } //-------------------------------------------------------------------------------------------------- @@ -212,6 +182,7 @@ void WBContextUI::finalize() { + _output_view->release(); _wb->finalize(); } @@ -898,10 +869,10 @@ case grt::StringType: case grt::DoubleType: case grt::IntegerType: - value= val.repr(); - return true; - default: - return false; + value = val.toString(); + return true; + default: + return false; } } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_context_ui.h mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_context_ui.h --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_context_ui.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_context_ui.h 2016-10-14 12:12:04.000000000 +0000 @@ -41,7 +41,6 @@ class CanvasView; } -class GUIPluginBase; class GRTShellWindow; class OutputView; class PluginInstallWindow; @@ -67,7 +66,7 @@ // this class contains functionality that the UI needs, // like menu/toolbar access, special form backends etc - class MYSQLWBBACKEND_PUBLIC_FUNC WBContextUI : public base::trackable, base::Observer + class MYSQLWBBACKEND_PUBLIC_FUNC WBContextUI : public base::trackable { public: WBContextUI(bool verbose); @@ -152,7 +151,6 @@ void refresh_home_connections(bool clear_state = true); void refresh_home_documents(); void refresh_home_starters(); - bool home_screen_closing(); bool start_plugin_install(const std::string &path); void start_plugin_net_install(const std::string &url); @@ -190,8 +188,6 @@ void handle_home_context_menu(const grt::ValueRef &object, const std::string &action); void start_plugin(const std::string& title, const std::string& command, bool force_external= false); - - virtual void handle_notification(const std::string &name, void *sender, base::NotificationInfo &info); static void home_action_callback(HomeScreenAction action, const grt::ValueRef &object, WBContextUI *self); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_context_ui_home.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_context_ui_home.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_context_ui_home.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_context_ui_home.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -298,9 +298,9 @@ _initializing_home_screen = (_home_screen == NULL); if (_home_screen == NULL) - { + { + // The home screen and its content is freed in AppView::close() during undock_view(...). _home_screen = mforms::manage(new HomeScreen(_command_ui, _wb->get_root()->rdbmsMgmt())); - _home_screen->set_on_close(boost::bind(&WBContextUI::home_screen_closing, this)); _home_screen->set_callback((home_screen_action_callback)&WBContextUI::home_action_callback, this); _home_screen->handle_context_menu = boost::bind(&WBContextUI::handle_home_context_menu, this, _1, _2); @@ -466,14 +466,6 @@ //-------------------------------------------------------------------------------------------------- -bool WBContextUI::home_screen_closing() -{ - _home_screen = NULL; - return true; -} - -//-------------------------------------------------------------------------------------------------- - void WBContextUI::home_action_callback(HomeScreenAction action, const grt::ValueRef &object, WBContextUI *self) { try @@ -598,7 +590,7 @@ } else if (action == "delete_connection_group" || action == "internal_delete_connection_group") { - std::string group = object.repr(); + std::string group = object.toString(); int answer = mforms::ResultOk; diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_module.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_module.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_module.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_module.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -95,7 +95,7 @@ #endif #elif defined(__APPLE__) #define PLATFORM_NAME "Mac OS X" - #define ARCHITECTURE "32 bit" + #define ARCHITECTURE "64 bit" #else #define PLATFORM_NAME "Linux/Unix" #define ARCHITECTURE "64 bit" @@ -1337,23 +1337,6 @@ //-------------------------------------------------------------------------------------------------- -std::string WorkbenchImpl::request_input_m(const std::string &caption) -{ - std::string result; - - if (_wb->request_input(caption, 0, result)) - return result; - return ""; -} - - -std::string WorkbenchImpl::input(const std::string &caption) -{ - return _wb->get_grt_manager()->get_dispatcher()->call_from_main_thread( - boost::bind(&WorkbenchImpl::request_input_m, this, caption), true, false); -} - - int WorkbenchImpl::confirm(const std::string &title, const std::string &caption) { return _wb->get_grt_manager()->get_dispatcher()->call_from_main_thread( @@ -1364,14 +1347,14 @@ std::string WorkbenchImpl::requestFileOpen(const std::string &caption, const std::string &extensions) { return _wb->get_grt_manager()->get_dispatcher()-> - call_from_main_thread(boost::bind(_wb->show_file_dialog, "open", caption, extensions), true, false); + call_from_main_thread(boost::bind(_wb->show_file_dialog, "open", caption, extensions), true, false); } std::string WorkbenchImpl::requestFileSave(const std::string &caption, const std::string &extensions) { return _wb->get_grt_manager()->get_dispatcher()-> - call_from_main_thread(boost::bind(_wb->show_file_dialog, "save", caption, extensions), true, false); + call_from_main_thread(boost::bind(_wb->show_file_dialog, "save", caption, extensions), true, false); } //-------------------------------------------------------------------------------------------------- diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_module.h mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_module.h --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_module.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_module.h 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -155,7 +155,6 @@ DECLARE_MODULE_FUNCTION(WorkbenchImpl::reportBug), // Utilities - DECLARE_MODULE_FUNCTION(WorkbenchImpl::input), DECLARE_MODULE_FUNCTION(WorkbenchImpl::confirm), DECLARE_MODULE_FUNCTION(WorkbenchImpl::requestFileOpen), DECLARE_MODULE_FUNCTION(WorkbenchImpl::requestFileSave), @@ -309,9 +308,6 @@ // UI int refreshHomeConnections(); - std::string request_input_m(const std::string &caption); - - std::string input(const std::string &caption); int confirm(const std::string &title, const std::string &caption); std::string requestFileOpen(const std::string &caption, const std::string &extensions); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_overview.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_overview.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_overview.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_overview.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -319,7 +319,7 @@ n = n->get_child(node[i]); else { - g_warning("OverviewBE::get_node: invalid node %s", node.repr().c_str()); + g_warning("OverviewBE::get_node: invalid node %s", node.toString().c_str()); return 0; } } @@ -327,9 +327,6 @@ return n; } - - - OverviewBE::Node *OverviewBE::get_deepest_focused() { ContainerNode *parent= _root_node; @@ -340,11 +337,9 @@ return parent; } - - /** Find an Item node in the subtree indicated by node that matches the given string by depth first search. * - * Search will beging at starting_node until the last node of the tree. If it's the nil node, it will + * Search will begin at starting_node until the last node of the tree. If it's the nil node, it will * start at the beginning of the tree. */ bec::NodeId OverviewBE::search_child_item_node_matching(const bec::NodeId &node, const bec::NodeId &starting_node, @@ -1149,7 +1144,7 @@ { UIForm *frm = dynamic_cast(this); if (frm && _wb) - _wb->request_refresh(RefreshOverviewNodeInfo, node.repr(), reinterpret_cast(frm)); + _wb->request_refresh(RefreshOverviewNodeInfo, node.toString(), reinterpret_cast(frm)); } @@ -1157,6 +1152,6 @@ { UIForm *frm = dynamic_cast(this); if (frm && _wb) - _wb->request_refresh(RefreshOverviewNodeChildren, node.repr(), reinterpret_cast(frm)); + _wb->request_refresh(RefreshOverviewNodeChildren, node.toString(), reinterpret_cast(frm)); } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_tunnel.cpp mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_tunnel.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_tunnel.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_tunnel.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -117,7 +117,6 @@ virtual void disconnect() { - _tm->close_tunnel(_port); } virtual bool get_message(std::string &type, std::string &message) @@ -330,19 +329,6 @@ return true; } - -void TunnelManager::close_tunnel(int port) -{ - WillEnterPython lock; - PyObject *ret = PyObject_CallMethod(_tunnel, (char*) "close", (char*) "i", port); - if (!ret) - { - PyErr_Print(); - return; - } - Py_XDECREF(ret); -} - void TunnelManager::set_keepalive(int port, int keepalive) { WillEnterPython lock; diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_tunnel.h mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_tunnel.h --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_tunnel.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_tunnel.h 2016-10-14 12:12:04.000000000 +0000 @@ -40,7 +40,6 @@ int open_tunnel(const char *server, const char *username, const char *password, const char *keyfile, const char *target); void wait_tunnel(int port); - void close_tunnel(int port); void set_keepalive(int port, int keepalive); public: diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_version.h mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_version.h --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_version.h 2015-12-10 13:46:21.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_version.h 2016-10-14 12:12:05.000000000 +0000 @@ -1,8 +1,8 @@ #define APP_MAJOR_NUMBER 6 #define APP_MINOR_NUMBER 3 -#define APP_RELEASE_NUMBER 6 -#define APP_BUILD_NUMBER 511 +#define APP_RELEASE_NUMBER 8 +#define APP_BUILD_NUMBER 1228 #define APP_RELEASE_TYPE "CE" #define APP_LICENSE_TYPE "GPL" diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_version.h.bak mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_version.h.bak --- mysql-workbench-6.3.6+dfsg/backend/wbprivate/workbench/wb_version.h.bak 2015-12-10 13:46:21.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbprivate/workbench/wb_version.h.bak 2016-10-14 12:12:05.000000000 +0000 @@ -1,8 +1,8 @@ #define APP_MAJOR_NUMBER 6 #define APP_MINOR_NUMBER 3 -#define APP_RELEASE_NUMBER 6 -#define APP_BUILD_NUMBER 511 +#define APP_RELEASE_NUMBER 8 +#define APP_BUILD_NUMBER 1228 #define APP_RELEASE_TYPE "CE" #define APP_LICENSE_TYPE "GPL" diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/CMakeLists.txt mysql-workbench-6.3.8+dfsg/backend/wbpublic/CMakeLists.txt --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/CMakeLists.txt 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/CMakeLists.txt 2016-10-14 12:12:04.000000000 +0000 @@ -194,5 +194,11 @@ set_target_properties(wbpublic PROPERTIES VERSION ${WB_VERSION} SOVERSION ${WB_VERSION}) +if(COMMAND cotire) + set_target_properties(wbpublic PROPERTIES + COTIRE_PREFIX_HEADER_IGNORE_PATH "${PRECOMPILED_HEADERS_EXCLUDE_PATHS}") + + cotire(wbpublic) +endif() install(TARGETS wbpublic DESTINATION ${WB_INSTALL_LIB_DIR}) diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/common.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/common.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/common.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/common.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -285,7 +285,7 @@ * This position must be local to the enclosing group. */ template - void move_list_ref_item(grt::ListRef items, const grt::ValueRef &object, int to) + void move_list_ref_item(grt::ListRef items, const grt::ValueRef &object, ssize_t to) { grt::Type object_type = object.type(); @@ -382,8 +382,7 @@ } } else - item_name = object.repr(); - + item_name = object.toString(); if (grouped) { @@ -489,7 +488,7 @@ // Template instantiation to avoid having all this code in the header file. template WBPUBLICBACKEND_PUBLIC_FUNC void move_list_ref_item(grt::ListRef items, - const grt::ValueRef &object, int to); + const grt::ValueRef &object, ssize_t to); //------------------------------------------------------------------------------------------------ diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/common.h mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/common.h --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/common.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/common.h 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -166,7 +166,7 @@ } template - WBPUBLICBACKEND_PUBLIC_FUNC void move_list_ref_item(grt::ListRef items, const grt::ValueRef &object, int to); + WBPUBLICBACKEND_PUBLIC_FUNC void move_list_ref_item(grt::ListRef items, const grt::ValueRef &object, ssize_t to); class WBPUBLICBACKEND_PUBLIC_FUNC TimerActionThread { diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/grt_manager.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/grt_manager.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/grt_manager.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/grt_manager.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,15 +17,18 @@ * 02110-1301 USA */ -#include -#include +#include "base/threading.h" +#include "base/log.h" +#include "base/file_utilities.h" -#include +#include "grtpp_module_python.h" +#include "grtpp_module_cpp.h" + +#include "python_context.h" #include "grt/grt_manager.h" -#include "base/threading.h" + #include "glib/gstdio.h" -#include "base/log.h" #include "objimpl/wrapper/grt_PyObject_impl.h" #include "base/notifications.h" @@ -791,18 +794,14 @@ int c; if (!g_file_test(path.c_str(), G_FILE_TEST_IS_DIR)) - { - // if (_verbose) -// _grt->send_output(strfmt(_("Skipping non-existent module directory '%s'.\n"), path.c_str())); return 0; - } if (_verbose) _grt->send_output(strfmt(_("Looking for modules in '%s'.\n"), path.c_str())); try { - c= _grt->scan_modules_in(path, extensions.empty() ? _module_extensions : extensions, refresh); + c= _grt->scan_modules_in(path, _basedir, extensions.empty() ? _module_extensions : extensions, refresh); } catch (std::exception &exc) { @@ -882,13 +881,17 @@ std::string GRTManager::get_tmp_dir() { - std::string res; + // Add the current process ID to the path to make this unique. + std::string res = g_get_tmp_dir(); + if( base::ends_with(res, "/") || base::ends_with(res, "\\")) + res.resize( res.size() - 1 ); + res += "/" + std::string("mysql-workbench-"); #ifdef _WIN32 - res.append(g_get_tmp_dir()).append("/MySQL Workbench/"); + res += base::to_string(GetCurrentProcessId()) + "/"; #else - res.append(g_get_tmp_dir()).append("/mysql-workbench.").append(g_get_user_name()).append("/"); + res += base::to_string(::getpid()) + "/"; #endif - g_mkdir(res.c_str(), 0700); + base::create_directory(res, 0700, true); return res; } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/grt_value_inspector.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/grt_value_inspector.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/grt_value_inspector.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/grt_value_inspector.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -1053,8 +1053,8 @@ value= iter->get_member(_items[node[0]].key); if (iter == _list.begin()) - v= value.repr(); - else if (v != value.repr()) + v = value.toString(); + else if (v != value.toString()) ++item_count; } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/plugin_manager.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/plugin_manager.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/plugin_manager.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/plugin_manager.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -46,7 +46,7 @@ hash+= get_args_hash(grt::BaseListRef::cast_from(list.get(i))); break; default: - hash+= list.get(i).repr(); + hash += list.get(i).toString(); break; } } @@ -1229,7 +1229,7 @@ if (!argument.is_valid()) { log_warning("Cannot satisfy plugin input for %s: %s", plugin->name().c_str(), searched_key.c_str()); - log_warning("Missing input: %s", pdef.repr().c_str()); + log_warning("Missing input: %s", pdef.debugDescription().c_str()); throw grt::grt_runtime_error("Cannot execute "+*plugin->name(), "Plugin requires unavailable argument value."); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/plugin_manager.h mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/plugin_manager.h --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/plugin_manager.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/plugin_manager.h 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA */ -#ifndef _PLUGIN_MANAGER_H_ -#define _PLUGIN_MANAGER_H_ + +#pragma once #include #include @@ -26,11 +26,11 @@ #include "grts/structs.app.h" #include "wbpublic_public_interface.h" - -#ifdef __GNUC__ -typedef void* NativeHandle; +#ifdef _WIN32 + typedef uintptr_t NativeHandle; #else -typedef uintptr_t NativeHandle; +// Don't make this "id" on OSX or we risk a strong reference cycle. + typedef void* NativeHandle; #endif // GUI plugins with native code that are loaded and managed by the Workbench process @@ -191,8 +191,3 @@ typedef ::bec::PluginManagerImpl PluginManager; }; - - - - -#endif /* _PLUGIN_MANAGER_H_ */ diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/tree_model.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/tree_model.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/tree_model.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/tree_model.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -127,7 +127,7 @@ // less than @r becomes false, therefore this node is greater than @r. for (size_t i = 0; i < index->size(); ++i) { - if ((*index)[i] > (*r.index)[i]) + if ((*index)[i] >= (*r.index)[i]) { ret = false; break; @@ -210,7 +210,14 @@ //-------------------------------------------------------------------------------------------------- -std::string NodeId::repr(const char separator) const +std::string NodeId::description() const +{ + return toString(); +} + +//-------------------------------------------------------------------------------------------------- + +std::string NodeId::toString(const char separator) const { std::stringstream out; for (size_t i = 0; i < index->size(); i++) @@ -269,7 +276,7 @@ if (!get_field_grt(node, column, v)) return false; - value= v.repr(); + value = v.toString(); return true; } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/tree_model.h mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/tree_model.h --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/tree_model.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/tree_model.h 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -193,7 +193,8 @@ } NodeId parent() const; - std::string repr(const char separator = '.') const; + std::string description() const; + std::string toString(const char separator = '.') const; NodeId &append(size_t i); NodeId &prepend(size_t i); @@ -232,7 +233,7 @@ NodeId::uid map_node_id(const std::string& path_from_nodeid); NodeId::uid map_node_id(const NodeId& nid) { - return map_node_id(nid.repr()); + return map_node_id(nid.toString()); } //! Reverse mapping from 'uid' to a path diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/unit-tests/nodeid_tests.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/unit-tests/nodeid_tests.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/unit-tests/nodeid_tests.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/unit-tests/nodeid_tests.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -141,7 +141,7 @@ n1= n1.parent(); ensure("NodeId::parent() test1", n1.depth() == 2); - ensure("NodeId::parent() test2", n1.repr() == "1.2"); + ensure("NodeId::parent() test2", n1.toString() == "1.2"); } TEST_FUNCTION(7) diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/unit-tests/tree_model_test.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/unit-tests/tree_model_test.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grt/unit-tests/tree_model_test.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grt/unit-tests/tree_model_test.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -76,25 +76,25 @@ NodeId node; std::string s; - s= node.repr(); - ensure_equals("() repr", s, ""); + s = node.toString(); + ensure_equals("() toString", s, ""); ensure("() parse", NodeId(s)==node); node.append(3); - s= node.repr(); + s = node.toString(); ensure("(3) check", node==NodeId(3)); - ensure_equals("(3) repr", s, "3"); - ensure_equals("(3) parse", NodeId(s).repr(), node.repr()); + ensure_equals("(3) toString", s, "3"); + ensure_equals("(3) parse", NodeId(s).toString(), node.toString()); node.append(0); - s= node.repr(); - ensure_equals("(3,0) repr", s, "3.0"); - ensure_equals("(3,0) parse", NodeId(s).repr(), node.repr()); + s = node.toString(); + ensure_equals("(3,0) toString", s, "3.0"); + ensure_equals("(3,0) parse", NodeId(s).toString(), node.toString()); node.append(1); - s= node.repr(); - ensure_equals("(3,0,1) repr", s, "3.0.1"); - ensure_equals("(3,0,1) parse", NodeId(s).repr(), node.repr()); + s = node.toString(); + ensure_equals("(3,0,1) toString", s, "3.0.1"); + ensure_equals("(3,0,1) parse", NodeId(s).toString(), node.toString()); } // test common tree_model methods (get_parent etc) diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtdb/db_helpers.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtdb/db_helpers.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtdb/db_helpers.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtdb/db_helpers.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -32,7 +32,7 @@ std::string host_identifier = *connection->driver()->hostIdentifierTemplate(); for (grt::DictRef::const_iterator par = params.begin(); par != params.end(); ++par) { - base::replace(host_identifier, "%"+par->first+"%", par->second.repr()); + base::replace(host_identifier, "%" + par->first + "%", par->second.toString()); } return host_identifier; } @@ -269,8 +269,9 @@ */ bool bec::is_supported_mysql_version(int mysql_major, int mysql_minor, int mysql_release) { - return (mysql_major == 5 && - (mysql_minor == 1 || mysql_minor == 5 || mysql_minor == 6 || mysql_minor == 7)); + return ((mysql_major == 5 && + (mysql_minor == 1 || mysql_minor == 5 || mysql_minor == 6 || mysql_minor == 7)) || + (mysql_major == 8 && mysql_minor == 0)); } @@ -301,7 +302,7 @@ // if the available release number is negative, that's meant to signify "any release number", so we make it the max value possible unsigned int available = mysql_major * 100000 + mysql_minor * 1000 + (mysql_release < 0 ? 999 : mysql_release); - if (major < 5 || (major == 5 && minor < 6)) + if (major < 5 || (major == 5 && minor < 6) || (major == 8 && minor == 0)) { return (required <= available); } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtdb/db_object_master_filter.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtdb/db_object_master_filter.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtdb/db_object_master_filter.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtdb/db_object_master_filter.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -123,19 +123,11 @@ std::string key; grt::DictRef stored_filter_sets; - //for (size_t n= 0, count= _stored_master_filter_sets.count(); n < count; ++n) - //{ - // _stored_master_filter_sets.get_by_index(n, key, stored_filter_sets); - // names.push_back(key); - //} - for (grt::DictRef::const_iterator it= _stored_master_filter_sets.begin(); it != _stored_master_filter_sets.end(); it++) { - names.push_back(it->second.repr()); + names.push_back(it->second.toString()); } names.push_back(std::string()); // empty value, denoting empty filter set - //*/ - //throw std::logic_error("needs update"); } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -518,7 +518,7 @@ if (str == std::string("LOCALTIMESTAMP()")) return std::string("CURRENT_TIMESTAMP"); if (str == std::string("TRUE")) return std::string("1"); if (str == std::string("FALSE")) return std::string(""); - if (strcasecmp(str.c_str(),"NULL") == 0) return std::string(""); +// if (strcasecmp(str.c_str(),"NULL") == 0) return std::string(""); return trim_zeros(str); }; //if(name1 == "defaultValue") diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtdb/editor_table.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtdb/editor_table.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtdb/editor_table.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtdb/editor_table.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -551,7 +551,7 @@ { RefreshUI::Blocker __centry(*_owner); - db_ColumnRef col; + std::string old; // either the row was edited or cancelled (sent "" as value) @@ -611,7 +611,8 @@ else if (node[0] >= real_count()) return false; - col= _owner->get_table()->columns().get(node[0]); + db_ColumnRef col; + col = _owner->get_table()->columns().get(node[0]); get_field(node, column, old); @@ -779,8 +780,9 @@ if (value != 0) { _owner->get_table()->addPrimaryKeyColumn(col); - if (col->defaultValue() != "") - col->defaultValue(""); + if (col->defaultValueIsNull()) + bec::ColumnHelper::set_default_value(col, ""); + } else _owner->get_table()->removePrimaryKeyColumn(col); @@ -803,7 +805,7 @@ // When setting the not-null flag then having a default value of NULL is meaningless. // Remove that if it is set. - if (col->defaultValueIsNull()) + if (col->defaultValueIsNull() && col->isNotNull()) bec::ColumnHelper::set_default_value(col, ""); TableHelper::update_foreign_keys_from_column_notnull(_owner->get_table(), col); @@ -1297,8 +1299,8 @@ if (col.is_valid()) { - col->defaultValue(""); - col->defaultValueIsNull(0); + bec::ColumnHelper::set_default_value(col, ""); + _owner->update_change_date(); changed= true; } } @@ -1325,7 +1327,9 @@ if (col.is_valid()) { - col->defaultValue("NULL"); + + bec::ColumnHelper::set_default_value(col, "NULL"); + _owner->update_change_date(); changed= true; } } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/binary_data_editor.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/binary_data_editor.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/binary_data_editor.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/binary_data_editor.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -737,8 +737,8 @@ void BinaryDataEditor::export_value() { mforms::FileChooser chooser(mforms::SaveFile); - chooser.set_title("Export Field Data"); + chooser.set_extensions("Text files (*.txt)|*.txt|All Files (*.*)|*.*", "txt"); if (chooser.run_modal()) { std::string path = chooser.get_path(); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/db_conn_be.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/db_conn_be.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/db_conn_be.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/db_conn_be.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -421,7 +421,7 @@ { unknown_options_text.append(*k); unknown_options_text.append("="); - unknown_options_text.append(stored_conn->parameterValues().get(*k).repr()); + unknown_options_text.append(stored_conn->parameterValues().get(*k).toString()); unknown_options_text.append("\n"); } } @@ -546,7 +546,7 @@ { if (param_handle->object()->name() == "$others") { - std::vector options(base::split(param_handle->get_value().repr(), "\n")); + std::vector options(base::split(param_handle->get_value().toString(), "\n")); for (std::vector::const_iterator op = options.begin(); op != options.end(); ++op) { std::string name, value; diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/db_conn_be.h mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/db_conn_be.h --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/db_conn_be.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/db_conn_be.h 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -89,7 +89,7 @@ ParamType get_type() const { return _type; } grt::StringRef get_control_name() const; const grt::ValueRef & get_value() const { return _value; } - const grt::StringRef get_value_repr() const { return _value.repr(); } + const grt::StringRef get_value_repr() const { return _value.toString(); } void set_value(const grt::ValueRef &value); std::vector > get_enum_options(); }; diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/grtdb_connect_panel.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/grtdb_connect_panel.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/grtdb_connect_panel.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/grtdb_connect_panel.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -260,8 +260,16 @@ } -db_mgmt_ConnectionRef DbConnectPanel::get_connection() +db_mgmt_ConnectionRef DbConnectPanel::get_connection(bool initInvalid) { + if (!_connection->get_connection().is_valid() && initInvalid) + { + db_mgmt_ConnectionRef connection(get_be()->get_grt()); + connection->owner(get_be()->get_db_mgmt()); + connection->driver(selected_driver()); + set_connection(connection); + change_active_stored_conn(); + } return _connection->get_connection(); } @@ -495,7 +503,7 @@ // When switching to/from ssh based connections the value for the host name gets another // semantic. In ssh based connections the sshHost is the remote server name (what is otherwise // the host name) and the host name is relative to the ssh host (usually localhost). - db_mgmt_ConnectionRef actual_connection = get_connection(); + db_mgmt_ConnectionRef actual_connection = get_connection(true); if (*current_driver->name() == "MysqlNativeSSH") { std::string machine = actual_connection->parameterValues().get_string("sshHost"); @@ -634,10 +642,19 @@ { sql::DriverManager *dbc_drv_man= sql::DriverManager::getDriverManager(); db_mgmt_ConnectionRef connectionProperties = get_be()->get_connection(); + if (!connectionProperties.is_valid()) + { + db_mgmt_ConnectionRef connection(get_be()->get_grt()); + connection->owner(get_be()->get_db_mgmt()); + connection->driver(selected_driver()); + set_connection(connection); + change_active_stored_conn(); + connectionProperties = get_be()->get_connection(); + } std::string ssl_cipher; message.append("Host: " + connectionProperties->parameterValues().get_string("hostName") + "\n"); - message.append("Port: " + grt::IntegerRef(connectionProperties->parameterValues().get_int("port")).repr() + "\n"); + message.append("Port: " + grt::IntegerRef(connectionProperties->parameterValues().get_int("port")).toString() + "\n"); message.append("User: " + connectionProperties->parameterValues().get_string("userName") + "\n"); if ( connectionProperties->driver()->name() == "MySQLFabric") @@ -831,9 +848,8 @@ mforms::Form *parent = get_parent_form(); grt::BaseListRef args(get_be()->get_grt()); args.ginsert(mforms_to_grt(get_be()->get_grt(), parent, "Form")); - args.ginsert(get_connection()); - args.ginsert(grt::StringRef(get_connection()->id())); - + args.ginsert(get_connection(true)); + args.ginsert(grt::StringRef(get_connection(true)->id())); get_be()->get_grt()->call_module_function("PyWbUtils", "generateCertificates", args); _connection->update(); @@ -957,7 +973,7 @@ { std::string storage_key; std::string username; - grt::DictRef paramValues(get_connection()->parameterValues()); + grt::DictRef paramValues(get_connection(true)->parameterValues()); std::vector tokens = base::split(param->object()->paramTypeDetails().get_string("storageKeyFormat"), "::"); if (tokens.size() == 2) { @@ -971,8 +987,8 @@ } for (grt::DictRef::const_iterator iter = paramValues.begin(); iter != paramValues.end(); ++iter) { - storage_key = bec::replace_string(storage_key, "%"+iter->first+"%", iter->second.repr()); - username = bec::replace_string(username, "%"+iter->first+"%", iter->second.repr()); + storage_key = bec::replace_string(storage_key, "%" + iter->first + "%", iter->second.toString()); + username = bec::replace_string(username, "%" + iter->first + "%", iter->second.toString()); } if (username.empty()) @@ -1127,7 +1143,7 @@ // value { - grt::StringRef value= driver_param->get_value_repr(); + grt::StringRef value = driver_param->get_value_repr(); if (value.is_valid()) ctrl->set_active(*value != "" && *value != "0" && *value != "NULL"); } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/grtdb_connect_panel.h mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/grtdb_connect_panel.h --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/grtdb_connect_panel.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/grtdb_connect_panel.h 2016-10-14 12:12:04.000000000 +0000 @@ -72,7 +72,7 @@ db_mgmt_ConnectionRef get_default_connection() { return _anonymous_connection; } - db_mgmt_ConnectionRef get_connection(); + db_mgmt_ConnectionRef get_connection(bool initInvalid = false); void set_connection(const db_mgmt_ConnectionRef& conn); boost::signals2::signal* signal_validation_state_changed() { return &_signal_validation_state_changed; } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/grtdb_object_filter.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/grtdb_object_filter.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/grtdb_object_filter.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/grtdb_object_filter.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -138,7 +138,7 @@ scoped_connect(_mask_list.signal_changed(),boost::bind(&DBObjectFilterFrame::update_button_enabled, this)); _filter_help_label.set_style(mforms::SmallHelpTextStyle); - _filter_help_label.set_text(_("Use the + button to exclude objects matching wildcards such as * and _")); + _filter_help_label.set_text(_("Use the + button to exclude objects matching wildcards such as * and ?")); _detailed_table.add(&_filter_help_label, 0, 3, 8, 9, mforms::HFillFlag); } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/gui_plugin_base.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/gui_plugin_base.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/grtui/gui_plugin_base.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/grtui/gui_plugin_base.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -32,5 +32,7 @@ GUIPluginBase::~GUIPluginBase() { - grtm()->get_plugin_manager()->forget_gui_plugin_handle(reinterpret_cast(this)); + // XXX: GUIPluginBase descentants don't register a gui plugin. + // Only very specific platform plugins do register them and use their own register/forget handling. + //grtm()->get_plugin_manager()->forget_gui_plugin_handle(reinterpret_cast(this)); } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/objimpl/db/db_Column.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/objimpl/db/db_Column.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/objimpl/db/db_Column.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/objimpl/db/db_Column.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -42,7 +42,7 @@ void db_Column::init() { - //No need in disconnet management since signal it part of object + // No need to disconnect management since the signal is part of the object. _changed_signal.connect(boost::bind(notify_visible_member_change, _1, _2, this)); } @@ -66,31 +66,31 @@ grt::StringRef db_Column::formattedRawType() const { - if (this->userType().is_valid()) + if (userType().is_valid()) { std::string arguments; // if no simple or structured datatype is set, // simply take the parameters - if (this->length() != bec::EMPTY_COLUMN_LENGTH) + if (length() != bec::EMPTY_COLUMN_LENGTH) { - arguments= strfmt("(%i)", (int)this->length()); + arguments= strfmt("(%i)", (int)length()); } - else if (this->precision() != bec::EMPTY_COLUMN_PRECISION) + else if (precision() != bec::EMPTY_COLUMN_PRECISION) { std::string tmp; - if (this->scale() != bec::EMPTY_COLUMN_SCALE) - tmp= strfmt("(%i,%i)", (int)this->precision(), (int)this->scale()); + if (scale() != bec::EMPTY_COLUMN_SCALE) + tmp= strfmt("(%i,%i)", (int)precision(), (int)scale()); else - tmp= strfmt("(%i)", (int)this->precision()); + tmp= strfmt("(%i)", (int)precision()); arguments= tmp; } - else if (this->datatypeExplicitParams().is_valid() && *this->datatypeExplicitParams() != "") + else if (datatypeExplicitParams().is_valid() && *datatypeExplicitParams() != "") { - arguments= *this->datatypeExplicitParams(); + arguments= *datatypeExplicitParams(); } - return std::string(this->userType()->name()).append(arguments); + return std::string(userType()->name()).append(arguments); } else return formattedType(); @@ -111,10 +111,10 @@ if (simpleType->numericPrecision() != bec::EMPTY_TYPE_PRECISION) { std::string tmp; - if (this->precision() != bec::EMPTY_COLUMN_PRECISION && this->scale() != bec::EMPTY_COLUMN_SCALE && (ptype == 3 || ptype == 4 || ptype == 5 || ptype == 6)) - tmp= strfmt("(%i,%i)", (int)this->precision(), (int)this->scale()); - else if (this->precision() != bec::EMPTY_COLUMN_PRECISION && (ptype == 1 || ptype == 2 || ptype == 4 || ptype == 6)) - tmp= strfmt("(%i)", (int)this->precision()); + if (precision() != bec::EMPTY_COLUMN_PRECISION && scale() != bec::EMPTY_COLUMN_SCALE && (ptype == 3 || ptype == 4 || ptype == 5 || ptype == 6)) + tmp= strfmt("(%i,%i)", (int)precision(), (int)scale()); + else if (precision() != bec::EMPTY_COLUMN_PRECISION && (ptype == 1 || ptype == 2 || ptype == 4 || ptype == 6)) + tmp= strfmt("(%i)", (int)precision()); caption.append(tmp); } else @@ -122,13 +122,18 @@ if (*simpleType->characterMaximumLength() != bec::EMPTY_TYPE_MAXIMUM_LENGTH || *simpleType->characterOctetLength() != bec::EMPTY_TYPE_OCTET_LENGTH) { - if (this->length() != bec::EMPTY_COLUMN_LENGTH && (ptype == 1 || ptype == 2 || ptype == 4 || ptype == 6)) + if (length() != bec::EMPTY_COLUMN_LENGTH && (ptype == 1 || ptype == 2 || ptype == 4 || ptype == 6)) { - caption.append(strfmt("(%i)", (int)this->length())); + caption.append(strfmt("(%i)", (int)length())); } } - else if (this->datatypeExplicitParams().is_valid() && *this->datatypeExplicitParams() != "") - caption.append(*this->datatypeExplicitParams()); + else if (*simpleType->dateTimePrecision() > 0 && length() > 0) + { + // timestamp, time, datetime, year + caption.append(strfmt("(%i)", (int)length())); + } + else if (datatypeExplicitParams().is_valid() && *datatypeExplicitParams() != "") + caption.append(*datatypeExplicitParams()); } } else if (structuredType.is_valid()) @@ -138,27 +143,27 @@ { std::string arguments; - if (this->userType().is_valid()) - caption= this->userType()->sqlDefinition(); + if (userType().is_valid()) + caption= userType()->sqlDefinition(); // if no simple or structured datatype is set, // simply take the parameters - if (this->length() != bec::EMPTY_COLUMN_LENGTH) + if (length() != bec::EMPTY_COLUMN_LENGTH) { - arguments= strfmt("(%i)", (int)this->length()); + arguments= strfmt("(%i)", (int)length()); } - else if (this->precision() != bec::EMPTY_COLUMN_PRECISION) + else if (precision() != bec::EMPTY_COLUMN_PRECISION) { std::string tmp; - if (this->scale() != bec::EMPTY_COLUMN_SCALE) - tmp= strfmt("(%i,%i)", (int)this->precision(), (int)this->scale()); + if (scale() != bec::EMPTY_COLUMN_SCALE) + tmp= strfmt("(%i,%i)", (int)precision(), (int)scale()); else - tmp= strfmt("(%i)", (int)this->precision()); + tmp= strfmt("(%i)", (int)precision()); arguments= tmp; } - else if (this->datatypeExplicitParams().is_valid() && *this->datatypeExplicitParams() != "") + else if (datatypeExplicitParams().is_valid() && *datatypeExplicitParams() != "") { - arguments= *this->datatypeExplicitParams(); + arguments= *datatypeExplicitParams(); } if (!arguments.empty()) diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/objimpl/db.query/db_query_Editor.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/objimpl/db.query/db_query_Editor.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/objimpl/db.query/db_query_Editor.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/objimpl/db.query/db_query_Editor.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -57,7 +57,7 @@ grt::IntegerRef db_query_Editor::isConnected() const { if (_data) - return grt::IntegerRef(_data->isConnected() ? 1 : 0); + return _data->isConnected(); return grt::IntegerRef(0); } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -506,7 +506,7 @@ try { return getGeoRepresentation(data, false); } - catch (std::exception &exc) + catch (std::exception &) { throw std::invalid_argument(base::strfmt("unable to convert geometry data to WKT for column %li", (long)column).c_str()); } @@ -522,7 +522,7 @@ try { return getGeoRepresentation(data, false); } - catch (std::exception &exc) + catch (std::exception &) { throw std::invalid_argument(base::strfmt("unable to convert geometry data to WKT for column %s", column.c_str()).c_str()); } @@ -538,7 +538,7 @@ try { return getGeoRepresentation(data, true); } - catch (std::exception &exc) + catch (std::exception &) { throw std::invalid_argument(base::strfmt("unable to convert geometry data to WKT for column %li", (long)column).c_str()); } @@ -555,7 +555,7 @@ try { return getGeoRepresentation(data, true); } - catch (std::exception &exc) + catch (std::exception &) { throw std::invalid_argument(base::strfmt("unable to convert geometry data to WKT for column %s", column.c_str()).c_str()); } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/autocomplete_object_name_cache.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/autocomplete_object_name_cache.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/autocomplete_object_name_cache.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/autocomplete_object_name_cache.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -64,7 +64,7 @@ log_debug2("Using autocompletion cache file %s\n", (make_path(cache_dir, _connection_id) + ".cache").c_str()); - // Top level objects (aka. schemas). + // Top level objects. // They are retrieved automatically only once to limit traffic to the server. // The user can manually trigger a refresh when needed. add_pending_refresh(RefreshTask::RefreshSchemas); @@ -72,6 +72,8 @@ // Objects that don't change while a server is running. add_pending_refresh(RefreshTask::RefreshVariables); add_pending_refresh(RefreshTask::RefreshEngines); + add_pending_refresh(RefreshTask::RefreshCharsets); + add_pending_refresh(RefreshTask::RefreshCollations); } //-------------------------------------------------------------------------------------------------- @@ -214,6 +216,27 @@ //-------------------------------------------------------------------------------------------------- +std::vector AutoCompleteCache::get_matching_charsets(const std::string &prefix) +{ + return get_matching_objects("charsets", "", "", prefix, RetrieveWithNoQualifier); +} + +//-------------------------------------------------------------------------------------------------- + +std::vector AutoCompleteCache::get_matching_collations(const std::string &prefix) +{ + return get_matching_objects("collations", "", "", prefix, RetrieveWithNoQualifier); +} + +//-------------------------------------------------------------------------------------------------- + +std::vector AutoCompleteCache::get_matching_events(const std::string &schema, const std::string &prefix) +{ + return get_matching_objects("events", schema, "", prefix, RetrieveWithSchemaQualifier); +} + +//-------------------------------------------------------------------------------------------------- + /** * Core object retrieval function. */ @@ -311,11 +334,12 @@ // Add tasks to load various schema objects. They will then update the last_refresh value. log_debug3("schema %s is not cached, populating cache...\n", schema.c_str()); - // Refreshing views and tables will implicitly refresh their local objects too. + // Refreshing a schema implicitly refreshs its local objects too. add_pending_refresh(RefreshTask::RefreshTables, schema); add_pending_refresh(RefreshTask::RefreshViews, schema); add_pending_refresh(RefreshTask::RefreshProcedures, schema); add_pending_refresh(RefreshTask::RefreshFunctions, schema); + add_pending_refresh(RefreshTask::RefreshEvents, schema); return true; } @@ -336,6 +360,13 @@ //-------------------------------------------------------------------------------------------------- +void AutoCompleteCache::refresh_udfs() +{ + add_pending_refresh(RefreshTask::RefreshUDFs); +} + +//-------------------------------------------------------------------------------------------------- + void AutoCompleteCache::refresh_tablespaces() { add_pending_refresh(RefreshTask::RefreshTableSpaces); @@ -350,6 +381,13 @@ //-------------------------------------------------------------------------------------------------- +void AutoCompleteCache::refresh_events() +{ + add_pending_refresh(RefreshTask::RefreshEvents); +} + +//-------------------------------------------------------------------------------------------------- + void AutoCompleteCache::refresh_cache_thread() { log_debug2("entering worker thread\n"); @@ -399,6 +437,14 @@ refresh_udfs_w(); break; + case RefreshTask::RefreshCharsets: + refreshCharsets_w(); + break; + + case RefreshTask::RefreshCollations: + refreshCollations_w(); + break; + case RefreshTask::RefreshVariables: refresh_variables_w(); break; @@ -414,6 +460,11 @@ case RefreshTask::RefreshTableSpaces: refresh_tablespaces_w(); break; + + case RefreshTask::RefreshEvents: + refreshEvents_w(task.schema_name); + + break; } } catch (std::exception &exc) @@ -485,29 +536,35 @@ // TODO: check if it is possible that the connection can be locked even it was already deleted. base::RecMutexLock lock(_get_connection(conn)); { - std::string sql = base::sqlstring("SHOW FULL TABLES FROM !", 0) << schema; + // Avoid an exception for an unknown schema by checking in advance. std::auto_ptr statement(conn->ref->createStatement()); - std::auto_ptr rs(statement->executeQuery(sql)); - if (rs.get()) + std::string sql = base::sqlstring("show schemas like ?", 0) << schema; + std::auto_ptr rs1(statement->executeQuery(sql)); + if (rs1.get() && rs1->next()) { - while (rs->next() && !_shutdown) + sql = base::sqlstring("SHOW FULL TABLES FROM !", 0) << schema; + std::auto_ptr rs2(statement->executeQuery(sql)); + if (rs2.get()) { - std::string type = rs->getString(2); - std::string table = rs->getString(1); - if (type != "VIEW") + while (rs2->next() && !_shutdown) { - tables->push_back(table); - - // Implicitly load table-local objects for each table/view. - add_pending_refresh(RefreshTask::RefreshColumns, schema, table); - add_pending_refresh(RefreshTask::RefreshTriggers, schema, table); + std::string type = rs2->getString(2); + std::string table = rs2->getString(1); + if (type != "VIEW") + { + tables->push_back(table); + + // Implicitly load table-local objects for each table/view. + add_pending_refresh(RefreshTask::RefreshColumns, schema, table); + add_pending_refresh(RefreshTask::RefreshTriggers, schema, table); + } } - } - log_debug2("Found %li tables\n", (long)tables->size()); + log_debug2("Found %li tables\n", (long)tables->size()); + } + else + log_debug2("No tables found for %s\n", schema.c_str()); } - else - log_debug2("No tables found for %s\n", schema.c_str()); } } @@ -525,28 +582,34 @@ base::RecMutexLock lock(_get_connection(conn)); { - std::string sql = base::sqlstring("SHOW FULL TABLES FROM !", 0) << schema; + // Avoid an exception for an unknown schema by checking in advance. std::auto_ptr statement(conn->ref->createStatement()); - std::auto_ptr rs(statement->executeQuery(sql)); - if (rs.get()) + std::string sql = base::sqlstring("show schemas like ?", 0) << schema; + std::auto_ptr rs1(statement->executeQuery(sql)); + if (rs1.get() && rs1->next()) { - while (rs->next() && !_shutdown) + sql = base::sqlstring("SHOW FULL TABLES FROM !", 0) << schema; + std::auto_ptr rs2(statement->executeQuery(sql)); + if (rs2.get()) { - std::string type = rs->getString(2); - std::string table = rs->getString(1); - if (type == "VIEW") + while (rs2->next() && !_shutdown) { - views->push_back(table); - - // Implicitly load columns for each table/view. - add_pending_refresh(RefreshTask::RefreshColumns, schema, table); + std::string type = rs2->getString(2); + std::string table = rs2->getString(1); + if (type == "VIEW") + { + views->push_back(table); + + // Implicitly load columns for each table/view. + add_pending_refresh(RefreshTask::RefreshColumns, schema, table); + } } - } - log_debug2("Found %li views\n", (long)views->size()); + log_debug2("Found %li views\n", (long)views->size()); + } + else + log_debug2("No views found for %s\n", schema.c_str()); } - else - log_debug2("No views found for %s\n", schema.c_str()); } } @@ -691,6 +754,60 @@ //-------------------------------------------------------------------------------------------------- +void AutoCompleteCache::refreshCharsets_w() +{ + std::vector charsets; + { + sql::Dbc_connection_handler::Ref conn; + base::RecMutexLock lock(_get_connection(conn)); + { + std::auto_ptr statement(conn->ref->createStatement()); + std::auto_ptr rs(statement->executeQuery("show charset")); + if (rs.get()) + { + while (rs->next() && !_shutdown) + charsets.push_back(rs->getString(1)); + + log_debug2("Found %li character sets.\n", (long)charsets.size()); + } + else + log_debug2("No character sets found.\n"); + } + } + + if (!_shutdown) + update_object_names("charsets", charsets); +} + +//-------------------------------------------------------------------------------------------------- + +void AutoCompleteCache::refreshCollations_w() +{ + std::vector collations; + { + sql::Dbc_connection_handler::Ref conn; + base::RecMutexLock lock(_get_connection(conn)); + { + std::auto_ptr statement(conn->ref->createStatement()); + std::auto_ptr rs(statement->executeQuery("show collation")); + if (rs.get()) + { + while (rs->next() && !_shutdown) + collations.push_back(rs->getString(1)); + + log_debug2("Found %li collations.\n", (long)collations.size()); + } + else + log_debug2("No collations found.\n"); + } + } + + if (!_shutdown) + update_object_names("collations", collations); +} + +//-------------------------------------------------------------------------------------------------- + void AutoCompleteCache::refresh_variables_w() { std::vector variables; @@ -757,7 +874,7 @@ // Logfile groups and tablespaces are referenced as single unqualified identifiers in MySQL syntax. // They are stored however together with a table schema and a table name. // For auto completion however we only need to support what the syntax supports. - std::auto_ptr rs(statement->executeQuery("SELECT logfile_group_name FROM information_schema.FILES")); + std::auto_ptr rs(statement->executeQuery("SELECT distinct logfile_group_name FROM information_schema.FILES")); if (rs.get()) { while (rs->next() && !_shutdown) @@ -784,11 +901,15 @@ base::RecMutexLock lock(_get_connection(conn)); { std::auto_ptr statement(conn->ref->createStatement()); - std::auto_ptr rs(statement->executeQuery("SELECT tablespace_name FROM information_schema.FILES")); + std::auto_ptr rs(statement->executeQuery("SELECT distinct tablespace_name FROM information_schema.FILES")); if (rs.get()) { while (rs->next() && !_shutdown) - tablespaces.push_back(rs->getString(1)); + { + std::string entry = rs->getString(1); + if (!entry.empty()) + tablespaces.push_back(entry); + } log_debug2("Found %li tablespaces.\n", (long)tablespaces.size()); } @@ -803,6 +924,38 @@ //-------------------------------------------------------------------------------------------------- +void AutoCompleteCache::refreshEvents_w(const std::string &schema) +{ + base::StringListPtr events(new std::list()); + { + sql::Dbc_connection_handler::Ref conn; + base::RecMutexLock lock(_get_connection(conn)); + { + std::string sql = base::sqlstring("SELECT EVENT_NAME FROM information_schema.EVENTS WHERE EVENT_SCHEMA = ?", 0) << schema; + std::auto_ptr statement(conn->ref->createStatement()); + std::auto_ptr rs(statement->executeQuery(sql)); + if (rs.get()) + { + while (rs->next() && !_shutdown) + { + std::string entry = rs->getString(1); + if (!entry.empty()) + events->push_back(entry); + } + + log_debug2("Found %li events in schema %s.\n", (long)events->size(), schema.c_str()); + } + else + log_debug2("No events found for schema %s.\n", schema.c_str()); + } + } + + if (!_shutdown) + update_object_names("events", schema, events); +} + +//-------------------------------------------------------------------------------------------------- + void AutoCompleteCache::init_db() { log_info("Initializing autocompletion cache for %s\n", _connection_id.c_str()); @@ -828,7 +981,7 @@ } // Creation of cache tables that consist only of a single column (name). - std::string single_param_caches[] = {"variables", "engines", "tablespaces", "logfile_groups", "udfs"}; + std::string single_param_caches[] = {"variables", "engines", "tablespaces", "logfile_groups", "udfs", "charsets", "collations"}; for (size_t i = 0; i < sizeof(single_param_caches) / sizeof(single_param_caches[0]); ++i) { @@ -844,7 +997,7 @@ } // Creation of cache tables that consist of a name and a schema column. - std::string dual_param_caches[] = {"tables", "views", "functions", "procedures"}; + std::string dual_param_caches[] = {"tables", "views", "functions", "procedures", "events"}; for (size_t i = 0; i < sizeof(dual_param_caches) / sizeof(dual_param_caches[0]); ++i) { @@ -1010,7 +1163,7 @@ } catch (std::exception &exc) { - log_error("Exception caught while updating schema name cache: %s", exc.what()); + log_error("Exception caught while updating schema name cache: %s\n", exc.what()); } } @@ -1044,6 +1197,13 @@ //-------------------------------------------------------------------------------------------------- +void AutoCompleteCache::update_events(const std::string &schema, base::StringListPtr events) +{ + update_object_names("events", schema, events); +} + +//-------------------------------------------------------------------------------------------------- + /** * Central update routine for cache tables that have a single column "name". */ @@ -1071,7 +1231,7 @@ } catch (std::exception &exc) { - log_error("Exception caught while updating object name in cache %s: %s", cache.c_str(), exc.what()); + log_error("Exception caught while updating object name in cache %s: %s\n", cache.c_str(), exc.what()); } } @@ -1172,6 +1332,8 @@ case RefreshTask::RefreshVariables: case RefreshTask::RefreshEngines: case RefreshTask::RefreshUDFs: + case RefreshTask::RefreshCharsets: + case RefreshTask::RefreshCollations: found = true; break; @@ -1179,6 +1341,7 @@ case RefreshTask::RefreshViews: case RefreshTask::RefreshProcedures: case RefreshTask::RefreshFunctions: + case RefreshTask::RefreshEvents: found = i->schema_name == schema; break; diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/autocomplete_object_name_cache.h mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/autocomplete_object_name_cache.h --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/autocomplete_object_name_cache.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/autocomplete_object_name_cache.h 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -63,6 +63,11 @@ std::vector get_matching_logfile_groups(const std::string &prefix = ""); // Only useful for NDB cluster. std::vector get_matching_tablespaces(const std::string &prefix = ""); // Only useful for NDB cluster. + std::vector get_matching_charsets(const std::string &prefix = ""); + std::vector get_matching_collations(const std::string &prefix = ""); + + std::vector get_matching_events(const std::string &schema = "", const std::string &prefix = ""); + // Data refresh functions. To be called from outside when data objects are created or destroyed. void refresh_schema_list(); bool refresh_schema_cache_if_needed(const std::string &schema); @@ -72,7 +77,8 @@ void refresh_triggers(const std::string &schema, const std::string &table); void refresh_udfs(); void refresh_tablespaces(); // Logfile groups and tablespaces are unqualified, - void refresh_logfile_groups(); // event though they belong to a specific table. + void refresh_logfile_groups(); // even though they belong to a specific table. + void refresh_events(); // Update functions that can also be called from outside. void update_schemas(const std::vector &schemas); @@ -80,6 +86,7 @@ void update_views(const std::string &schema, base::StringListPtr tables); void update_procedures(const std::string &schema, base::StringListPtr tables); void update_functions(const std::string &schema, base::StringListPtr tables); + void update_events(const std::string &schema, base::StringListPtr events); // Status functions. bool is_schema_list_fetch_done(); @@ -106,6 +113,9 @@ RefreshEngines, RefreshLogfileGroups, RefreshTableSpaces, + RefreshCharsets, + RefreshCollations, + RefreshEvents } type; std::string schema_name; std::string table_name; @@ -140,12 +150,14 @@ void refresh_procedures_w(const std::string &schema); void refresh_columns_w(const std::string &schema, const std::string &table); void refresh_triggers_w(const std::string &schema, const std::string &table); - void refresh_udfs_w(); + void refreshCharsets_w(); + void refreshCollations_w(); void refresh_variables_w(); void refresh_engines_w(); void refresh_logfile_groups_w(); void refresh_tablespaces_w(); + void refreshEvents_w(const std::string &schema); void update_object_names(const std::string &cache, const std::vector &objects); void update_object_names(const std::string &cache, diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/column_width_cache.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/column_width_cache.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/column_width_cache.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/column_width_cache.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -66,6 +66,11 @@ } } +ColumnWidthCache::~ColumnWidthCache() +{ + delete _sqconn; +} + void ColumnWidthCache::init_db() { diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/column_width_cache.h mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/column_width_cache.h --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/column_width_cache.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/column_width_cache.h 2016-10-14 12:12:04.000000000 +0000 @@ -31,6 +31,7 @@ void init_db(); public: ColumnWidthCache(const std::string &connection_id, const std::string &cache_dir); + virtual ~ColumnWidthCache(); void save_column_width(const std::string &column_id, int width); void save_columns_width(const std::map &columns); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Lexer.c mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Lexer.c --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Lexer.c 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Lexer.c 2016-10-14 12:12:04.000000000 +0000 @@ -1,8 +1,8 @@ /** \file * This C source file was generated by $ANTLR version 3.4 * - * - From the grammar source file : ./ANTLRv3.g - * - On : 2014-09-24 15:09:46 + * - From the grammar source file : ANTLRv3.g + * - On : 2016-01-26 14:40:45 * - for the lexer : ANTLRv3LexerLexer * * Editing it, at least manually, is not wise. @@ -334,9 +334,6 @@ mTREE_BEGIN_V3TOK (pANTLRv3Lexer ctx); static ANTLR3_INLINE void - mT__72 (pANTLRv3Lexer ctx); -static ANTLR3_INLINE - void mT__73 (pANTLRv3Lexer ctx); static ANTLR3_INLINE void @@ -409,6 +406,9 @@ mT__96 (pANTLRv3Lexer ctx); static ANTLR3_INLINE void + mDOT_SYM (pANTLRv3Lexer ctx); +static ANTLR3_INLINE + void mOPTIONS_SYM (pANTLRv3Lexer ctx); static ANTLR3_INLINE void @@ -531,7 +531,7 @@ /** \brief Name of the grammar file that generated this code */ -static const char fileName[] = "./ANTLRv3.g"; +static const char fileName[] = "ANTLRv3.g"; /** \brief Return the name of the grammar file that generated this code. */ @@ -613,7 +613,6 @@ ctx->mROOT_V3TOK = mROOT_V3TOK; ctx->mSCOPE_V3TOK = mSCOPE_V3TOK; ctx->mTREE_BEGIN_V3TOK = mTREE_BEGIN_V3TOK; - ctx->mT__72 = mT__72; ctx->mT__73 = mT__73; ctx->mT__74 = mT__74; ctx->mT__75 = mT__75; @@ -638,6 +637,7 @@ ctx->mT__94 = mT__94; ctx->mT__95 = mT__95; ctx->mT__96 = mT__96; + ctx->mDOT_SYM = mDOT_SYM; ctx->mOPTIONS_SYM = mOPTIONS_SYM; ctx->mTOKENS_SYM = mTOKENS_SYM; ctx->mSRC_SYM = mSRC_SYM; @@ -696,7 +696,7 @@ * DFA tables for the lexer */ /** Static dfa state tables for Cyclic dfa: - * 524:3: ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* ) + * 525:3: ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* ) */ static const ANTLR3_INT32 dfa2_eot[28] = { @@ -57143,7 +57143,7 @@ } CONSTRUCTEX(); EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; - EXCEPTION->message = (void *)"524:3: ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* )"; + EXCEPTION->message = (void *)"525:3: ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* )"; EXCEPTION->decisionNum = 2; EXCEPTION->state = _s; return -1; @@ -57157,7 +57157,7 @@ = { 2, /* Decision number of this dfa */ /* Which decision this represents: */ - (const pANTLR3_UCHAR)"524:3: ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* )", + (const pANTLR3_UCHAR)"525:3: ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* )", (CDFA_SPECIAL_FUNC) dfa2_sst, antlr3dfaspecialTransition, /* DFA specialTransition is currently just a default function in the runtime */ antlr3dfapredict, /* DFA simulator function is in the runtime */ @@ -57201,8 +57201,8 @@ _type = AT_V3TOK; - // ./ANTLRv3.g:25:10: ( '@' ) - // ./ANTLRv3.g:25:12: '@' + // ANTLRv3.g:25:10: ( '@' ) + // ANTLRv3.g:25:12: '@' { MATCHC('@'); if (HASEXCEPTION()) @@ -57242,8 +57242,8 @@ _type = BANG_V3TOK; - // ./ANTLRv3.g:26:12: ( '!' ) - // ./ANTLRv3.g:26:14: '!' + // ANTLRv3.g:26:12: ( '!' ) + // ANTLRv3.g:26:14: '!' { MATCHC('!'); if (HASEXCEPTION()) @@ -57283,8 +57283,8 @@ _type = FRAGMENT_V3TOK; - // ./ANTLRv3.g:27:16: ( 'fragment' ) - // ./ANTLRv3.g:27:18: 'fragment' + // ANTLRv3.g:27:16: ( 'fragment' ) + // ANTLRv3.g:27:18: 'fragment' { MATCHS(lit_1); if (HASEXCEPTION()) @@ -57326,8 +57326,8 @@ _type = LABEL_ASSIGN_V3TOK; - // ./ANTLRv3.g:28:20: ( '=' ) - // ./ANTLRv3.g:28:22: '=' + // ANTLRv3.g:28:20: ( '=' ) + // ANTLRv3.g:28:22: '=' { MATCHC('='); if (HASEXCEPTION()) @@ -57367,8 +57367,8 @@ _type = LIST_LABEL_ASSIGN_V3TOK; - // ./ANTLRv3.g:29:25: ( '+=' ) - // ./ANTLRv3.g:29:27: '+=' + // ANTLRv3.g:29:25: ( '+=' ) + // ANTLRv3.g:29:27: '+=' { MATCHS(lit_2); if (HASEXCEPTION()) @@ -57410,8 +57410,8 @@ _type = RANGE_V3TOK; - // ./ANTLRv3.g:30:13: ( '..' ) - // ./ANTLRv3.g:30:15: '..' + // ANTLRv3.g:30:13: ( '..' ) + // ANTLRv3.g:30:15: '..' { MATCHS(lit_3); if (HASEXCEPTION()) @@ -57453,8 +57453,8 @@ _type = RET_V3TOK; - // ./ANTLRv3.g:31:11: ( 'returns' ) - // ./ANTLRv3.g:31:13: 'returns' + // ANTLRv3.g:31:11: ( 'returns' ) + // ANTLRv3.g:31:13: 'returns' { MATCHS(lit_4); if (HASEXCEPTION()) @@ -57496,8 +57496,8 @@ _type = REWRITE_V3TOK; - // ./ANTLRv3.g:32:15: ( '->' ) - // ./ANTLRv3.g:32:17: '->' + // ANTLRv3.g:32:15: ( '->' ) + // ANTLRv3.g:32:17: '->' { MATCHS(lit_5); if (HASEXCEPTION()) @@ -57539,8 +57539,8 @@ _type = ROOT_V3TOK; - // ./ANTLRv3.g:33:12: ( '^' ) - // ./ANTLRv3.g:33:14: '^' + // ANTLRv3.g:33:12: ( '^' ) + // ANTLRv3.g:33:14: '^' { MATCHC('^'); if (HASEXCEPTION()) @@ -57580,8 +57580,8 @@ _type = SCOPE_V3TOK; - // ./ANTLRv3.g:34:13: ( 'scope' ) - // ./ANTLRv3.g:34:15: 'scope' + // ANTLRv3.g:34:13: ( 'scope' ) + // ANTLRv3.g:34:15: 'scope' { MATCHS(lit_6); if (HASEXCEPTION()) @@ -57623,8 +57623,8 @@ _type = TREE_BEGIN_V3TOK; - // ./ANTLRv3.g:35:18: ( '^(' ) - // ./ANTLRv3.g:35:20: '^(' + // ANTLRv3.g:35:18: ( '^(' ) + // ANTLRv3.g:35:20: '^(' { MATCHS(lit_7); if (HASEXCEPTION()) @@ -57649,47 +57649,6 @@ // Comes from: 36:7: ( '$' ) /** \brief Lexer rule generated by ANTLR3 * - * $ANTLR start T__72 - * - * Looks to match the characters the constitute the token T__72 - * from the attached input stream. - * - * - * \remark - * - lexer->error == ANTLR3_TRUE if an exception was thrown. - */ -static ANTLR3_INLINE -void mT__72(pANTLRv3Lexer ctx) -{ - ANTLR3_UINT32 _type; - - _type = T__72; - - - // ./ANTLRv3.g:36:7: ( '$' ) - // ./ANTLRv3.g:36:9: '$' - { - MATCHC('$'); - if (HASEXCEPTION()) - { - goto ruleT__72Ex; - } - - - } - - LEXSTATE->type = _type; - // This is where rules clean up and exit - // - goto ruleT__72Ex; /* Prevent compiler warnings */ - ruleT__72Ex: ; - -} -// $ANTLR end T__72 - -// Comes from: 37:7: ( '(' ) -/** \brief Lexer rule generated by ANTLR3 - * * $ANTLR start T__73 * * Looks to match the characters the constitute the token T__73 @@ -57707,10 +57666,10 @@ _type = T__73; - // ./ANTLRv3.g:37:7: ( '(' ) - // ./ANTLRv3.g:37:9: '(' + // ANTLRv3.g:36:7: ( '$' ) + // ANTLRv3.g:36:9: '$' { - MATCHC('('); + MATCHC('$'); if (HASEXCEPTION()) { goto ruleT__73Ex; @@ -57728,7 +57687,7 @@ } // $ANTLR end T__73 -// Comes from: 38:7: ( ')' ) +// Comes from: 37:7: ( '(' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__74 @@ -57748,10 +57707,10 @@ _type = T__74; - // ./ANTLRv3.g:38:7: ( ')' ) - // ./ANTLRv3.g:38:9: ')' + // ANTLRv3.g:37:7: ( '(' ) + // ANTLRv3.g:37:9: '(' { - MATCHC(')'); + MATCHC('('); if (HASEXCEPTION()) { goto ruleT__74Ex; @@ -57769,7 +57728,7 @@ } // $ANTLR end T__74 -// Comes from: 39:7: ( '*' ) +// Comes from: 38:7: ( ')' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__75 @@ -57789,10 +57748,10 @@ _type = T__75; - // ./ANTLRv3.g:39:7: ( '*' ) - // ./ANTLRv3.g:39:9: '*' + // ANTLRv3.g:38:7: ( ')' ) + // ANTLRv3.g:38:9: ')' { - MATCHC('*'); + MATCHC(')'); if (HASEXCEPTION()) { goto ruleT__75Ex; @@ -57810,7 +57769,7 @@ } // $ANTLR end T__75 -// Comes from: 40:7: ( '+' ) +// Comes from: 39:7: ( '*' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__76 @@ -57830,10 +57789,10 @@ _type = T__76; - // ./ANTLRv3.g:40:7: ( '+' ) - // ./ANTLRv3.g:40:9: '+' + // ANTLRv3.g:39:7: ( '*' ) + // ANTLRv3.g:39:9: '*' { - MATCHC('+'); + MATCHC('*'); if (HASEXCEPTION()) { goto ruleT__76Ex; @@ -57851,7 +57810,7 @@ } // $ANTLR end T__76 -// Comes from: 41:7: ( ',' ) +// Comes from: 40:7: ( '+' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__77 @@ -57871,10 +57830,10 @@ _type = T__77; - // ./ANTLRv3.g:41:7: ( ',' ) - // ./ANTLRv3.g:41:9: ',' + // ANTLRv3.g:40:7: ( '+' ) + // ANTLRv3.g:40:9: '+' { - MATCHC(','); + MATCHC('+'); if (HASEXCEPTION()) { goto ruleT__77Ex; @@ -57892,7 +57851,7 @@ } // $ANTLR end T__77 -// Comes from: 42:7: ( '.' ) +// Comes from: 41:7: ( ',' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__78 @@ -57912,10 +57871,10 @@ _type = T__78; - // ./ANTLRv3.g:42:7: ( '.' ) - // ./ANTLRv3.g:42:9: '.' + // ANTLRv3.g:41:7: ( ',' ) + // ANTLRv3.g:41:9: ',' { - MATCHC('.'); + MATCHC(','); if (HASEXCEPTION()) { goto ruleT__78Ex; @@ -57933,7 +57892,7 @@ } // $ANTLR end T__78 -// Comes from: 43:7: ( ':' ) +// Comes from: 42:7: ( ':' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__79 @@ -57953,8 +57912,8 @@ _type = T__79; - // ./ANTLRv3.g:43:7: ( ':' ) - // ./ANTLRv3.g:43:9: ':' + // ANTLRv3.g:42:7: ( ':' ) + // ANTLRv3.g:42:9: ':' { MATCHC(':'); if (HASEXCEPTION()) @@ -57974,7 +57933,7 @@ } // $ANTLR end T__79 -// Comes from: 44:7: ( '::' ) +// Comes from: 43:7: ( '::' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__80 @@ -57994,8 +57953,8 @@ _type = T__80; - // ./ANTLRv3.g:44:7: ( '::' ) - // ./ANTLRv3.g:44:9: '::' + // ANTLRv3.g:43:7: ( '::' ) + // ANTLRv3.g:43:9: '::' { MATCHS(lit_8); if (HASEXCEPTION()) @@ -58017,7 +57976,7 @@ } // $ANTLR end T__80 -// Comes from: 45:7: ( ';' ) +// Comes from: 44:7: ( ';' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__81 @@ -58037,8 +57996,8 @@ _type = T__81; - // ./ANTLRv3.g:45:7: ( ';' ) - // ./ANTLRv3.g:45:9: ';' + // ANTLRv3.g:44:7: ( ';' ) + // ANTLRv3.g:44:9: ';' { MATCHC(';'); if (HASEXCEPTION()) @@ -58058,7 +58017,7 @@ } // $ANTLR end T__81 -// Comes from: 46:7: ( '<' ) +// Comes from: 45:7: ( '<' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__82 @@ -58078,8 +58037,8 @@ _type = T__82; - // ./ANTLRv3.g:46:7: ( '<' ) - // ./ANTLRv3.g:46:9: '<' + // ANTLRv3.g:45:7: ( '<' ) + // ANTLRv3.g:45:9: '<' { MATCHC('<'); if (HASEXCEPTION()) @@ -58099,7 +58058,7 @@ } // $ANTLR end T__82 -// Comes from: 47:7: ( '=>' ) +// Comes from: 46:7: ( '=>' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__83 @@ -58119,8 +58078,8 @@ _type = T__83; - // ./ANTLRv3.g:47:7: ( '=>' ) - // ./ANTLRv3.g:47:9: '=>' + // ANTLRv3.g:46:7: ( '=>' ) + // ANTLRv3.g:46:9: '=>' { MATCHS(lit_9); if (HASEXCEPTION()) @@ -58142,7 +58101,7 @@ } // $ANTLR end T__83 -// Comes from: 48:7: ( '>' ) +// Comes from: 47:7: ( '>' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__84 @@ -58162,8 +58121,8 @@ _type = T__84; - // ./ANTLRv3.g:48:7: ( '>' ) - // ./ANTLRv3.g:48:9: '>' + // ANTLRv3.g:47:7: ( '>' ) + // ANTLRv3.g:47:9: '>' { MATCHC('>'); if (HASEXCEPTION()) @@ -58183,7 +58142,7 @@ } // $ANTLR end T__84 -// Comes from: 49:7: ( '?' ) +// Comes from: 48:7: ( '?' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__85 @@ -58203,8 +58162,8 @@ _type = T__85; - // ./ANTLRv3.g:49:7: ( '?' ) - // ./ANTLRv3.g:49:9: '?' + // ANTLRv3.g:48:7: ( '?' ) + // ANTLRv3.g:48:9: '?' { MATCHC('?'); if (HASEXCEPTION()) @@ -58224,7 +58183,7 @@ } // $ANTLR end T__85 -// Comes from: 50:7: ( 'grammar' ) +// Comes from: 49:7: ( 'grammar' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__86 @@ -58244,8 +58203,8 @@ _type = T__86; - // ./ANTLRv3.g:50:7: ( 'grammar' ) - // ./ANTLRv3.g:50:9: 'grammar' + // ANTLRv3.g:49:7: ( 'grammar' ) + // ANTLRv3.g:49:9: 'grammar' { MATCHS(lit_10); if (HASEXCEPTION()) @@ -58267,7 +58226,7 @@ } // $ANTLR end T__86 -// Comes from: 51:7: ( 'lexer' ) +// Comes from: 50:7: ( 'lexer' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__87 @@ -58287,8 +58246,8 @@ _type = T__87; - // ./ANTLRv3.g:51:7: ( 'lexer' ) - // ./ANTLRv3.g:51:9: 'lexer' + // ANTLRv3.g:50:7: ( 'lexer' ) + // ANTLRv3.g:50:9: 'lexer' { MATCHS(lit_11); if (HASEXCEPTION()) @@ -58310,7 +58269,7 @@ } // $ANTLR end T__87 -// Comes from: 52:7: ( 'parser' ) +// Comes from: 51:7: ( 'parser' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__88 @@ -58330,8 +58289,8 @@ _type = T__88; - // ./ANTLRv3.g:52:7: ( 'parser' ) - // ./ANTLRv3.g:52:9: 'parser' + // ANTLRv3.g:51:7: ( 'parser' ) + // ANTLRv3.g:51:9: 'parser' { MATCHS(lit_12); if (HASEXCEPTION()) @@ -58353,7 +58312,7 @@ } // $ANTLR end T__88 -// Comes from: 53:7: ( 'private' ) +// Comes from: 52:7: ( 'private' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__89 @@ -58373,8 +58332,8 @@ _type = T__89; - // ./ANTLRv3.g:53:7: ( 'private' ) - // ./ANTLRv3.g:53:9: 'private' + // ANTLRv3.g:52:7: ( 'private' ) + // ANTLRv3.g:52:9: 'private' { MATCHS(lit_13); if (HASEXCEPTION()) @@ -58396,7 +58355,7 @@ } // $ANTLR end T__89 -// Comes from: 54:7: ( 'protected' ) +// Comes from: 53:7: ( 'protected' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__90 @@ -58416,8 +58375,8 @@ _type = T__90; - // ./ANTLRv3.g:54:7: ( 'protected' ) - // ./ANTLRv3.g:54:9: 'protected' + // ANTLRv3.g:53:7: ( 'protected' ) + // ANTLRv3.g:53:9: 'protected' { MATCHS(lit_14); if (HASEXCEPTION()) @@ -58439,7 +58398,7 @@ } // $ANTLR end T__90 -// Comes from: 55:7: ( 'public' ) +// Comes from: 54:7: ( 'public' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__91 @@ -58459,8 +58418,8 @@ _type = T__91; - // ./ANTLRv3.g:55:7: ( 'public' ) - // ./ANTLRv3.g:55:9: 'public' + // ANTLRv3.g:54:7: ( 'public' ) + // ANTLRv3.g:54:9: 'public' { MATCHS(lit_15); if (HASEXCEPTION()) @@ -58482,7 +58441,7 @@ } // $ANTLR end T__91 -// Comes from: 56:7: ( 'throws' ) +// Comes from: 55:7: ( 'throws' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__92 @@ -58502,8 +58461,8 @@ _type = T__92; - // ./ANTLRv3.g:56:7: ( 'throws' ) - // ./ANTLRv3.g:56:9: 'throws' + // ANTLRv3.g:55:7: ( 'throws' ) + // ANTLRv3.g:55:9: 'throws' { MATCHS(lit_16); if (HASEXCEPTION()) @@ -58525,7 +58484,7 @@ } // $ANTLR end T__92 -// Comes from: 57:7: ( 'tree' ) +// Comes from: 56:7: ( 'tree' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__93 @@ -58545,8 +58504,8 @@ _type = T__93; - // ./ANTLRv3.g:57:7: ( 'tree' ) - // ./ANTLRv3.g:57:9: 'tree' + // ANTLRv3.g:56:7: ( 'tree' ) + // ANTLRv3.g:56:9: 'tree' { MATCHS(lit_17); if (HASEXCEPTION()) @@ -58568,7 +58527,7 @@ } // $ANTLR end T__93 -// Comes from: 58:7: ( '|' ) +// Comes from: 57:7: ( '|' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__94 @@ -58588,8 +58547,8 @@ _type = T__94; - // ./ANTLRv3.g:58:7: ( '|' ) - // ./ANTLRv3.g:58:9: '|' + // ANTLRv3.g:57:7: ( '|' ) + // ANTLRv3.g:57:9: '|' { MATCHC('|'); if (HASEXCEPTION()) @@ -58609,7 +58568,7 @@ } // $ANTLR end T__94 -// Comes from: 59:7: ( '}' ) +// Comes from: 58:7: ( '}' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__95 @@ -58629,8 +58588,8 @@ _type = T__95; - // ./ANTLRv3.g:59:7: ( '}' ) - // ./ANTLRv3.g:59:9: '}' + // ANTLRv3.g:58:7: ( '}' ) + // ANTLRv3.g:58:9: '}' { MATCHC('}'); if (HASEXCEPTION()) @@ -58650,7 +58609,7 @@ } // $ANTLR end T__95 -// Comes from: 60:7: ( '~' ) +// Comes from: 59:7: ( '~' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start T__96 @@ -58670,8 +58629,8 @@ _type = T__96; - // ./ANTLRv3.g:60:7: ( '~' ) - // ./ANTLRv3.g:60:9: '~' + // ANTLRv3.g:59:7: ( '~' ) + // ANTLRv3.g:59:9: '~' { MATCHC('~'); if (HASEXCEPTION()) @@ -58691,7 +58650,48 @@ } // $ANTLR end T__96 -// Comes from: 516:12: ( 'options' ) +// Comes from: 515:8: ( '.' ) +/** \brief Lexer rule generated by ANTLR3 + * + * $ANTLR start DOT_SYM + * + * Looks to match the characters the constitute the token DOT_SYM + * from the attached input stream. + * + * + * \remark + * - lexer->error == ANTLR3_TRUE if an exception was thrown. + */ +static ANTLR3_INLINE +void mDOT_SYM(pANTLRv3Lexer ctx) +{ + ANTLR3_UINT32 _type; + + _type = DOT_SYM; + + + // ANTLRv3.g:515:8: ( '.' ) + // ANTLRv3.g:515:10: '.' + { + MATCHC('.'); + if (HASEXCEPTION()) + { + goto ruleDOT_SYMEx; + } + + + } + + LEXSTATE->type = _type; + // This is where rules clean up and exit + // + goto ruleDOT_SYMEx; /* Prevent compiler warnings */ + ruleDOT_SYMEx: ; + +} +// $ANTLR end DOT_SYM + +// Comes from: 517:12: ( 'options' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start OPTIONS_SYM @@ -58711,8 +58711,8 @@ _type = OPTIONS_SYM; - // ./ANTLRv3.g:516:12: ( 'options' ) - // ./ANTLRv3.g:516:14: 'options' + // ANTLRv3.g:517:12: ( 'options' ) + // ANTLRv3.g:517:14: 'options' { MATCHS(lit_18); if (HASEXCEPTION()) @@ -58734,7 +58734,7 @@ } // $ANTLR end OPTIONS_SYM -// Comes from: 517:11: ( 'tokens' ) +// Comes from: 518:11: ( 'tokens' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start TOKENS_SYM @@ -58754,8 +58754,8 @@ _type = TOKENS_SYM; - // ./ANTLRv3.g:517:11: ( 'tokens' ) - // ./ANTLRv3.g:517:13: 'tokens' + // ANTLRv3.g:518:11: ( 'tokens' ) + // ANTLRv3.g:518:13: 'tokens' { MATCHS(lit_19); if (HASEXCEPTION()) @@ -58777,7 +58777,7 @@ } // $ANTLR end TOKENS_SYM -// Comes from: 518:8: ( 'src' ) +// Comes from: 519:8: ( 'src' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start SRC_SYM @@ -58797,8 +58797,8 @@ _type = SRC_SYM; - // ./ANTLRv3.g:518:8: ( 'src' ) - // ./ANTLRv3.g:518:11: 'src' + // ANTLRv3.g:519:8: ( 'src' ) + // ANTLRv3.g:519:11: 'src' { MATCHS(lit_20); if (HASEXCEPTION()) @@ -58820,7 +58820,7 @@ } // $ANTLR end SRC_SYM -// Comes from: 519:12: ( 'finally' ) +// Comes from: 520:12: ( 'finally' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start FINALLY_SYM @@ -58840,8 +58840,8 @@ _type = FINALLY_SYM; - // ./ANTLRv3.g:519:12: ( 'finally' ) - // ./ANTLRv3.g:519:14: 'finally' + // ANTLRv3.g:520:12: ( 'finally' ) + // ANTLRv3.g:520:14: 'finally' { MATCHS(lit_21); if (HASEXCEPTION()) @@ -58863,7 +58863,7 @@ } // $ANTLR end FINALLY_SYM -// Comes from: 520:10: ( 'catch' ) +// Comes from: 521:10: ( 'catch' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start CATCH_SYM @@ -58883,8 +58883,8 @@ _type = CATCH_SYM; - // ./ANTLRv3.g:520:10: ( 'catch' ) - // ./ANTLRv3.g:520:12: 'catch' + // ANTLRv3.g:521:10: ( 'catch' ) + // ANTLRv3.g:521:12: 'catch' { MATCHS(lit_22); if (HASEXCEPTION()) @@ -58906,7 +58906,7 @@ } // $ANTLR end CATCH_SYM -// Comes from: 522:11: ( '//' ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* ) ( '\\r' )? '\\n' ) +// Comes from: 523:11: ( '//' ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* ) ( '\\r' )? '\\n' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start SL_COMMENT @@ -58926,8 +58926,8 @@ _type = SL_COMMENT; - // ./ANTLRv3.g:522:11: ( '//' ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* ) ( '\\r' )? '\\n' ) - // ./ANTLRv3.g:523:2: '//' ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* ) ( '\\r' )? '\\n' + // ANTLRv3.g:523:11: ( '//' ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* ) ( '\\r' )? '\\n' ) + // ANTLRv3.g:524:2: '//' ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* ) ( '\\r' )? '\\n' { MATCHS(lit_23); if (HASEXCEPTION()) @@ -58938,7 +58938,7 @@ - // ./ANTLRv3.g:524:3: ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* ) + // ANTLRv3.g:525:3: ( ' $ANTLR ' SRC | (~ ( '\\r' | '\\n' ) )* ) { int alt2=2; alt2 = cdfa2.predict(ctx, RECOGNIZER, ISTREAM, &cdfa2); @@ -58950,7 +58950,7 @@ switch (alt2) { case 1: - // ./ANTLRv3.g:525:4: ' $ANTLR ' SRC + // ANTLRv3.g:526:4: ' $ANTLR ' SRC { MATCHS(lit_24); if (HASEXCEPTION()) @@ -58961,7 +58961,7 @@ - /* 525:4: ' $ANTLR ' SRC */ + /* 526:4: ' $ANTLR ' SRC */ mSRC(ctx ); if (HASEXCEPTION()) { @@ -58973,9 +58973,9 @@ } break; case 2: - // ./ANTLRv3.g:526:6: (~ ( '\\r' | '\\n' ) )* + // ANTLRv3.g:527:6: (~ ( '\\r' | '\\n' ) )* { - // ./ANTLRv3.g:526:6: (~ ( '\\r' | '\\n' ) )* + // ANTLRv3.g:527:6: (~ ( '\\r' | '\\n' ) )* for (;;) { @@ -58993,7 +58993,7 @@ switch (alt1) { case 1: - // ./ANTLRv3.g: + // ANTLRv3.g: { if ( ((LA(1) >= 0x0000) && (LA(1) <= '\t')) || ((LA(1) >= 0x000B) && (LA(1) <= '\f')) || ((LA(1) >= 0x000E) && (LA(1) <= 0xFFFF)) ) { @@ -59027,7 +59027,7 @@ } } - // ./ANTLRv3.g:528:2: ( '\\r' )? + // ANTLRv3.g:529:2: ( '\\r' )? { int alt3=2; switch ( LA(1) ) @@ -59042,7 +59042,7 @@ switch (alt3) { case 1: - // ./ANTLRv3.g:528:2: '\\r' + // ANTLRv3.g:529:2: '\\r' { MATCHC('\r'); if (HASEXCEPTION()) @@ -59080,7 +59080,7 @@ } // $ANTLR end SL_COMMENT -// Comes from: 533:2: ( '/*' ( . )* '*/' ) +// Comes from: 534:2: ( '/*' ( . )* '*/' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start ML_COMMENT @@ -59100,8 +59100,8 @@ _type = ML_COMMENT; - // ./ANTLRv3.g:533:2: ( '/*' ( . )* '*/' ) - // ./ANTLRv3.g:533:4: '/*' ( . )* '*/' + // ANTLRv3.g:534:2: ( '/*' ( . )* '*/' ) + // ANTLRv3.g:534:4: '/*' ( . )* '*/' { MATCHS(lit_25); if (HASEXCEPTION()) @@ -59117,7 +59117,7 @@ } - // ./ANTLRv3.g:533:74: ( . )* + // ANTLRv3.g:534:74: ( . )* for (;;) { @@ -59152,7 +59152,7 @@ switch (alt4) { case 1: - // ./ANTLRv3.g:533:74: . + // ANTLRv3.g:534:74: . { MATCHANY(); if (HASEXCEPTION()) @@ -59192,7 +59192,7 @@ } // $ANTLR end ML_COMMENT -// Comes from: 537:2: ( '\\'' LITERAL_CHAR '\\'' ) +// Comes from: 538:2: ( '\\'' LITERAL_CHAR '\\'' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start CHAR_LITERAL @@ -59212,8 +59212,8 @@ _type = CHAR_LITERAL; - // ./ANTLRv3.g:537:2: ( '\\'' LITERAL_CHAR '\\'' ) - // ./ANTLRv3.g:537:4: '\\'' LITERAL_CHAR '\\'' + // ANTLRv3.g:538:2: ( '\\'' LITERAL_CHAR '\\'' ) + // ANTLRv3.g:538:4: '\\'' LITERAL_CHAR '\\'' { MATCHC('\''); if (HASEXCEPTION()) @@ -59222,7 +59222,7 @@ } - /* 537:4: '\\'' LITERAL_CHAR '\\'' */ + /* 538:4: '\\'' LITERAL_CHAR '\\'' */ mLITERAL_CHAR(ctx ); if (HASEXCEPTION()) { @@ -59249,7 +59249,7 @@ } // $ANTLR end CHAR_LITERAL -// Comes from: 541:2: ( '\\'' LITERAL_CHAR ( LITERAL_CHAR )* '\\'' ) +// Comes from: 542:2: ( '\\'' LITERAL_CHAR ( LITERAL_CHAR )* '\\'' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start STRING_LITERAL @@ -59269,8 +59269,8 @@ _type = STRING_LITERAL; - // ./ANTLRv3.g:541:2: ( '\\'' LITERAL_CHAR ( LITERAL_CHAR )* '\\'' ) - // ./ANTLRv3.g:541:4: '\\'' LITERAL_CHAR ( LITERAL_CHAR )* '\\'' + // ANTLRv3.g:542:2: ( '\\'' LITERAL_CHAR ( LITERAL_CHAR )* '\\'' ) + // ANTLRv3.g:542:4: '\\'' LITERAL_CHAR ( LITERAL_CHAR )* '\\'' { MATCHC('\''); if (HASEXCEPTION()) @@ -59279,7 +59279,7 @@ } - /* 541:4: '\\'' LITERAL_CHAR ( LITERAL_CHAR )* '\\'' */ + /* 542:4: '\\'' LITERAL_CHAR ( LITERAL_CHAR )* '\\'' */ mLITERAL_CHAR(ctx ); if (HASEXCEPTION()) { @@ -59288,7 +59288,7 @@ - // ./ANTLRv3.g:541:22: ( LITERAL_CHAR )* + // ANTLRv3.g:542:22: ( LITERAL_CHAR )* for (;;) { @@ -59306,9 +59306,9 @@ switch (alt5) { case 1: - // ./ANTLRv3.g:541:22: LITERAL_CHAR + // ANTLRv3.g:542:22: LITERAL_CHAR { - /* 541:22: LITERAL_CHAR */ + /* 542:22: LITERAL_CHAR */ mLITERAL_CHAR(ctx ); if (HASEXCEPTION()) { @@ -59346,7 +59346,7 @@ } // $ANTLR end STRING_LITERAL -// Comes from: 547:2: ( ESC |~ ( '\\'' | '\\\\' ) ) +// Comes from: 548:2: ( ESC |~ ( '\\'' | '\\\\' ) ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start LITERAL_CHAR @@ -59365,7 +59365,7 @@ { - // ./ANTLRv3.g:547:2: ( ESC |~ ( '\\'' | '\\\\' ) ) + // ANTLRv3.g:548:2: ( ESC |~ ( '\\'' | '\\\\' ) ) ANTLR3_UINT32 alt6; @@ -59398,9 +59398,9 @@ switch (alt6) { case 1: - // ./ANTLRv3.g:547:4: ESC + // ANTLRv3.g:548:4: ESC { - /* 547:4: ESC */ + /* 548:4: ESC */ mESC(ctx ); if (HASEXCEPTION()) { @@ -59412,7 +59412,7 @@ } break; case 2: - // ./ANTLRv3.g:548:4: ~ ( '\\'' | '\\\\' ) + // ANTLRv3.g:549:4: ~ ( '\\'' | '\\\\' ) { if ( ((LA(1) >= 0x0000) && (LA(1) <= '&')) || ((LA(1) >= '(') && (LA(1) <= '[')) || ((LA(1) >= ']') && (LA(1) <= 0xFFFF)) ) { @@ -59443,7 +59443,7 @@ } // $ANTLR end LITERAL_CHAR -// Comes from: 551:2: ( '\"' ( ESC |~ ( '\\\\' | '\"' ) )* '\"' ) +// Comes from: 552:2: ( '\"' ( ESC |~ ( '\\\\' | '\"' ) )* '\"' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start DOUBLE_QUOTE_STRING_LITERAL @@ -59463,8 +59463,8 @@ _type = DOUBLE_QUOTE_STRING_LITERAL; - // ./ANTLRv3.g:551:2: ( '\"' ( ESC |~ ( '\\\\' | '\"' ) )* '\"' ) - // ./ANTLRv3.g:551:4: '\"' ( ESC |~ ( '\\\\' | '\"' ) )* '\"' + // ANTLRv3.g:552:2: ( '\"' ( ESC |~ ( '\\\\' | '\"' ) )* '\"' ) + // ANTLRv3.g:552:4: '\"' ( ESC |~ ( '\\\\' | '\"' ) )* '\"' { MATCHC('"'); if (HASEXCEPTION()) @@ -59473,7 +59473,7 @@ } - // ./ANTLRv3.g:551:8: ( ESC |~ ( '\\\\' | '\"' ) )* + // ANTLRv3.g:552:8: ( ESC |~ ( '\\\\' | '\"' ) )* for (;;) { @@ -59495,9 +59495,9 @@ switch (alt7) { case 1: - // ./ANTLRv3.g:551:9: ESC + // ANTLRv3.g:552:9: ESC { - /* 551:9: ESC */ + /* 552:9: ESC */ mESC(ctx ); if (HASEXCEPTION()) { @@ -59509,7 +59509,7 @@ } break; case 2: - // ./ANTLRv3.g:551:15: ~ ( '\\\\' | '\"' ) + // ANTLRv3.g:552:15: ~ ( '\\\\' | '\"' ) { if ( ((LA(1) >= 0x0000) && (LA(1) <= '!')) || ((LA(1) >= '#') && (LA(1) <= '[')) || ((LA(1) >= ']') && (LA(1) <= 0xFFFF)) ) { @@ -59555,7 +59555,7 @@ } // $ANTLR end DOUBLE_QUOTE_STRING_LITERAL -// Comes from: 555:2: ( '<<' ( . )* '>>' ) +// Comes from: 556:2: ( '<<' ( . )* '>>' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start DOUBLE_ANGLE_STRING_LITERAL @@ -59575,8 +59575,8 @@ _type = DOUBLE_ANGLE_STRING_LITERAL; - // ./ANTLRv3.g:555:2: ( '<<' ( . )* '>>' ) - // ./ANTLRv3.g:555:4: '<<' ( . )* '>>' + // ANTLRv3.g:556:2: ( '<<' ( . )* '>>' ) + // ANTLRv3.g:556:4: '<<' ( . )* '>>' { MATCHS(lit_27); if (HASEXCEPTION()) @@ -59587,7 +59587,7 @@ - // ./ANTLRv3.g:555:9: ( . )* + // ANTLRv3.g:556:9: ( . )* for (;;) { @@ -59622,7 +59622,7 @@ switch (alt8) { case 1: - // ./ANTLRv3.g:555:9: . + // ANTLRv3.g:556:9: . { MATCHANY(); if (HASEXCEPTION()) @@ -59662,7 +59662,7 @@ } // $ANTLR end DOUBLE_ANGLE_STRING_LITERAL -// Comes from: 560:5: ( '\\\\' ( 'n' | 'r' | 't' | 'b' | 'f' | '\"' | '\\'' | '\\\\' | '>' | 'u' XDIGIT XDIGIT XDIGIT XDIGIT | . ) ) +// Comes from: 561:5: ( '\\\\' ( 'n' | 'r' | 't' | 'b' | 'f' | '\"' | '\\'' | '\\\\' | '>' | 'u' XDIGIT XDIGIT XDIGIT XDIGIT | . ) ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start ESC @@ -59680,8 +59680,8 @@ ANTLR3_UINT32 _type; - // ./ANTLRv3.g:560:5: ( '\\\\' ( 'n' | 'r' | 't' | 'b' | 'f' | '\"' | '\\'' | '\\\\' | '>' | 'u' XDIGIT XDIGIT XDIGIT XDIGIT | . ) ) - // ./ANTLRv3.g:560:7: '\\\\' ( 'n' | 'r' | 't' | 'b' | 'f' | '\"' | '\\'' | '\\\\' | '>' | 'u' XDIGIT XDIGIT XDIGIT XDIGIT | . ) + // ANTLRv3.g:561:5: ( '\\\\' ( 'n' | 'r' | 't' | 'b' | 'f' | '\"' | '\\'' | '\\\\' | '>' | 'u' XDIGIT XDIGIT XDIGIT XDIGIT | . ) ) + // ANTLRv3.g:561:7: '\\\\' ( 'n' | 'r' | 't' | 'b' | 'f' | '\"' | '\\'' | '\\\\' | '>' | 'u' XDIGIT XDIGIT XDIGIT XDIGIT | . ) { MATCHC('\\'); if (HASEXCEPTION()) @@ -59690,7 +59690,7 @@ } - // ./ANTLRv3.g:561:3: ( 'n' | 'r' | 't' | 'b' | 'f' | '\"' | '\\'' | '\\\\' | '>' | 'u' XDIGIT XDIGIT XDIGIT XDIGIT | . ) + // ANTLRv3.g:562:3: ( 'n' | 'r' | 't' | 'b' | 'f' | '\"' | '\\'' | '\\\\' | '>' | 'u' XDIGIT XDIGIT XDIGIT XDIGIT | . ) { int alt9=11; { @@ -59788,7 +59788,7 @@ switch (alt9) { case 1: - // ./ANTLRv3.g:561:5: 'n' + // ANTLRv3.g:562:5: 'n' { MATCHC('n'); if (HASEXCEPTION()) @@ -59800,7 +59800,7 @@ } break; case 2: - // ./ANTLRv3.g:562:5: 'r' + // ANTLRv3.g:563:5: 'r' { MATCHC('r'); if (HASEXCEPTION()) @@ -59812,7 +59812,7 @@ } break; case 3: - // ./ANTLRv3.g:563:5: 't' + // ANTLRv3.g:564:5: 't' { MATCHC('t'); if (HASEXCEPTION()) @@ -59824,7 +59824,7 @@ } break; case 4: - // ./ANTLRv3.g:564:5: 'b' + // ANTLRv3.g:565:5: 'b' { MATCHC('b'); if (HASEXCEPTION()) @@ -59836,7 +59836,7 @@ } break; case 5: - // ./ANTLRv3.g:565:5: 'f' + // ANTLRv3.g:566:5: 'f' { MATCHC('f'); if (HASEXCEPTION()) @@ -59848,7 +59848,7 @@ } break; case 6: - // ./ANTLRv3.g:566:5: '\"' + // ANTLRv3.g:567:5: '\"' { MATCHC('"'); if (HASEXCEPTION()) @@ -59860,7 +59860,7 @@ } break; case 7: - // ./ANTLRv3.g:567:5: '\\'' + // ANTLRv3.g:568:5: '\\'' { MATCHC('\''); if (HASEXCEPTION()) @@ -59872,7 +59872,7 @@ } break; case 8: - // ./ANTLRv3.g:568:5: '\\\\' + // ANTLRv3.g:569:5: '\\\\' { MATCHC('\\'); if (HASEXCEPTION()) @@ -59884,7 +59884,7 @@ } break; case 9: - // ./ANTLRv3.g:569:5: '>' + // ANTLRv3.g:570:5: '>' { MATCHC('>'); if (HASEXCEPTION()) @@ -59896,7 +59896,7 @@ } break; case 10: - // ./ANTLRv3.g:570:5: 'u' XDIGIT XDIGIT XDIGIT XDIGIT + // ANTLRv3.g:571:5: 'u' XDIGIT XDIGIT XDIGIT XDIGIT { MATCHC('u'); if (HASEXCEPTION()) @@ -59905,7 +59905,7 @@ } - /* 570:5: 'u' XDIGIT XDIGIT XDIGIT XDIGIT */ + /* 571:5: 'u' XDIGIT XDIGIT XDIGIT XDIGIT */ mXDIGIT(ctx ); if (HASEXCEPTION()) { @@ -59914,7 +59914,7 @@ - /* 570:5: 'u' XDIGIT XDIGIT XDIGIT XDIGIT */ + /* 571:5: 'u' XDIGIT XDIGIT XDIGIT XDIGIT */ mXDIGIT(ctx ); if (HASEXCEPTION()) { @@ -59923,7 +59923,7 @@ - /* 570:5: 'u' XDIGIT XDIGIT XDIGIT XDIGIT */ + /* 571:5: 'u' XDIGIT XDIGIT XDIGIT XDIGIT */ mXDIGIT(ctx ); if (HASEXCEPTION()) { @@ -59932,7 +59932,7 @@ - /* 570:5: 'u' XDIGIT XDIGIT XDIGIT XDIGIT */ + /* 571:5: 'u' XDIGIT XDIGIT XDIGIT XDIGIT */ mXDIGIT(ctx ); if (HASEXCEPTION()) { @@ -59944,7 +59944,7 @@ } break; case 11: - // ./ANTLRv3.g:571:5: . + // ANTLRv3.g:572:5: . { MATCHANY(); if (HASEXCEPTION()) @@ -59970,7 +59970,7 @@ } // $ANTLR end ESC -// Comes from: 576:8: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) +// Comes from: 577:8: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start XDIGIT @@ -59988,8 +59988,8 @@ ANTLR3_UINT32 _type; - // ./ANTLRv3.g:576:8: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) - // ./ANTLRv3.g: + // ANTLRv3.g:577:8: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) + // ANTLRv3.g: { if ( ((LA(1) >= '0') && (LA(1) <= '9')) || ((LA(1) >= 'A') && (LA(1) <= 'F')) || ((LA(1) >= 'a') && (LA(1) <= 'f')) ) { @@ -60017,7 +60017,7 @@ } // $ANTLR end XDIGIT -// Comes from: 581:5: ( ( '0' .. '9' )+ ) +// Comes from: 582:5: ( ( '0' .. '9' )+ ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start INT @@ -60037,10 +60037,10 @@ _type = INT; - // ./ANTLRv3.g:581:5: ( ( '0' .. '9' )+ ) - // ./ANTLRv3.g:581:7: ( '0' .. '9' )+ + // ANTLRv3.g:582:5: ( ( '0' .. '9' )+ ) + // ANTLRv3.g:582:7: ( '0' .. '9' )+ { - // ./ANTLRv3.g:581:7: ( '0' .. '9' )+ + // ANTLRv3.g:582:7: ( '0' .. '9' )+ { int cnt10=0; @@ -60069,7 +60069,7 @@ switch (alt10) { case 1: - // ./ANTLRv3.g: + // ANTLRv3.g: { if ( ((LA(1) >= '0') && (LA(1) <= '9')) ) { @@ -60120,7 +60120,7 @@ } // $ANTLR end INT -// Comes from: 585:2: ( NESTED_ARG_ACTION ) +// Comes from: 586:2: ( NESTED_ARG_ACTION ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start ARG_ACTION @@ -60140,10 +60140,10 @@ _type = ARG_ACTION; - // ./ANTLRv3.g:585:2: ( NESTED_ARG_ACTION ) - // ./ANTLRv3.g:585:4: NESTED_ARG_ACTION + // ANTLRv3.g:586:2: ( NESTED_ARG_ACTION ) + // ANTLRv3.g:586:4: NESTED_ARG_ACTION { - /* 585:4: NESTED_ARG_ACTION */ + /* 586:4: NESTED_ARG_ACTION */ mNESTED_ARG_ACTION(ctx ); if (HASEXCEPTION()) { @@ -60163,7 +60163,7 @@ } // $ANTLR end ARG_ACTION -// Comes from: 590:19: ( '[' ( options {greedy=false; k=1; } : NESTED_ARG_ACTION | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* ']' ) +// Comes from: 591:19: ( '[' ( options {greedy=false; k=1; } : NESTED_ARG_ACTION | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* ']' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start NESTED_ARG_ACTION @@ -60181,8 +60181,8 @@ ANTLR3_UINT32 _type; - // ./ANTLRv3.g:590:19: ( '[' ( options {greedy=false; k=1; } : NESTED_ARG_ACTION | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* ']' ) - // ./ANTLRv3.g:591:2: '[' ( options {greedy=false; k=1; } : NESTED_ARG_ACTION | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* ']' + // ANTLRv3.g:591:19: ( '[' ( options {greedy=false; k=1; } : NESTED_ARG_ACTION | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* ']' ) + // ANTLRv3.g:592:2: '[' ( options {greedy=false; k=1; } : NESTED_ARG_ACTION | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* ']' { MATCHC('['); if (HASEXCEPTION()) @@ -60191,7 +60191,7 @@ } - // ./ANTLRv3.g:592:2: ( options {greedy=false; k=1; } : NESTED_ARG_ACTION | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* + // ANTLRv3.g:593:2: ( options {greedy=false; k=1; } : NESTED_ARG_ACTION | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* for (;;) { @@ -60225,9 +60225,9 @@ switch (alt11) { case 1: - // ./ANTLRv3.g:593:4: NESTED_ARG_ACTION + // ANTLRv3.g:594:4: NESTED_ARG_ACTION { - /* 593:4: NESTED_ARG_ACTION */ + /* 594:4: NESTED_ARG_ACTION */ mNESTED_ARG_ACTION(ctx ); if (HASEXCEPTION()) { @@ -60239,9 +60239,9 @@ } break; case 2: - // ./ANTLRv3.g:594:4: ACTION_STRING_LITERAL + // ANTLRv3.g:595:4: ACTION_STRING_LITERAL { - /* 594:4: ACTION_STRING_LITERAL */ + /* 595:4: ACTION_STRING_LITERAL */ mACTION_STRING_LITERAL(ctx ); if (HASEXCEPTION()) { @@ -60253,9 +60253,9 @@ } break; case 3: - // ./ANTLRv3.g:595:4: ACTION_CHAR_LITERAL + // ANTLRv3.g:596:4: ACTION_CHAR_LITERAL { - /* 595:4: ACTION_CHAR_LITERAL */ + /* 596:4: ACTION_CHAR_LITERAL */ mACTION_CHAR_LITERAL(ctx ); if (HASEXCEPTION()) { @@ -60267,7 +60267,7 @@ } break; case 4: - // ./ANTLRv3.g:596:4: . + // ANTLRv3.g:597:4: . { MATCHANY(); if (HASEXCEPTION()) @@ -60305,7 +60305,7 @@ } // $ANTLR end NESTED_ARG_ACTION -// Comes from: 601:7: ( NESTED_ACTION ( '?' )? ) +// Comes from: 602:7: ( NESTED_ACTION ( '?' )? ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start ACTION @@ -60325,10 +60325,10 @@ _type = ACTION; - // ./ANTLRv3.g:601:7: ( NESTED_ACTION ( '?' )? ) - // ./ANTLRv3.g:602:2: NESTED_ACTION ( '?' )? + // ANTLRv3.g:602:7: ( NESTED_ACTION ( '?' )? ) + // ANTLRv3.g:603:2: NESTED_ACTION ( '?' )? { - /* 602:2: NESTED_ACTION ( '?' )? */ + /* 603:2: NESTED_ACTION ( '?' )? */ mNESTED_ACTION(ctx ); if (HASEXCEPTION()) { @@ -60337,7 +60337,7 @@ - // ./ANTLRv3.g:602:16: ( '?' )? + // ANTLRv3.g:603:16: ( '?' )? { int alt12=2; switch ( LA(1) ) @@ -60352,7 +60352,7 @@ switch (alt12) { case 1: - // ./ANTLRv3.g:602:17: '?' + // ANTLRv3.g:603:17: '?' { MATCHC('?'); if (HASEXCEPTION()) @@ -60383,7 +60383,7 @@ } // $ANTLR end ACTION -// Comes from: 607:14: ( '{' ( options {greedy=false; k=2; } : NESTED_ACTION | SL_COMMENT | ML_COMMENT | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* '}' ) +// Comes from: 608:14: ( '{' ( options {greedy=false; k=2; } : NESTED_ACTION | SL_COMMENT | ML_COMMENT | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* '}' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start NESTED_ACTION @@ -60401,8 +60401,8 @@ ANTLR3_UINT32 _type; - // ./ANTLRv3.g:607:14: ( '{' ( options {greedy=false; k=2; } : NESTED_ACTION | SL_COMMENT | ML_COMMENT | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* '}' ) - // ./ANTLRv3.g:608:2: '{' ( options {greedy=false; k=2; } : NESTED_ACTION | SL_COMMENT | ML_COMMENT | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* '}' + // ANTLRv3.g:608:14: ( '{' ( options {greedy=false; k=2; } : NESTED_ACTION | SL_COMMENT | ML_COMMENT | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* '}' ) + // ANTLRv3.g:609:2: '{' ( options {greedy=false; k=2; } : NESTED_ACTION | SL_COMMENT | ML_COMMENT | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* '}' { MATCHC('{'); if (HASEXCEPTION()) @@ -60411,7 +60411,7 @@ } - // ./ANTLRv3.g:609:2: ( options {greedy=false; k=2; } : NESTED_ACTION | SL_COMMENT | ML_COMMENT | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* + // ANTLRv3.g:610:2: ( options {greedy=false; k=2; } : NESTED_ACTION | SL_COMMENT | ML_COMMENT | ACTION_STRING_LITERAL | ACTION_CHAR_LITERAL | . )* for (;;) { @@ -60532,9 +60532,9 @@ switch (alt13) { case 1: - // ./ANTLRv3.g:610:3: NESTED_ACTION + // ANTLRv3.g:611:3: NESTED_ACTION { - /* 610:3: NESTED_ACTION */ + /* 611:3: NESTED_ACTION */ mNESTED_ACTION(ctx ); if (HASEXCEPTION()) { @@ -60546,9 +60546,9 @@ } break; case 2: - // ./ANTLRv3.g:611:5: SL_COMMENT + // ANTLRv3.g:612:5: SL_COMMENT { - /* 611:5: SL_COMMENT */ + /* 612:5: SL_COMMENT */ mSL_COMMENT(ctx ); if (HASEXCEPTION()) { @@ -60560,9 +60560,9 @@ } break; case 3: - // ./ANTLRv3.g:612:5: ML_COMMENT + // ANTLRv3.g:613:5: ML_COMMENT { - /* 612:5: ML_COMMENT */ + /* 613:5: ML_COMMENT */ mML_COMMENT(ctx ); if (HASEXCEPTION()) { @@ -60574,9 +60574,9 @@ } break; case 4: - // ./ANTLRv3.g:613:5: ACTION_STRING_LITERAL + // ANTLRv3.g:614:5: ACTION_STRING_LITERAL { - /* 613:5: ACTION_STRING_LITERAL */ + /* 614:5: ACTION_STRING_LITERAL */ mACTION_STRING_LITERAL(ctx ); if (HASEXCEPTION()) { @@ -60588,9 +60588,9 @@ } break; case 5: - // ./ANTLRv3.g:614:5: ACTION_CHAR_LITERAL + // ANTLRv3.g:615:5: ACTION_CHAR_LITERAL { - /* 614:5: ACTION_CHAR_LITERAL */ + /* 615:5: ACTION_CHAR_LITERAL */ mACTION_CHAR_LITERAL(ctx ); if (HASEXCEPTION()) { @@ -60602,7 +60602,7 @@ } break; case 6: - // ./ANTLRv3.g:615:5: . + // ANTLRv3.g:616:5: . { MATCHANY(); if (HASEXCEPTION()) @@ -60645,7 +60645,7 @@ } // $ANTLR end NESTED_ACTION -// Comes from: 623:2: ( '\\'' ( ACTION_ESC |~ ( '\\\\' | '\\'' ) ) '\\'' ) +// Comes from: 624:2: ( '\\'' ( ACTION_ESC |~ ( '\\\\' | '\\'' ) ) '\\'' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start ACTION_CHAR_LITERAL @@ -60663,8 +60663,8 @@ ANTLR3_UINT32 _type; - // ./ANTLRv3.g:623:2: ( '\\'' ( ACTION_ESC |~ ( '\\\\' | '\\'' ) ) '\\'' ) - // ./ANTLRv3.g:623:4: '\\'' ( ACTION_ESC |~ ( '\\\\' | '\\'' ) ) '\\'' + // ANTLRv3.g:624:2: ( '\\'' ( ACTION_ESC |~ ( '\\\\' | '\\'' ) ) '\\'' ) + // ANTLRv3.g:624:4: '\\'' ( ACTION_ESC |~ ( '\\\\' | '\\'' ) ) '\\'' { MATCHC('\''); if (HASEXCEPTION()) @@ -60673,7 +60673,7 @@ } - // ./ANTLRv3.g:623:9: ( ACTION_ESC |~ ( '\\\\' | '\\'' ) ) + // ANTLRv3.g:624:9: ( ACTION_ESC |~ ( '\\\\' | '\\'' ) ) { int alt14=2; { @@ -60703,9 +60703,9 @@ switch (alt14) { case 1: - // ./ANTLRv3.g:623:10: ACTION_ESC + // ANTLRv3.g:624:10: ACTION_ESC { - /* 623:10: ACTION_ESC */ + /* 624:10: ACTION_ESC */ mACTION_ESC(ctx ); if (HASEXCEPTION()) { @@ -60717,7 +60717,7 @@ } break; case 2: - // ./ANTLRv3.g:623:21: ~ ( '\\\\' | '\\'' ) + // ANTLRv3.g:624:21: ~ ( '\\\\' | '\\'' ) { if ( ((LA(1) >= 0x0000) && (LA(1) <= '&')) || ((LA(1) >= '(') && (LA(1) <= '[')) || ((LA(1) >= ']') && (LA(1) <= 0xFFFF)) ) { @@ -60758,7 +60758,7 @@ } // $ANTLR end ACTION_CHAR_LITERAL -// Comes from: 628:2: ( '\"' ( ACTION_ESC |~ ( '\\\\' | '\"' ) )* '\"' ) +// Comes from: 629:2: ( '\"' ( ACTION_ESC |~ ( '\\\\' | '\"' ) )* '\"' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start ACTION_STRING_LITERAL @@ -60776,8 +60776,8 @@ ANTLR3_UINT32 _type; - // ./ANTLRv3.g:628:2: ( '\"' ( ACTION_ESC |~ ( '\\\\' | '\"' ) )* '\"' ) - // ./ANTLRv3.g:628:4: '\"' ( ACTION_ESC |~ ( '\\\\' | '\"' ) )* '\"' + // ANTLRv3.g:629:2: ( '\"' ( ACTION_ESC |~ ( '\\\\' | '\"' ) )* '\"' ) + // ANTLRv3.g:629:4: '\"' ( ACTION_ESC |~ ( '\\\\' | '\"' ) )* '\"' { MATCHC('"'); if (HASEXCEPTION()) @@ -60786,7 +60786,7 @@ } - // ./ANTLRv3.g:628:8: ( ACTION_ESC |~ ( '\\\\' | '\"' ) )* + // ANTLRv3.g:629:8: ( ACTION_ESC |~ ( '\\\\' | '\"' ) )* for (;;) { @@ -60808,9 +60808,9 @@ switch (alt15) { case 1: - // ./ANTLRv3.g:628:9: ACTION_ESC + // ANTLRv3.g:629:9: ACTION_ESC { - /* 628:9: ACTION_ESC */ + /* 629:9: ACTION_ESC */ mACTION_ESC(ctx ); if (HASEXCEPTION()) { @@ -60822,7 +60822,7 @@ } break; case 2: - // ./ANTLRv3.g:628:20: ~ ( '\\\\' | '\"' ) + // ANTLRv3.g:629:20: ~ ( '\\\\' | '\"' ) { if ( ((LA(1) >= 0x0000) && (LA(1) <= '!')) || ((LA(1) >= '#') && (LA(1) <= '[')) || ((LA(1) >= ']') && (LA(1) <= 0xFFFF)) ) { @@ -60868,7 +60868,7 @@ } // $ANTLR end ACTION_STRING_LITERAL -// Comes from: 633:2: ( '\\\\\\'' | '\\\\' '\"' | '\\\\' ~ ( '\\'' | '\"' ) ) +// Comes from: 634:2: ( '\\\\\\'' | '\\\\' '\"' | '\\\\' ~ ( '\\'' | '\"' ) ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start ACTION_ESC @@ -60887,7 +60887,7 @@ { - // ./ANTLRv3.g:633:2: ( '\\\\\\'' | '\\\\' '\"' | '\\\\' ~ ( '\\'' | '\"' ) ) + // ANTLRv3.g:634:2: ( '\\\\\\'' | '\\\\' '\"' | '\\\\' ~ ( '\\'' | '\"' ) ) ANTLR3_UINT32 alt16; @@ -60943,7 +60943,7 @@ switch (alt16) { case 1: - // ./ANTLRv3.g:633:4: '\\\\\\'' + // ANTLRv3.g:634:4: '\\\\\\'' { MATCHS(lit_29); if (HASEXCEPTION()) @@ -60957,7 +60957,7 @@ } break; case 2: - // ./ANTLRv3.g:634:4: '\\\\' '\"' + // ANTLRv3.g:635:4: '\\\\' '\"' { MATCHC('\\'); if (HASEXCEPTION()) @@ -60976,7 +60976,7 @@ } break; case 3: - // ./ANTLRv3.g:635:4: '\\\\' ~ ( '\\'' | '\"' ) + // ANTLRv3.g:636:4: '\\\\' ~ ( '\\'' | '\"' ) { MATCHC('\\'); if (HASEXCEPTION()) @@ -61014,7 +61014,7 @@ } // $ANTLR end ACTION_ESC -// Comes from: 644:2: ( OPTIONS_SYM WS_LOOP '{' ) +// Comes from: 645:2: ( OPTIONS_SYM WS_LOOP '{' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start OPTIONS @@ -61034,10 +61034,10 @@ _type = OPTIONS; - // ./ANTLRv3.g:644:2: ( OPTIONS_SYM WS_LOOP '{' ) - // ./ANTLRv3.g:644:4: OPTIONS_SYM WS_LOOP '{' + // ANTLRv3.g:645:2: ( OPTIONS_SYM WS_LOOP '{' ) + // ANTLRv3.g:645:4: OPTIONS_SYM WS_LOOP '{' { - /* 644:4: OPTIONS_SYM WS_LOOP '{' */ + /* 645:4: OPTIONS_SYM WS_LOOP '{' */ mOPTIONS_SYM(ctx ); if (HASEXCEPTION()) { @@ -61046,7 +61046,7 @@ - /* 644:4: OPTIONS_SYM WS_LOOP '{' */ + /* 645:4: OPTIONS_SYM WS_LOOP '{' */ mWS_LOOP(ctx ); if (HASEXCEPTION()) { @@ -61073,7 +61073,7 @@ } // $ANTLR end OPTIONS -// Comes from: 645:2: ( TOKENS_SYM WS_LOOP '{' ) +// Comes from: 646:2: ( TOKENS_SYM WS_LOOP '{' ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start TOKENS @@ -61093,10 +61093,10 @@ _type = TOKENS; - // ./ANTLRv3.g:645:2: ( TOKENS_SYM WS_LOOP '{' ) - // ./ANTLRv3.g:645:4: TOKENS_SYM WS_LOOP '{' + // ANTLRv3.g:646:2: ( TOKENS_SYM WS_LOOP '{' ) + // ANTLRv3.g:646:4: TOKENS_SYM WS_LOOP '{' { - /* 645:4: TOKENS_SYM WS_LOOP '{' */ + /* 646:4: TOKENS_SYM WS_LOOP '{' */ mTOKENS_SYM(ctx ); if (HASEXCEPTION()) { @@ -61105,7 +61105,7 @@ - /* 645:4: TOKENS_SYM WS_LOOP '{' */ + /* 646:4: TOKENS_SYM WS_LOOP '{' */ mWS_LOOP(ctx ); if (HASEXCEPTION()) { @@ -61132,7 +61132,7 @@ } // $ANTLR end TOKENS -// Comes from: 658:5: ( SRC_SYM ' ' file= ACTION_STRING_LITERAL ' ' line= INT ) +// Comes from: 659:5: ( SRC_SYM ' ' file= ACTION_STRING_LITERAL ' ' line= INT ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start SRC @@ -61156,10 +61156,10 @@ line = NULL; - // ./ANTLRv3.g:658:5: ( SRC_SYM ' ' file= ACTION_STRING_LITERAL ' ' line= INT ) - // ./ANTLRv3.g:658:7: SRC_SYM ' ' file= ACTION_STRING_LITERAL ' ' line= INT + // ANTLRv3.g:659:5: ( SRC_SYM ' ' file= ACTION_STRING_LITERAL ' ' line= INT ) + // ANTLRv3.g:659:7: SRC_SYM ' ' file= ACTION_STRING_LITERAL ' ' line= INT { - /* 658:7: SRC_SYM ' ' file= ACTION_STRING_LITERAL ' ' line= INT */ + /* 659:7: SRC_SYM ' ' file= ACTION_STRING_LITERAL ' ' line= INT */ mSRC_SYM(ctx ); if (HASEXCEPTION()) { @@ -61175,9 +61175,9 @@ } - /* 658:7: SRC_SYM ' ' file= ACTION_STRING_LITERAL ' ' line= INT */ + /* 659:7: SRC_SYM ' ' file= ACTION_STRING_LITERAL ' ' line= INT */ { - ANTLR3_MARKER fileStart926 = GETCHARINDEX(); + ANTLR3_MARKER fileStart924 = GETCHARINDEX(); mACTION_STRING_LITERAL(ctx ); if (HASEXCEPTION()) { @@ -61186,7 +61186,7 @@ file = LEXSTATE->tokFactory->newToken(LEXSTATE->tokFactory); file->setType(file, ANTLR3_TOKEN_INVALID); - file->setStartIndex(file, fileStart926); + file->setStartIndex(file, fileStart924); file->setStopIndex(file, GETCHARINDEX()-1); file->input = INPUT; } @@ -61199,9 +61199,9 @@ } - /* 658:7: SRC_SYM ' ' file= ACTION_STRING_LITERAL ' ' line= INT */ + /* 659:7: SRC_SYM ' ' file= ACTION_STRING_LITERAL ' ' line= INT */ { - ANTLR3_MARKER lineStart932 = GETCHARINDEX(); + ANTLR3_MARKER lineStart930 = GETCHARINDEX(); mINT(ctx ); if (HASEXCEPTION()) { @@ -61210,7 +61210,7 @@ line = LEXSTATE->tokFactory->newToken(LEXSTATE->tokFactory); line->setType(line, ANTLR3_TOKEN_INVALID); - line->setStartIndex(line, lineStart932); + line->setStartIndex(line, lineStart930); line->setStopIndex(line, GETCHARINDEX()-1); line->input = INPUT; } @@ -61230,7 +61230,7 @@ } // $ANTLR end SRC -// Comes from: 657:2: ( 'A' .. 'Z' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) +// Comes from: 658:2: ( 'A' .. 'Z' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start TOKEN_REF @@ -61250,8 +61250,8 @@ _type = TOKEN_REF; - // ./ANTLRv3.g:657:2: ( 'A' .. 'Z' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) - // ./ANTLRv3.g:657:4: 'A' .. 'Z' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + // ANTLRv3.g:658:2: ( 'A' .. 'Z' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) + // ANTLRv3.g:658:4: 'A' .. 'Z' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* { MATCHRANGE('A', 'Z'); if (HASEXCEPTION()) @@ -61260,7 +61260,7 @@ } - // ./ANTLRv3.g:657:13: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + // ANTLRv3.g:658:13: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* for (;;) { @@ -61340,7 +61340,7 @@ switch (alt17) { case 1: - // ./ANTLRv3.g: + // ANTLRv3.g: { if ( ((LA(1) >= '0') && (LA(1) <= '9')) || ((LA(1) >= 'A') && (LA(1) <= 'Z')) || LA(1) == '_' || ((LA(1) >= 'a') && (LA(1) <= 'z')) ) { @@ -61379,7 +61379,7 @@ } // $ANTLR end TOKEN_REF -// Comes from: 661:2: ( 'a' .. 'z' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) +// Comes from: 662:2: ( 'a' .. 'z' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start RULE_REF @@ -61399,8 +61399,8 @@ _type = RULE_REF; - // ./ANTLRv3.g:661:2: ( 'a' .. 'z' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) - // ./ANTLRv3.g:661:4: 'a' .. 'z' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + // ANTLRv3.g:662:2: ( 'a' .. 'z' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) + // ANTLRv3.g:662:4: 'a' .. 'z' ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* { MATCHRANGE('a', 'z'); if (HASEXCEPTION()) @@ -61409,7 +61409,7 @@ } - // ./ANTLRv3.g:661:13: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* + // ANTLRv3.g:662:13: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* for (;;) { @@ -61489,7 +61489,7 @@ switch (alt18) { case 1: - // ./ANTLRv3.g: + // ANTLRv3.g: { if ( ((LA(1) >= '0') && (LA(1) <= '9')) || ((LA(1) >= 'A') && (LA(1) <= 'Z')) || LA(1) == '_' || ((LA(1) >= 'a') && (LA(1) <= 'z')) ) { @@ -61528,7 +61528,7 @@ } // $ANTLR end RULE_REF -// Comes from: 664:4: ( ( ' ' | '\\t' | ( '\\r' )? '\\n' )+ ) +// Comes from: 665:4: ( ( ' ' | '\\t' | ( '\\r' )? '\\n' )+ ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start WS @@ -61548,10 +61548,10 @@ _type = WS; - // ./ANTLRv3.g:664:4: ( ( ' ' | '\\t' | ( '\\r' )? '\\n' )+ ) - // ./ANTLRv3.g:664:6: ( ' ' | '\\t' | ( '\\r' )? '\\n' )+ + // ANTLRv3.g:665:4: ( ( ' ' | '\\t' | ( '\\r' )? '\\n' )+ ) + // ANTLRv3.g:665:6: ( ' ' | '\\t' | ( '\\r' )? '\\n' )+ { - // ./ANTLRv3.g:664:6: ( ' ' | '\\t' | ( '\\r' )? '\\n' )+ + // ANTLRv3.g:665:6: ( ' ' | '\\t' | ( '\\r' )? '\\n' )+ { int cnt20=0; @@ -61582,7 +61582,7 @@ switch (alt20) { case 1: - // ./ANTLRv3.g:664:8: ' ' + // ANTLRv3.g:665:8: ' ' { MATCHC(' '); if (HASEXCEPTION()) @@ -61594,7 +61594,7 @@ } break; case 2: - // ./ANTLRv3.g:665:5: '\\t' + // ANTLRv3.g:666:5: '\\t' { MATCHC('\t'); if (HASEXCEPTION()) @@ -61606,9 +61606,9 @@ } break; case 3: - // ./ANTLRv3.g:666:5: ( '\\r' )? '\\n' + // ANTLRv3.g:667:5: ( '\\r' )? '\\n' { - // ./ANTLRv3.g:666:5: ( '\\r' )? + // ANTLRv3.g:667:5: ( '\\r' )? { int alt19=2; switch ( LA(1) ) @@ -61623,7 +61623,7 @@ switch (alt19) { case 1: - // ./ANTLRv3.g:666:5: '\\r' + // ANTLRv3.g:667:5: '\\r' { MATCHC('\r'); if (HASEXCEPTION()) @@ -61684,7 +61684,7 @@ } // $ANTLR end WS -// Comes from: 675:17: ( ( WS | SL_COMMENT | ML_COMMENT )* ) +// Comes from: 676:17: ( ( WS | SL_COMMENT | ML_COMMENT )* ) /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start WS_LOOP @@ -61702,10 +61702,10 @@ ANTLR3_UINT32 _type; - // ./ANTLRv3.g:675:17: ( ( WS | SL_COMMENT | ML_COMMENT )* ) - // ./ANTLRv3.g:676:2: ( WS | SL_COMMENT | ML_COMMENT )* + // ANTLRv3.g:676:17: ( ( WS | SL_COMMENT | ML_COMMENT )* ) + // ANTLRv3.g:677:2: ( WS | SL_COMMENT | ML_COMMENT )* { - // ./ANTLRv3.g:676:2: ( WS | SL_COMMENT | ML_COMMENT )* + // ANTLRv3.g:677:2: ( WS | SL_COMMENT | ML_COMMENT )* for (;;) { @@ -61745,9 +61745,9 @@ switch (alt21) { case 1: - // ./ANTLRv3.g:677:3: WS + // ANTLRv3.g:678:3: WS { - /* 677:3: WS */ + /* 678:3: WS */ mWS(ctx ); if (HASEXCEPTION()) { @@ -61759,9 +61759,9 @@ } break; case 2: - // ./ANTLRv3.g:678:5: SL_COMMENT + // ANTLRv3.g:679:5: SL_COMMENT { - /* 678:5: SL_COMMENT */ + /* 679:5: SL_COMMENT */ mSL_COMMENT(ctx ); if (HASEXCEPTION()) { @@ -61773,9 +61773,9 @@ } break; case 3: - // ./ANTLRv3.g:679:5: ML_COMMENT + // ANTLRv3.g:680:5: ML_COMMENT { - /* 679:5: ML_COMMENT */ + /* 680:5: ML_COMMENT */ mML_COMMENT(ctx ); if (HASEXCEPTION()) { @@ -61811,7 +61811,7 @@ } // $ANTLR end WS_LOOP -// Comes from: 684:27: () +// Comes from: 685:27: () /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start DOC_COMMENT_V3TOK @@ -61829,8 +61829,8 @@ ANTLR3_UINT32 _type; - // ./ANTLRv3.g:684:27: () - // ./ANTLRv3.g:684:29: + // ANTLRv3.g:685:27: () + // ANTLRv3.g:685:29: { } @@ -61843,7 +61843,7 @@ } // $ANTLR end DOC_COMMENT_V3TOK -// Comes from: 685:23: () +// Comes from: 686:23: () /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start SEMPRED_V3TOK @@ -61861,8 +61861,8 @@ ANTLR3_UINT32 _type; - // ./ANTLRv3.g:685:23: () - // ./ANTLRv3.g:685:25: + // ANTLRv3.g:686:23: () + // ANTLRv3.g:686:25: { } @@ -61875,7 +61875,7 @@ } // $ANTLR end SEMPRED_V3TOK -// Comes from: 686:29: () +// Comes from: 687:29: () /** \brief Lexer rule generated by ANTLR3 * * $ANTLR start GATED_SEMPRED_V3TOK @@ -61893,8 +61893,8 @@ ANTLR3_UINT32 _type; - // ./ANTLRv3.g:686:29: () - // ./ANTLRv3.g:686:31: + // ANTLRv3.g:687:29: () + // ANTLRv3.g:687:31: { } @@ -61914,7 +61914,7 @@ mTokens(pANTLRv3Lexer ctx) { { - // ./ANTLRv3.g:1:8: ( AT_V3TOK | BANG_V3TOK | FRAGMENT_V3TOK | LABEL_ASSIGN_V3TOK | LIST_LABEL_ASSIGN_V3TOK | RANGE_V3TOK | RET_V3TOK | REWRITE_V3TOK | ROOT_V3TOK | SCOPE_V3TOK | TREE_BEGIN_V3TOK | T__72 | T__73 | T__74 | T__75 | T__76 | T__77 | T__78 | T__79 | T__80 | T__81 | T__82 | T__83 | T__84 | T__85 | T__86 | T__87 | T__88 | T__89 | T__90 | T__91 | T__92 | T__93 | T__94 | T__95 | T__96 | OPTIONS_SYM | TOKENS_SYM | SRC_SYM | FINALLY_SYM | CATCH_SYM | SL_COMMENT | ML_COMMENT | CHAR_LITERAL | STRING_LITERAL | DOUBLE_QUOTE_STRING_LITERAL | DOUBLE_ANGLE_STRING_LITERAL | INT | ARG_ACTION | ACTION | OPTIONS | TOKENS | TOKEN_REF | RULE_REF | WS ) + // ANTLRv3.g:1:8: ( AT_V3TOK | BANG_V3TOK | FRAGMENT_V3TOK | LABEL_ASSIGN_V3TOK | LIST_LABEL_ASSIGN_V3TOK | RANGE_V3TOK | RET_V3TOK | REWRITE_V3TOK | ROOT_V3TOK | SCOPE_V3TOK | TREE_BEGIN_V3TOK | T__73 | T__74 | T__75 | T__76 | T__77 | T__78 | T__79 | T__80 | T__81 | T__82 | T__83 | T__84 | T__85 | T__86 | T__87 | T__88 | T__89 | T__90 | T__91 | T__92 | T__93 | T__94 | T__95 | T__96 | DOT_SYM | OPTIONS_SYM | TOKENS_SYM | SRC_SYM | FINALLY_SYM | CATCH_SYM | SL_COMMENT | ML_COMMENT | CHAR_LITERAL | STRING_LITERAL | DOUBLE_QUOTE_STRING_LITERAL | DOUBLE_ANGLE_STRING_LITERAL | INT | ARG_ACTION | ACTION | OPTIONS | TOKENS | TOKEN_REF | RULE_REF | WS ) ANTLR3_UINT32 alt22; @@ -62226,7 +62226,7 @@ { case '>': { - alt22=23; + alt22=22; } break; @@ -62263,7 +62263,7 @@ break; default: - alt22=18; + alt22=36; } } @@ -62675,19 +62675,19 @@ { case ':': { - alt22=20; + alt22=19; } break; default: - alt22=19; + alt22=18; } } break; case ';': { - alt22=21; + alt22=20; } break; case '<': @@ -62701,19 +62701,19 @@ break; default: - alt22=22; + alt22=21; } } break; case '>': { - alt22=24; + alt22=23; } break; case '?': { - alt22=25; + alt22=24; } break; case 'g': @@ -62813,7 +62813,7 @@ break; default: - alt22=26; + alt22=25; } } @@ -62949,7 +62949,7 @@ break; default: - alt22=27; + alt22=26; } } @@ -63075,7 +63075,7 @@ break; default: - alt22=28; + alt22=27; } } @@ -63201,7 +63201,7 @@ break; default: - alt22=29; + alt22=28; } } @@ -63331,7 +63331,7 @@ break; default: - alt22=30; + alt22=29; } } @@ -63474,7 +63474,7 @@ break; default: - alt22=31; + alt22=30; } } @@ -63607,7 +63607,7 @@ break; default: - alt22=32; + alt22=31; } } @@ -63721,7 +63721,7 @@ break; default: - alt22=33; + alt22=32; } } @@ -63881,17 +63881,17 @@ break; case '|': { - alt22=34; + alt22=33; } break; case '}': { - alt22=35; + alt22=34; } break; case '~': { - alt22=36; + alt22=35; } break; case 'o': @@ -64762,7 +64762,7 @@ switch (alt22) { case 1: - // ./ANTLRv3.g:1:10: AT_V3TOK + // ANTLRv3.g:1:10: AT_V3TOK { /* 1:10: AT_V3TOK */ mAT_V3TOK(ctx ); @@ -64776,7 +64776,7 @@ } break; case 2: - // ./ANTLRv3.g:1:19: BANG_V3TOK + // ANTLRv3.g:1:19: BANG_V3TOK { /* 1:19: BANG_V3TOK */ mBANG_V3TOK(ctx ); @@ -64790,7 +64790,7 @@ } break; case 3: - // ./ANTLRv3.g:1:30: FRAGMENT_V3TOK + // ANTLRv3.g:1:30: FRAGMENT_V3TOK { /* 1:30: FRAGMENT_V3TOK */ mFRAGMENT_V3TOK(ctx ); @@ -64804,7 +64804,7 @@ } break; case 4: - // ./ANTLRv3.g:1:45: LABEL_ASSIGN_V3TOK + // ANTLRv3.g:1:45: LABEL_ASSIGN_V3TOK { /* 1:45: LABEL_ASSIGN_V3TOK */ mLABEL_ASSIGN_V3TOK(ctx ); @@ -64818,7 +64818,7 @@ } break; case 5: - // ./ANTLRv3.g:1:64: LIST_LABEL_ASSIGN_V3TOK + // ANTLRv3.g:1:64: LIST_LABEL_ASSIGN_V3TOK { /* 1:64: LIST_LABEL_ASSIGN_V3TOK */ mLIST_LABEL_ASSIGN_V3TOK(ctx ); @@ -64832,7 +64832,7 @@ } break; case 6: - // ./ANTLRv3.g:1:88: RANGE_V3TOK + // ANTLRv3.g:1:88: RANGE_V3TOK { /* 1:88: RANGE_V3TOK */ mRANGE_V3TOK(ctx ); @@ -64846,7 +64846,7 @@ } break; case 7: - // ./ANTLRv3.g:1:100: RET_V3TOK + // ANTLRv3.g:1:100: RET_V3TOK { /* 1:100: RET_V3TOK */ mRET_V3TOK(ctx ); @@ -64860,7 +64860,7 @@ } break; case 8: - // ./ANTLRv3.g:1:110: REWRITE_V3TOK + // ANTLRv3.g:1:110: REWRITE_V3TOK { /* 1:110: REWRITE_V3TOK */ mREWRITE_V3TOK(ctx ); @@ -64874,7 +64874,7 @@ } break; case 9: - // ./ANTLRv3.g:1:124: ROOT_V3TOK + // ANTLRv3.g:1:124: ROOT_V3TOK { /* 1:124: ROOT_V3TOK */ mROOT_V3TOK(ctx ); @@ -64888,7 +64888,7 @@ } break; case 10: - // ./ANTLRv3.g:1:135: SCOPE_V3TOK + // ANTLRv3.g:1:135: SCOPE_V3TOK { /* 1:135: SCOPE_V3TOK */ mSCOPE_V3TOK(ctx ); @@ -64902,7 +64902,7 @@ } break; case 11: - // ./ANTLRv3.g:1:147: TREE_BEGIN_V3TOK + // ANTLRv3.g:1:147: TREE_BEGIN_V3TOK { /* 1:147: TREE_BEGIN_V3TOK */ mTREE_BEGIN_V3TOK(ctx ); @@ -64916,10 +64916,10 @@ } break; case 12: - // ./ANTLRv3.g:1:164: T__72 + // ANTLRv3.g:1:164: T__73 { - /* 1:164: T__72 */ - mT__72(ctx ); + /* 1:164: T__73 */ + mT__73(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -64930,10 +64930,10 @@ } break; case 13: - // ./ANTLRv3.g:1:170: T__73 + // ANTLRv3.g:1:170: T__74 { - /* 1:170: T__73 */ - mT__73(ctx ); + /* 1:170: T__74 */ + mT__74(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -64944,10 +64944,10 @@ } break; case 14: - // ./ANTLRv3.g:1:176: T__74 + // ANTLRv3.g:1:176: T__75 { - /* 1:176: T__74 */ - mT__74(ctx ); + /* 1:176: T__75 */ + mT__75(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -64958,10 +64958,10 @@ } break; case 15: - // ./ANTLRv3.g:1:182: T__75 + // ANTLRv3.g:1:182: T__76 { - /* 1:182: T__75 */ - mT__75(ctx ); + /* 1:182: T__76 */ + mT__76(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -64972,10 +64972,10 @@ } break; case 16: - // ./ANTLRv3.g:1:188: T__76 + // ANTLRv3.g:1:188: T__77 { - /* 1:188: T__76 */ - mT__76(ctx ); + /* 1:188: T__77 */ + mT__77(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -64986,10 +64986,10 @@ } break; case 17: - // ./ANTLRv3.g:1:194: T__77 + // ANTLRv3.g:1:194: T__78 { - /* 1:194: T__77 */ - mT__77(ctx ); + /* 1:194: T__78 */ + mT__78(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65000,10 +65000,10 @@ } break; case 18: - // ./ANTLRv3.g:1:200: T__78 + // ANTLRv3.g:1:200: T__79 { - /* 1:200: T__78 */ - mT__78(ctx ); + /* 1:200: T__79 */ + mT__79(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65014,10 +65014,10 @@ } break; case 19: - // ./ANTLRv3.g:1:206: T__79 + // ANTLRv3.g:1:206: T__80 { - /* 1:206: T__79 */ - mT__79(ctx ); + /* 1:206: T__80 */ + mT__80(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65028,10 +65028,10 @@ } break; case 20: - // ./ANTLRv3.g:1:212: T__80 + // ANTLRv3.g:1:212: T__81 { - /* 1:212: T__80 */ - mT__80(ctx ); + /* 1:212: T__81 */ + mT__81(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65042,10 +65042,10 @@ } break; case 21: - // ./ANTLRv3.g:1:218: T__81 + // ANTLRv3.g:1:218: T__82 { - /* 1:218: T__81 */ - mT__81(ctx ); + /* 1:218: T__82 */ + mT__82(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65056,10 +65056,10 @@ } break; case 22: - // ./ANTLRv3.g:1:224: T__82 + // ANTLRv3.g:1:224: T__83 { - /* 1:224: T__82 */ - mT__82(ctx ); + /* 1:224: T__83 */ + mT__83(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65070,10 +65070,10 @@ } break; case 23: - // ./ANTLRv3.g:1:230: T__83 + // ANTLRv3.g:1:230: T__84 { - /* 1:230: T__83 */ - mT__83(ctx ); + /* 1:230: T__84 */ + mT__84(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65084,10 +65084,10 @@ } break; case 24: - // ./ANTLRv3.g:1:236: T__84 + // ANTLRv3.g:1:236: T__85 { - /* 1:236: T__84 */ - mT__84(ctx ); + /* 1:236: T__85 */ + mT__85(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65098,10 +65098,10 @@ } break; case 25: - // ./ANTLRv3.g:1:242: T__85 + // ANTLRv3.g:1:242: T__86 { - /* 1:242: T__85 */ - mT__85(ctx ); + /* 1:242: T__86 */ + mT__86(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65112,10 +65112,10 @@ } break; case 26: - // ./ANTLRv3.g:1:248: T__86 + // ANTLRv3.g:1:248: T__87 { - /* 1:248: T__86 */ - mT__86(ctx ); + /* 1:248: T__87 */ + mT__87(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65126,10 +65126,10 @@ } break; case 27: - // ./ANTLRv3.g:1:254: T__87 + // ANTLRv3.g:1:254: T__88 { - /* 1:254: T__87 */ - mT__87(ctx ); + /* 1:254: T__88 */ + mT__88(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65140,10 +65140,10 @@ } break; case 28: - // ./ANTLRv3.g:1:260: T__88 + // ANTLRv3.g:1:260: T__89 { - /* 1:260: T__88 */ - mT__88(ctx ); + /* 1:260: T__89 */ + mT__89(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65154,10 +65154,10 @@ } break; case 29: - // ./ANTLRv3.g:1:266: T__89 + // ANTLRv3.g:1:266: T__90 { - /* 1:266: T__89 */ - mT__89(ctx ); + /* 1:266: T__90 */ + mT__90(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65168,10 +65168,10 @@ } break; case 30: - // ./ANTLRv3.g:1:272: T__90 + // ANTLRv3.g:1:272: T__91 { - /* 1:272: T__90 */ - mT__90(ctx ); + /* 1:272: T__91 */ + mT__91(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65182,10 +65182,10 @@ } break; case 31: - // ./ANTLRv3.g:1:278: T__91 + // ANTLRv3.g:1:278: T__92 { - /* 1:278: T__91 */ - mT__91(ctx ); + /* 1:278: T__92 */ + mT__92(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65196,10 +65196,10 @@ } break; case 32: - // ./ANTLRv3.g:1:284: T__92 + // ANTLRv3.g:1:284: T__93 { - /* 1:284: T__92 */ - mT__92(ctx ); + /* 1:284: T__93 */ + mT__93(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65210,10 +65210,10 @@ } break; case 33: - // ./ANTLRv3.g:1:290: T__93 + // ANTLRv3.g:1:290: T__94 { - /* 1:290: T__93 */ - mT__93(ctx ); + /* 1:290: T__94 */ + mT__94(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65224,10 +65224,10 @@ } break; case 34: - // ./ANTLRv3.g:1:296: T__94 + // ANTLRv3.g:1:296: T__95 { - /* 1:296: T__94 */ - mT__94(ctx ); + /* 1:296: T__95 */ + mT__95(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65238,10 +65238,10 @@ } break; case 35: - // ./ANTLRv3.g:1:302: T__95 + // ANTLRv3.g:1:302: T__96 { - /* 1:302: T__95 */ - mT__95(ctx ); + /* 1:302: T__96 */ + mT__96(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65252,10 +65252,10 @@ } break; case 36: - // ./ANTLRv3.g:1:308: T__96 + // ANTLRv3.g:1:308: DOT_SYM { - /* 1:308: T__96 */ - mT__96(ctx ); + /* 1:308: DOT_SYM */ + mDOT_SYM(ctx ); if (HASEXCEPTION()) { goto ruleTokensEx; @@ -65266,9 +65266,9 @@ } break; case 37: - // ./ANTLRv3.g:1:314: OPTIONS_SYM + // ANTLRv3.g:1:316: OPTIONS_SYM { - /* 1:314: OPTIONS_SYM */ + /* 1:316: OPTIONS_SYM */ mOPTIONS_SYM(ctx ); if (HASEXCEPTION()) { @@ -65280,9 +65280,9 @@ } break; case 38: - // ./ANTLRv3.g:1:326: TOKENS_SYM + // ANTLRv3.g:1:328: TOKENS_SYM { - /* 1:326: TOKENS_SYM */ + /* 1:328: TOKENS_SYM */ mTOKENS_SYM(ctx ); if (HASEXCEPTION()) { @@ -65294,9 +65294,9 @@ } break; case 39: - // ./ANTLRv3.g:1:337: SRC_SYM + // ANTLRv3.g:1:339: SRC_SYM { - /* 1:337: SRC_SYM */ + /* 1:339: SRC_SYM */ mSRC_SYM(ctx ); if (HASEXCEPTION()) { @@ -65308,9 +65308,9 @@ } break; case 40: - // ./ANTLRv3.g:1:345: FINALLY_SYM + // ANTLRv3.g:1:347: FINALLY_SYM { - /* 1:345: FINALLY_SYM */ + /* 1:347: FINALLY_SYM */ mFINALLY_SYM(ctx ); if (HASEXCEPTION()) { @@ -65322,9 +65322,9 @@ } break; case 41: - // ./ANTLRv3.g:1:357: CATCH_SYM + // ANTLRv3.g:1:359: CATCH_SYM { - /* 1:357: CATCH_SYM */ + /* 1:359: CATCH_SYM */ mCATCH_SYM(ctx ); if (HASEXCEPTION()) { @@ -65336,9 +65336,9 @@ } break; case 42: - // ./ANTLRv3.g:1:367: SL_COMMENT + // ANTLRv3.g:1:369: SL_COMMENT { - /* 1:367: SL_COMMENT */ + /* 1:369: SL_COMMENT */ mSL_COMMENT(ctx ); if (HASEXCEPTION()) { @@ -65350,9 +65350,9 @@ } break; case 43: - // ./ANTLRv3.g:1:378: ML_COMMENT + // ANTLRv3.g:1:380: ML_COMMENT { - /* 1:378: ML_COMMENT */ + /* 1:380: ML_COMMENT */ mML_COMMENT(ctx ); if (HASEXCEPTION()) { @@ -65364,9 +65364,9 @@ } break; case 44: - // ./ANTLRv3.g:1:389: CHAR_LITERAL + // ANTLRv3.g:1:391: CHAR_LITERAL { - /* 1:389: CHAR_LITERAL */ + /* 1:391: CHAR_LITERAL */ mCHAR_LITERAL(ctx ); if (HASEXCEPTION()) { @@ -65378,9 +65378,9 @@ } break; case 45: - // ./ANTLRv3.g:1:402: STRING_LITERAL + // ANTLRv3.g:1:404: STRING_LITERAL { - /* 1:402: STRING_LITERAL */ + /* 1:404: STRING_LITERAL */ mSTRING_LITERAL(ctx ); if (HASEXCEPTION()) { @@ -65392,9 +65392,9 @@ } break; case 46: - // ./ANTLRv3.g:1:417: DOUBLE_QUOTE_STRING_LITERAL + // ANTLRv3.g:1:419: DOUBLE_QUOTE_STRING_LITERAL { - /* 1:417: DOUBLE_QUOTE_STRING_LITERAL */ + /* 1:419: DOUBLE_QUOTE_STRING_LITERAL */ mDOUBLE_QUOTE_STRING_LITERAL(ctx ); if (HASEXCEPTION()) { @@ -65406,9 +65406,9 @@ } break; case 47: - // ./ANTLRv3.g:1:445: DOUBLE_ANGLE_STRING_LITERAL + // ANTLRv3.g:1:447: DOUBLE_ANGLE_STRING_LITERAL { - /* 1:445: DOUBLE_ANGLE_STRING_LITERAL */ + /* 1:447: DOUBLE_ANGLE_STRING_LITERAL */ mDOUBLE_ANGLE_STRING_LITERAL(ctx ); if (HASEXCEPTION()) { @@ -65420,9 +65420,9 @@ } break; case 48: - // ./ANTLRv3.g:1:473: INT + // ANTLRv3.g:1:475: INT { - /* 1:473: INT */ + /* 1:475: INT */ mINT(ctx ); if (HASEXCEPTION()) { @@ -65434,9 +65434,9 @@ } break; case 49: - // ./ANTLRv3.g:1:477: ARG_ACTION + // ANTLRv3.g:1:479: ARG_ACTION { - /* 1:477: ARG_ACTION */ + /* 1:479: ARG_ACTION */ mARG_ACTION(ctx ); if (HASEXCEPTION()) { @@ -65448,9 +65448,9 @@ } break; case 50: - // ./ANTLRv3.g:1:488: ACTION + // ANTLRv3.g:1:490: ACTION { - /* 1:488: ACTION */ + /* 1:490: ACTION */ mACTION(ctx ); if (HASEXCEPTION()) { @@ -65462,9 +65462,9 @@ } break; case 51: - // ./ANTLRv3.g:1:495: OPTIONS + // ANTLRv3.g:1:497: OPTIONS { - /* 1:495: OPTIONS */ + /* 1:497: OPTIONS */ mOPTIONS(ctx ); if (HASEXCEPTION()) { @@ -65476,9 +65476,9 @@ } break; case 52: - // ./ANTLRv3.g:1:503: TOKENS + // ANTLRv3.g:1:505: TOKENS { - /* 1:503: TOKENS */ + /* 1:505: TOKENS */ mTOKENS(ctx ); if (HASEXCEPTION()) { @@ -65490,9 +65490,9 @@ } break; case 53: - // ./ANTLRv3.g:1:510: TOKEN_REF + // ANTLRv3.g:1:512: TOKEN_REF { - /* 1:510: TOKEN_REF */ + /* 1:512: TOKEN_REF */ mTOKEN_REF(ctx ); if (HASEXCEPTION()) { @@ -65504,9 +65504,9 @@ } break; case 54: - // ./ANTLRv3.g:1:520: RULE_REF + // ANTLRv3.g:1:522: RULE_REF { - /* 1:520: RULE_REF */ + /* 1:522: RULE_REF */ mRULE_REF(ctx ); if (HASEXCEPTION()) { @@ -65518,9 +65518,9 @@ } break; case 55: - // ./ANTLRv3.g:1:529: WS + // ANTLRv3.g:1:531: WS { - /* 1:529: WS */ + /* 1:531: WS */ mWS(ctx ); if (HASEXCEPTION()) { diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Lexer.h mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Lexer.h --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Lexer.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Lexer.h 2016-10-14 12:12:04.000000000 +0000 @@ -1,8 +1,8 @@ /** \file * This C header file was generated by $ANTLR version 3.4 * - * - From the grammar source file : ./ANTLRv3.g - * - On : 2014-09-24 15:09:46 + * - From the grammar source file : ANTLRv3.g + * - On : 2016-01-26 14:40:45 * - for the lexer : ANTLRv3LexerLexer * * Editing it, at least manually, is not wise. @@ -66,9 +66,6 @@ pANTLRv3Lexer->TREE_BEGIN_V3TOK(pANTLRv3Lexer) * - void - pANTLRv3Lexer->T__72(pANTLRv3Lexer) - * - - void pANTLRv3Lexer->T__73(pANTLRv3Lexer) * - void @@ -141,6 +138,9 @@ pANTLRv3Lexer->T__96(pANTLRv3Lexer) * - void + pANTLRv3Lexer->DOT_SYM(pANTLRv3Lexer) + * - + void pANTLRv3Lexer->OPTIONS_SYM(pANTLRv3Lexer) * - void @@ -378,9 +378,6 @@ (*mTREE_BEGIN_V3TOK) (struct ANTLRv3Lexer_Ctx_struct * ctx); void - (*mT__72) (struct ANTLRv3Lexer_Ctx_struct * ctx); - - void (*mT__73) (struct ANTLRv3Lexer_Ctx_struct * ctx); void @@ -453,6 +450,9 @@ (*mT__96) (struct ANTLRv3Lexer_Ctx_struct * ctx); void + (*mDOT_SYM) (struct ANTLRv3Lexer_Ctx_struct * ctx); + + void (*mOPTIONS_SYM) (struct ANTLRv3Lexer_Ctx_struct * ctx); void @@ -582,7 +582,6 @@ #undef Tokens #endif #define EOF -1 -#define T__72 72 #define T__73 73 #define T__74 74 #define T__75 75 @@ -625,56 +624,57 @@ #define CLOSURE_V3TOK 19 #define COMBINED_GRAMMAR_V3TOK 20 #define DOC_COMMENT_V3TOK 21 -#define DOUBLE_ANGLE_STRING_LITERAL 22 -#define DOUBLE_QUOTE_STRING_LITERAL 23 -#define EOA_V3TOK 24 -#define EOB_V3TOK 25 -#define EOR_V3TOK 26 -#define EPSILON_V3TOK 27 -#define ESC 28 -#define FINALLY_SYM 29 -#define FRAGMENT_V3TOK 30 -#define GATED_SEMPRED_V3TOK 31 -#define ID_V3TOK 32 -#define INT 33 -#define LABEL_ASSIGN_V3TOK 34 -#define LABEL_V3TOK 35 -#define LEXER_GRAMMAR_V3TOK 36 -#define LEXER_V3TOK 37 -#define LIST_LABEL_ASSIGN_V3TOK 38 -#define LITERAL_CHAR 39 -#define ML_COMMENT 40 -#define NESTED_ACTION 41 -#define NESTED_ARG_ACTION 42 -#define OPTIONAL_V3TOK 43 -#define OPTIONS 44 -#define OPTIONS_SYM 45 -#define PARSER_GRAMMAR_V3TOK 46 -#define PARSER_V3TOK 47 -#define POSITIVE_CLOSURE_V3TOK 48 -#define RANGE_V3TOK 49 -#define RET_V3TOK 50 -#define REWRITE_V3TOK 51 -#define ROOT_V3TOK 52 -#define RULE_REF 53 -#define RULE_V3TOK 54 -#define SCOPE_V3TOK 55 -#define SEMPRED_V3TOK 56 -#define SL_COMMENT 57 -#define SRC 58 -#define SRC_SYM 59 -#define STRING_LITERAL 60 -#define SYNPRED_V3TOK 61 -#define SYN_SEMPRED_V3TOK 62 -#define TEMPLATE_V3TOK 63 -#define TOKENS 64 -#define TOKENS_SYM 65 -#define TOKEN_REF 66 -#define TREE_BEGIN_V3TOK 67 -#define TREE_GRAMMAR_V3TOK 68 -#define WS 69 -#define WS_LOOP 70 -#define XDIGIT 71 +#define DOT_SYM 22 +#define DOUBLE_ANGLE_STRING_LITERAL 23 +#define DOUBLE_QUOTE_STRING_LITERAL 24 +#define EOA_V3TOK 25 +#define EOB_V3TOK 26 +#define EOR_V3TOK 27 +#define EPSILON_V3TOK 28 +#define ESC 29 +#define FINALLY_SYM 30 +#define FRAGMENT_V3TOK 31 +#define GATED_SEMPRED_V3TOK 32 +#define ID_V3TOK 33 +#define INT 34 +#define LABEL_ASSIGN_V3TOK 35 +#define LABEL_V3TOK 36 +#define LEXER_GRAMMAR_V3TOK 37 +#define LEXER_V3TOK 38 +#define LIST_LABEL_ASSIGN_V3TOK 39 +#define LITERAL_CHAR 40 +#define ML_COMMENT 41 +#define NESTED_ACTION 42 +#define NESTED_ARG_ACTION 43 +#define OPTIONAL_V3TOK 44 +#define OPTIONS 45 +#define OPTIONS_SYM 46 +#define PARSER_GRAMMAR_V3TOK 47 +#define PARSER_V3TOK 48 +#define POSITIVE_CLOSURE_V3TOK 49 +#define RANGE_V3TOK 50 +#define RET_V3TOK 51 +#define REWRITE_V3TOK 52 +#define ROOT_V3TOK 53 +#define RULE_REF 54 +#define RULE_V3TOK 55 +#define SCOPE_V3TOK 56 +#define SEMPRED_V3TOK 57 +#define SL_COMMENT 58 +#define SRC 59 +#define SRC_SYM 60 +#define STRING_LITERAL 61 +#define SYNPRED_V3TOK 62 +#define SYN_SEMPRED_V3TOK 63 +#define TEMPLATE_V3TOK 64 +#define TOKENS 65 +#define TOKENS_SYM 66 +#define TOKEN_REF 67 +#define TREE_BEGIN_V3TOK 68 +#define TREE_GRAMMAR_V3TOK 69 +#define WS 70 +#define WS_LOOP 71 +#define XDIGIT 72 #ifdef EOF #undef EOF #define EOF ANTLR3_TOKEN_EOF diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Parser.c mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Parser.c --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Parser.c 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Parser.c 2016-10-14 12:12:04.000000000 +0000 @@ -1,8 +1,8 @@ /** \file * This C source file was generated by $ANTLR version 3.4 * - * - From the grammar source file : ./ANTLRv3.g - * - On : 2014-09-24 15:09:46 + * - From the grammar source file : ANTLRv3.g + * - On : 2016-01-26 14:40:45 * - for the parser : ANTLRv3ParserParser * * Editing it, at least manually, is not wise. @@ -325,6 +325,7 @@ (pANTLR3_UINT8) "CLOSURE_V3TOK", (pANTLR3_UINT8) "COMBINED_GRAMMAR_V3TOK", (pANTLR3_UINT8) "DOC_COMMENT_V3TOK", + (pANTLR3_UINT8) "DOT_SYM", (pANTLR3_UINT8) "DOUBLE_ANGLE_STRING_LITERAL", (pANTLR3_UINT8) "DOUBLE_QUOTE_STRING_LITERAL", (pANTLR3_UINT8) "EOA_V3TOK", @@ -381,7 +382,6 @@ (pANTLR3_UINT8) "'*'", (pANTLR3_UINT8) "'+'", (pANTLR3_UINT8) "','", - (pANTLR3_UINT8) "'.'", (pANTLR3_UINT8) "':'", (pANTLR3_UINT8) "'::'", (pANTLR3_UINT8) "';'", @@ -590,7 +590,7 @@ /** \brief Name of the grammar file that generated this code */ -static const char fileName[] = "./ANTLRv3.g"; +static const char fileName[] = "ANTLRv3.g"; /** \brief Return the name of the grammar file that generated this code. */ @@ -792,46 +792,46 @@ static ANTLR3_BITWORD FOLLOW_93_in_grammarDef436_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000400000) }; static ANTLR3_BITSET_LIST FOLLOW_93_in_grammarDef436 = { FOLLOW_93_in_grammarDef436_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_86_in_grammarDef468 */ -static ANTLR3_BITWORD FOLLOW_86_in_grammarDef468_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_86_in_grammarDef468_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_86_in_grammarDef468 = { FOLLOW_86_in_grammarDef468_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_grammarDef470 */ static ANTLR3_BITWORD FOLLOW_id_in_grammarDef470_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000020000) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_grammarDef470 = { FOLLOW_id_in_grammarDef470_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_81_in_grammarDef472 */ -static ANTLR3_BITWORD FOLLOW_81_in_grammarDef472_bits[] = { ANTLR3_UINT64_LIT(0x00A0100040201000), ANTLR3_UINT64_LIT(0x000000000E000005) }; +static ANTLR3_BITWORD FOLLOW_81_in_grammarDef472_bits[] = { ANTLR3_UINT64_LIT(0x0140200080201000), ANTLR3_UINT64_LIT(0x000000000E00000A) }; static ANTLR3_BITSET_LIST FOLLOW_81_in_grammarDef472 = { FOLLOW_81_in_grammarDef472_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_optionsSpec_in_grammarDef474 */ -static ANTLR3_BITWORD FOLLOW_optionsSpec_in_grammarDef474_bits[] = { ANTLR3_UINT64_LIT(0x00A0000040201000), ANTLR3_UINT64_LIT(0x000000000E000005) }; +static ANTLR3_BITWORD FOLLOW_optionsSpec_in_grammarDef474_bits[] = { ANTLR3_UINT64_LIT(0x0140000080201000), ANTLR3_UINT64_LIT(0x000000000E00000A) }; static ANTLR3_BITSET_LIST FOLLOW_optionsSpec_in_grammarDef474 = { FOLLOW_optionsSpec_in_grammarDef474_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_tokensSpec_in_grammarDef477 */ -static ANTLR3_BITWORD FOLLOW_tokensSpec_in_grammarDef477_bits[] = { ANTLR3_UINT64_LIT(0x00A0000040201000), ANTLR3_UINT64_LIT(0x000000000E000004) }; +static ANTLR3_BITWORD FOLLOW_tokensSpec_in_grammarDef477_bits[] = { ANTLR3_UINT64_LIT(0x0140000080201000), ANTLR3_UINT64_LIT(0x000000000E000008) }; static ANTLR3_BITSET_LIST FOLLOW_tokensSpec_in_grammarDef477 = { FOLLOW_tokensSpec_in_grammarDef477_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_attrScope_in_grammarDef480 */ -static ANTLR3_BITWORD FOLLOW_attrScope_in_grammarDef480_bits[] = { ANTLR3_UINT64_LIT(0x00A0000040201000), ANTLR3_UINT64_LIT(0x000000000E000004) }; +static ANTLR3_BITWORD FOLLOW_attrScope_in_grammarDef480_bits[] = { ANTLR3_UINT64_LIT(0x0140000080201000), ANTLR3_UINT64_LIT(0x000000000E000008) }; static ANTLR3_BITSET_LIST FOLLOW_attrScope_in_grammarDef480 = { FOLLOW_attrScope_in_grammarDef480_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_action_in_grammarDef483 */ -static ANTLR3_BITWORD FOLLOW_action_in_grammarDef483_bits[] = { ANTLR3_UINT64_LIT(0x0020000040201000), ANTLR3_UINT64_LIT(0x000000000E000004) }; +static ANTLR3_BITWORD FOLLOW_action_in_grammarDef483_bits[] = { ANTLR3_UINT64_LIT(0x0040000080201000), ANTLR3_UINT64_LIT(0x000000000E000008) }; static ANTLR3_BITSET_LIST FOLLOW_action_in_grammarDef483 = { FOLLOW_action_in_grammarDef483_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rule_in_grammarDef486 */ -static ANTLR3_BITWORD FOLLOW_rule_in_grammarDef486_bits[] = { ANTLR3_UINT64_LIT(0x0020000040200000), ANTLR3_UINT64_LIT(0x000000000E000004) }; +static ANTLR3_BITWORD FOLLOW_rule_in_grammarDef486_bits[] = { ANTLR3_UINT64_LIT(0x0040000080200000), ANTLR3_UINT64_LIT(0x000000000E000008) }; static ANTLR3_BITSET_LIST FOLLOW_rule_in_grammarDef486 = { FOLLOW_rule_in_grammarDef486_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_EOF_in_grammarDef489 */ static ANTLR3_BITWORD FOLLOW_EOF_in_grammarDef489_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_EOF_in_grammarDef489 = { FOLLOW_EOF_in_grammarDef489_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_TOKENS_in_tokensSpec550 */ -static ANTLR3_BITWORD FOLLOW_TOKENS_in_tokensSpec550_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_TOKENS_in_tokensSpec550_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_TOKENS_in_tokensSpec550 = { FOLLOW_TOKENS_in_tokensSpec550_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_tokenSpec_in_tokensSpec552 */ -static ANTLR3_BITWORD FOLLOW_tokenSpec_in_tokensSpec552_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000080000004) }; +static ANTLR3_BITWORD FOLLOW_tokenSpec_in_tokensSpec552_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000080000008) }; static ANTLR3_BITSET_LIST FOLLOW_tokenSpec_in_tokensSpec552 = { FOLLOW_tokenSpec_in_tokensSpec552_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_95_in_tokensSpec555 */ static ANTLR3_BITWORD FOLLOW_95_in_tokensSpec555_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_95_in_tokensSpec555 = { FOLLOW_95_in_tokensSpec555_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_TOKEN_REF_in_tokenSpec575 */ -static ANTLR3_BITWORD FOLLOW_TOKEN_REF_in_tokenSpec575_bits[] = { ANTLR3_UINT64_LIT(0x0000000400000000), ANTLR3_UINT64_LIT(0x0000000000020000) }; +static ANTLR3_BITWORD FOLLOW_TOKEN_REF_in_tokenSpec575_bits[] = { ANTLR3_UINT64_LIT(0x0000000800000000), ANTLR3_UINT64_LIT(0x0000000000020000) }; static ANTLR3_BITSET_LIST FOLLOW_TOKEN_REF_in_tokenSpec575 = { FOLLOW_TOKEN_REF_in_tokenSpec575_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_LABEL_ASSIGN_V3TOK_in_tokenSpec581 */ -static ANTLR3_BITWORD FOLLOW_LABEL_ASSIGN_V3TOK_in_tokenSpec581_bits[] = { ANTLR3_UINT64_LIT(0x1000000000020000) }; +static ANTLR3_BITWORD FOLLOW_LABEL_ASSIGN_V3TOK_in_tokenSpec581_bits[] = { ANTLR3_UINT64_LIT(0x2000000000020000) }; static ANTLR3_BITSET_LIST FOLLOW_LABEL_ASSIGN_V3TOK_in_tokenSpec581 = { FOLLOW_LABEL_ASSIGN_V3TOK_in_tokenSpec581_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_STRING_LITERAL_in_tokenSpec586 */ static ANTLR3_BITWORD FOLLOW_STRING_LITERAL_in_tokenSpec586_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000020000) }; @@ -843,7 +843,7 @@ static ANTLR3_BITWORD FOLLOW_81_in_tokenSpec629_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_81_in_tokenSpec629 = { FOLLOW_81_in_tokenSpec629_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_SCOPE_V3TOK_in_attrScope640 */ -static ANTLR3_BITWORD FOLLOW_SCOPE_V3TOK_in_attrScope640_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_SCOPE_V3TOK_in_attrScope640_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_SCOPE_V3TOK_in_attrScope640 = { FOLLOW_SCOPE_V3TOK_in_attrScope640_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_attrScope642 */ static ANTLR3_BITWORD FOLLOW_id_in_attrScope642_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000010) }; @@ -852,13 +852,13 @@ static ANTLR3_BITWORD FOLLOW_ACTION_in_attrScope644_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_ACTION_in_attrScope644 = { FOLLOW_ACTION_in_attrScope644_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_AT_V3TOK_in_action667 */ -static ANTLR3_BITWORD FOLLOW_AT_V3TOK_in_action667_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000001800004) }; +static ANTLR3_BITWORD FOLLOW_AT_V3TOK_in_action667_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000001800008) }; static ANTLR3_BITSET_LIST FOLLOW_AT_V3TOK_in_action667 = { FOLLOW_AT_V3TOK_in_action667_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_actionScopeName_in_action670 */ static ANTLR3_BITWORD FOLLOW_actionScopeName_in_action670_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000010000) }; static ANTLR3_BITSET_LIST FOLLOW_actionScopeName_in_action670 = { FOLLOW_actionScopeName_in_action670_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_80_in_action672 */ -static ANTLR3_BITWORD FOLLOW_80_in_action672_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_80_in_action672_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_80_in_action672 = { FOLLOW_80_in_action672_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_action676 */ static ANTLR3_BITWORD FOLLOW_id_in_action676_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000010) }; @@ -876,22 +876,22 @@ static ANTLR3_BITWORD FOLLOW_88_in_actionScopeName727_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_88_in_actionScopeName727 = { FOLLOW_88_in_actionScopeName727_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_OPTIONS_in_optionsSpec742 */ -static ANTLR3_BITWORD FOLLOW_OPTIONS_in_optionsSpec742_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_OPTIONS_in_optionsSpec742_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_OPTIONS_in_optionsSpec742 = { FOLLOW_OPTIONS_in_optionsSpec742_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_option_in_optionsSpec745 */ static ANTLR3_BITWORD FOLLOW_option_in_optionsSpec745_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000020000) }; static ANTLR3_BITSET_LIST FOLLOW_option_in_optionsSpec745 = { FOLLOW_option_in_optionsSpec745_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_81_in_optionsSpec747 */ -static ANTLR3_BITWORD FOLLOW_81_in_optionsSpec747_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000080000004) }; +static ANTLR3_BITWORD FOLLOW_81_in_optionsSpec747_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000080000008) }; static ANTLR3_BITSET_LIST FOLLOW_81_in_optionsSpec747 = { FOLLOW_81_in_optionsSpec747_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_95_in_optionsSpec751 */ static ANTLR3_BITWORD FOLLOW_95_in_optionsSpec751_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_95_in_optionsSpec751 = { FOLLOW_95_in_optionsSpec751_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_option776 */ -static ANTLR3_BITWORD FOLLOW_id_in_option776_bits[] = { ANTLR3_UINT64_LIT(0x0000000400000000) }; +static ANTLR3_BITWORD FOLLOW_id_in_option776_bits[] = { ANTLR3_UINT64_LIT(0x0000000800000000) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_option776 = { FOLLOW_id_in_option776_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_LABEL_ASSIGN_V3TOK_in_option778 */ -static ANTLR3_BITWORD FOLLOW_LABEL_ASSIGN_V3TOK_in_option778_bits[] = { ANTLR3_UINT64_LIT(0x1020000200020000), ANTLR3_UINT64_LIT(0x0000000000000804) }; +static ANTLR3_BITWORD FOLLOW_LABEL_ASSIGN_V3TOK_in_option778_bits[] = { ANTLR3_UINT64_LIT(0x2040000400020000), ANTLR3_UINT64_LIT(0x0000000000001008) }; static ANTLR3_BITSET_LIST FOLLOW_LABEL_ASSIGN_V3TOK_in_option778 = { FOLLOW_LABEL_ASSIGN_V3TOK_in_option778_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_optionValue_in_option780 */ static ANTLR3_BITWORD FOLLOW_optionValue_in_option780_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; @@ -908,44 +908,44 @@ /** Bitset defining follow set for error recovery in rule state: FOLLOW_INT_in_optionValue839 */ static ANTLR3_BITWORD FOLLOW_INT_in_optionValue839_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_INT_in_optionValue839 = { FOLLOW_INT_in_optionValue839_bits, 1 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_75_in_optionValue849 */ -static ANTLR3_BITWORD FOLLOW_75_in_optionValue849_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -static ANTLR3_BITSET_LIST FOLLOW_75_in_optionValue849 = { FOLLOW_75_in_optionValue849_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_76_in_optionValue849 */ +static ANTLR3_BITWORD FOLLOW_76_in_optionValue849_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; +static ANTLR3_BITSET_LIST FOLLOW_76_in_optionValue849 = { FOLLOW_76_in_optionValue849_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_DOC_COMMENT_V3TOK_in_rule874 */ -static ANTLR3_BITWORD FOLLOW_DOC_COMMENT_V3TOK_in_rule874_bits[] = { ANTLR3_UINT64_LIT(0x0020000040000000), ANTLR3_UINT64_LIT(0x000000000E000004) }; +static ANTLR3_BITWORD FOLLOW_DOC_COMMENT_V3TOK_in_rule874_bits[] = { ANTLR3_UINT64_LIT(0x0040000080000000), ANTLR3_UINT64_LIT(0x000000000E000008) }; static ANTLR3_BITSET_LIST FOLLOW_DOC_COMMENT_V3TOK_in_rule874 = { FOLLOW_DOC_COMMENT_V3TOK_in_rule874_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_90_in_rule884 */ -static ANTLR3_BITWORD FOLLOW_90_in_rule884_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_90_in_rule884_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_90_in_rule884 = { FOLLOW_90_in_rule884_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_91_in_rule886 */ -static ANTLR3_BITWORD FOLLOW_91_in_rule886_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_91_in_rule886_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_91_in_rule886 = { FOLLOW_91_in_rule886_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_89_in_rule888 */ -static ANTLR3_BITWORD FOLLOW_89_in_rule888_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_89_in_rule888_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_89_in_rule888 = { FOLLOW_89_in_rule888_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_FRAGMENT_V3TOK_in_rule890 */ -static ANTLR3_BITWORD FOLLOW_FRAGMENT_V3TOK_in_rule890_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_FRAGMENT_V3TOK_in_rule890_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_FRAGMENT_V3TOK_in_rule890 = { FOLLOW_FRAGMENT_V3TOK_in_rule890_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_rule898 */ -static ANTLR3_BITWORD FOLLOW_id_in_rule898_bits[] = { ANTLR3_UINT64_LIT(0x0084100000005400), ANTLR3_UINT64_LIT(0x0000000010008000) }; +static ANTLR3_BITWORD FOLLOW_id_in_rule898_bits[] = { ANTLR3_UINT64_LIT(0x0108200000005400), ANTLR3_UINT64_LIT(0x0000000010008000) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_rule898 = { FOLLOW_id_in_rule898_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_BANG_V3TOK_in_rule904 */ -static ANTLR3_BITWORD FOLLOW_BANG_V3TOK_in_rule904_bits[] = { ANTLR3_UINT64_LIT(0x0084100000001400), ANTLR3_UINT64_LIT(0x0000000010008000) }; +static ANTLR3_BITWORD FOLLOW_BANG_V3TOK_in_rule904_bits[] = { ANTLR3_UINT64_LIT(0x0108200000001400), ANTLR3_UINT64_LIT(0x0000000010008000) }; static ANTLR3_BITSET_LIST FOLLOW_BANG_V3TOK_in_rule904 = { FOLLOW_BANG_V3TOK_in_rule904_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ARG_ACTION_in_rule913 */ -static ANTLR3_BITWORD FOLLOW_ARG_ACTION_in_rule913_bits[] = { ANTLR3_UINT64_LIT(0x0084100000001000), ANTLR3_UINT64_LIT(0x0000000010008000) }; +static ANTLR3_BITWORD FOLLOW_ARG_ACTION_in_rule913_bits[] = { ANTLR3_UINT64_LIT(0x0108200000001000), ANTLR3_UINT64_LIT(0x0000000010008000) }; static ANTLR3_BITSET_LIST FOLLOW_ARG_ACTION_in_rule913 = { FOLLOW_ARG_ACTION_in_rule913_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_RET_V3TOK_in_rule922 */ static ANTLR3_BITWORD FOLLOW_RET_V3TOK_in_rule922_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000400) }; static ANTLR3_BITSET_LIST FOLLOW_RET_V3TOK_in_rule922 = { FOLLOW_RET_V3TOK_in_rule922_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ARG_ACTION_in_rule926 */ -static ANTLR3_BITWORD FOLLOW_ARG_ACTION_in_rule926_bits[] = { ANTLR3_UINT64_LIT(0x0080100000001000), ANTLR3_UINT64_LIT(0x0000000010008000) }; +static ANTLR3_BITWORD FOLLOW_ARG_ACTION_in_rule926_bits[] = { ANTLR3_UINT64_LIT(0x0100200000001000), ANTLR3_UINT64_LIT(0x0000000010008000) }; static ANTLR3_BITSET_LIST FOLLOW_ARG_ACTION_in_rule926 = { FOLLOW_ARG_ACTION_in_rule926_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_throwsSpec_in_rule934 */ -static ANTLR3_BITWORD FOLLOW_throwsSpec_in_rule934_bits[] = { ANTLR3_UINT64_LIT(0x0080100000001000), ANTLR3_UINT64_LIT(0x0000000000008000) }; +static ANTLR3_BITWORD FOLLOW_throwsSpec_in_rule934_bits[] = { ANTLR3_UINT64_LIT(0x0100200000001000), ANTLR3_UINT64_LIT(0x0000000000008000) }; static ANTLR3_BITSET_LIST FOLLOW_throwsSpec_in_rule934 = { FOLLOW_throwsSpec_in_rule934_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_optionsSpec_in_rule937 */ -static ANTLR3_BITWORD FOLLOW_optionsSpec_in_rule937_bits[] = { ANTLR3_UINT64_LIT(0x0080000000001000), ANTLR3_UINT64_LIT(0x0000000000008000) }; +static ANTLR3_BITWORD FOLLOW_optionsSpec_in_rule937_bits[] = { ANTLR3_UINT64_LIT(0x0100000000001000), ANTLR3_UINT64_LIT(0x0000000000008000) }; static ANTLR3_BITSET_LIST FOLLOW_optionsSpec_in_rule937 = { FOLLOW_optionsSpec_in_rule937_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ruleScopeSpec_in_rule940 */ static ANTLR3_BITWORD FOLLOW_ruleScopeSpec_in_rule940_bits[] = { ANTLR3_UINT64_LIT(0x0000000000001000), ANTLR3_UINT64_LIT(0x0000000000008000) }; @@ -954,19 +954,19 @@ static ANTLR3_BITWORD FOLLOW_ruleAction_in_rule943_bits[] = { ANTLR3_UINT64_LIT(0x0000000000001000), ANTLR3_UINT64_LIT(0x0000000000008000) }; static ANTLR3_BITSET_LIST FOLLOW_ruleAction_in_rule943 = { FOLLOW_ruleAction_in_rule943_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_79_in_rule948 */ -static ANTLR3_BITWORD FOLLOW_79_in_rule948_bits[] = { ANTLR3_UINT64_LIT(0x1128000000020010), ANTLR3_UINT64_LIT(0x000000010000420C) }; +static ANTLR3_BITWORD FOLLOW_79_in_rule948_bits[] = { ANTLR3_UINT64_LIT(0x2250000000420010), ANTLR3_UINT64_LIT(0x0000000100000418) }; static ANTLR3_BITSET_LIST FOLLOW_79_in_rule948 = { FOLLOW_79_in_rule948_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_altList_in_rule950 */ static ANTLR3_BITWORD FOLLOW_altList_in_rule950_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000020000) }; static ANTLR3_BITSET_LIST FOLLOW_altList_in_rule950 = { FOLLOW_altList_in_rule950_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_81_in_rule952 */ -static ANTLR3_BITWORD FOLLOW_81_in_rule952_bits[] = { ANTLR3_UINT64_LIT(0x0000000020010002) }; +static ANTLR3_BITWORD FOLLOW_81_in_rule952_bits[] = { ANTLR3_UINT64_LIT(0x0000000040010002) }; static ANTLR3_BITSET_LIST FOLLOW_81_in_rule952 = { FOLLOW_81_in_rule952_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_exceptionGroup_in_rule956 */ static ANTLR3_BITWORD FOLLOW_exceptionGroup_in_rule956_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_exceptionGroup_in_rule956 = { FOLLOW_exceptionGroup_in_rule956_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_AT_V3TOK_in_ruleAction1060 */ -static ANTLR3_BITWORD FOLLOW_AT_V3TOK_in_ruleAction1060_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_AT_V3TOK_in_ruleAction1060_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_AT_V3TOK_in_ruleAction1060 = { FOLLOW_AT_V3TOK_in_ruleAction1060_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_ruleAction1062 */ static ANTLR3_BITWORD FOLLOW_id_in_ruleAction1062_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000010) }; @@ -975,16 +975,16 @@ static ANTLR3_BITWORD FOLLOW_ACTION_in_ruleAction1064_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_ACTION_in_ruleAction1064 = { FOLLOW_ACTION_in_ruleAction1064_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_92_in_throwsSpec1085 */ -static ANTLR3_BITWORD FOLLOW_92_in_throwsSpec1085_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_92_in_throwsSpec1085_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_92_in_throwsSpec1085 = { FOLLOW_92_in_throwsSpec1085_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_throwsSpec1087 */ -static ANTLR3_BITWORD FOLLOW_id_in_throwsSpec1087_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000002000) }; +static ANTLR3_BITWORD FOLLOW_id_in_throwsSpec1087_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_throwsSpec1087 = { FOLLOW_id_in_throwsSpec1087_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_77_in_throwsSpec1091 */ -static ANTLR3_BITWORD FOLLOW_77_in_throwsSpec1091_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; -static ANTLR3_BITSET_LIST FOLLOW_77_in_throwsSpec1091 = { FOLLOW_77_in_throwsSpec1091_bits, 2 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_78_in_throwsSpec1091 */ +static ANTLR3_BITWORD FOLLOW_78_in_throwsSpec1091_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; +static ANTLR3_BITSET_LIST FOLLOW_78_in_throwsSpec1091 = { FOLLOW_78_in_throwsSpec1091_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_throwsSpec1093 */ -static ANTLR3_BITWORD FOLLOW_id_in_throwsSpec1093_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000002000) }; +static ANTLR3_BITWORD FOLLOW_id_in_throwsSpec1093_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_throwsSpec1093 = { FOLLOW_id_in_throwsSpec1093_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1116 */ static ANTLR3_BITWORD FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1116_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000010) }; @@ -993,16 +993,16 @@ static ANTLR3_BITWORD FOLLOW_ACTION_in_ruleScopeSpec1118_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_ACTION_in_ruleScopeSpec1118 = { FOLLOW_ACTION_in_ruleScopeSpec1118_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1131 */ -static ANTLR3_BITWORD FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1131_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1131_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1131 = { FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1131_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_ruleScopeSpec1133 */ -static ANTLR3_BITWORD FOLLOW_id_in_ruleScopeSpec1133_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000022000) }; +static ANTLR3_BITWORD FOLLOW_id_in_ruleScopeSpec1133_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000024000) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_ruleScopeSpec1133 = { FOLLOW_id_in_ruleScopeSpec1133_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_77_in_ruleScopeSpec1136 */ -static ANTLR3_BITWORD FOLLOW_77_in_ruleScopeSpec1136_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; -static ANTLR3_BITSET_LIST FOLLOW_77_in_ruleScopeSpec1136 = { FOLLOW_77_in_ruleScopeSpec1136_bits, 2 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_78_in_ruleScopeSpec1136 */ +static ANTLR3_BITWORD FOLLOW_78_in_ruleScopeSpec1136_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; +static ANTLR3_BITSET_LIST FOLLOW_78_in_ruleScopeSpec1136 = { FOLLOW_78_in_ruleScopeSpec1136_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_ruleScopeSpec1138 */ -static ANTLR3_BITWORD FOLLOW_id_in_ruleScopeSpec1138_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000022000) }; +static ANTLR3_BITWORD FOLLOW_id_in_ruleScopeSpec1138_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000024000) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_ruleScopeSpec1138 = { FOLLOW_id_in_ruleScopeSpec1138_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_81_in_ruleScopeSpec1142 */ static ANTLR3_BITWORD FOLLOW_81_in_ruleScopeSpec1142_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; @@ -1011,46 +1011,46 @@ static ANTLR3_BITWORD FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1156_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000010) }; static ANTLR3_BITSET_LIST FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1156 = { FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1156_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ACTION_in_ruleScopeSpec1158 */ -static ANTLR3_BITWORD FOLLOW_ACTION_in_ruleScopeSpec1158_bits[] = { ANTLR3_UINT64_LIT(0x0080000000000000) }; +static ANTLR3_BITWORD FOLLOW_ACTION_in_ruleScopeSpec1158_bits[] = { ANTLR3_UINT64_LIT(0x0100000000000000) }; static ANTLR3_BITSET_LIST FOLLOW_ACTION_in_ruleScopeSpec1158 = { FOLLOW_ACTION_in_ruleScopeSpec1158_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1162 */ -static ANTLR3_BITWORD FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1162_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1162_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1162 = { FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1162_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_ruleScopeSpec1164 */ -static ANTLR3_BITWORD FOLLOW_id_in_ruleScopeSpec1164_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000022000) }; +static ANTLR3_BITWORD FOLLOW_id_in_ruleScopeSpec1164_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000024000) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_ruleScopeSpec1164 = { FOLLOW_id_in_ruleScopeSpec1164_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_77_in_ruleScopeSpec1167 */ -static ANTLR3_BITWORD FOLLOW_77_in_ruleScopeSpec1167_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; -static ANTLR3_BITSET_LIST FOLLOW_77_in_ruleScopeSpec1167 = { FOLLOW_77_in_ruleScopeSpec1167_bits, 2 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_78_in_ruleScopeSpec1167 */ +static ANTLR3_BITWORD FOLLOW_78_in_ruleScopeSpec1167_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; +static ANTLR3_BITSET_LIST FOLLOW_78_in_ruleScopeSpec1167 = { FOLLOW_78_in_ruleScopeSpec1167_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_ruleScopeSpec1169 */ -static ANTLR3_BITWORD FOLLOW_id_in_ruleScopeSpec1169_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000022000) }; +static ANTLR3_BITWORD FOLLOW_id_in_ruleScopeSpec1169_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000024000) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_ruleScopeSpec1169 = { FOLLOW_id_in_ruleScopeSpec1169_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_81_in_ruleScopeSpec1173 */ static ANTLR3_BITWORD FOLLOW_81_in_ruleScopeSpec1173_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_81_in_ruleScopeSpec1173 = { FOLLOW_81_in_ruleScopeSpec1173_bits, 1 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_73_in_block1201 */ -static ANTLR3_BITWORD FOLLOW_73_in_block1201_bits[] = { ANTLR3_UINT64_LIT(0x1128100000020010), ANTLR3_UINT64_LIT(0x000000010000C20C) }; -static ANTLR3_BITSET_LIST FOLLOW_73_in_block1201 = { FOLLOW_73_in_block1201_bits, 2 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_block1201 */ +static ANTLR3_BITWORD FOLLOW_74_in_block1201_bits[] = { ANTLR3_UINT64_LIT(0x2250200000420010), ANTLR3_UINT64_LIT(0x0000000100008418) }; +static ANTLR3_BITSET_LIST FOLLOW_74_in_block1201 = { FOLLOW_74_in_block1201_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_optionsSpec_in_block1209 */ static ANTLR3_BITWORD FOLLOW_optionsSpec_in_block1209_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000008000) }; static ANTLR3_BITSET_LIST FOLLOW_optionsSpec_in_block1209 = { FOLLOW_optionsSpec_in_block1209_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_79_in_block1213 */ -static ANTLR3_BITWORD FOLLOW_79_in_block1213_bits[] = { ANTLR3_UINT64_LIT(0x1128000000020010), ANTLR3_UINT64_LIT(0x000000010000420C) }; +static ANTLR3_BITWORD FOLLOW_79_in_block1213_bits[] = { ANTLR3_UINT64_LIT(0x2250000000420010), ANTLR3_UINT64_LIT(0x0000000100000418) }; static ANTLR3_BITSET_LIST FOLLOW_79_in_block1213 = { FOLLOW_79_in_block1213_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_altpair_in_block1218 */ -static ANTLR3_BITWORD FOLLOW_altpair_in_block1218_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000040000400) }; +static ANTLR3_BITWORD FOLLOW_altpair_in_block1218_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000040000800) }; static ANTLR3_BITSET_LIST FOLLOW_altpair_in_block1218 = { FOLLOW_altpair_in_block1218_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_94_in_block1222 */ -static ANTLR3_BITWORD FOLLOW_94_in_block1222_bits[] = { ANTLR3_UINT64_LIT(0x1128000000020010), ANTLR3_UINT64_LIT(0x000000010000420C) }; +static ANTLR3_BITWORD FOLLOW_94_in_block1222_bits[] = { ANTLR3_UINT64_LIT(0x2250000000420010), ANTLR3_UINT64_LIT(0x0000000100000418) }; static ANTLR3_BITSET_LIST FOLLOW_94_in_block1222 = { FOLLOW_94_in_block1222_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_altpair_in_block1224 */ -static ANTLR3_BITWORD FOLLOW_altpair_in_block1224_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000040000400) }; +static ANTLR3_BITWORD FOLLOW_altpair_in_block1224_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000040000800) }; static ANTLR3_BITSET_LIST FOLLOW_altpair_in_block1224 = { FOLLOW_altpair_in_block1224_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_block1233 */ -static ANTLR3_BITWORD FOLLOW_74_in_block1233_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -static ANTLR3_BITSET_LIST FOLLOW_74_in_block1233 = { FOLLOW_74_in_block1233_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_75_in_block1233 */ +static ANTLR3_BITWORD FOLLOW_75_in_block1233_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; +static ANTLR3_BITSET_LIST FOLLOW_75_in_block1233 = { FOLLOW_75_in_block1233_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_alternative_in_altpair1262 */ -static ANTLR3_BITWORD FOLLOW_alternative_in_altpair1262_bits[] = { ANTLR3_UINT64_LIT(0x0008000000000000) }; +static ANTLR3_BITWORD FOLLOW_alternative_in_altpair1262_bits[] = { ANTLR3_UINT64_LIT(0x0010000000000000) }; static ANTLR3_BITSET_LIST FOLLOW_alternative_in_altpair1262 = { FOLLOW_alternative_in_altpair1262_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_in_altpair1264 */ static ANTLR3_BITWORD FOLLOW_rewrite_in_altpair1264_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; @@ -1059,16 +1059,16 @@ static ANTLR3_BITWORD FOLLOW_altpair_in_altList1278_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000040000000) }; static ANTLR3_BITSET_LIST FOLLOW_altpair_in_altList1278 = { FOLLOW_altpair_in_altList1278_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_94_in_altList1282 */ -static ANTLR3_BITWORD FOLLOW_94_in_altList1282_bits[] = { ANTLR3_UINT64_LIT(0x1128000000020010), ANTLR3_UINT64_LIT(0x000000010000420C) }; +static ANTLR3_BITWORD FOLLOW_94_in_altList1282_bits[] = { ANTLR3_UINT64_LIT(0x2250000000420010), ANTLR3_UINT64_LIT(0x0000000100000418) }; static ANTLR3_BITSET_LIST FOLLOW_94_in_altList1282 = { FOLLOW_94_in_altList1282_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_altpair_in_altList1284 */ static ANTLR3_BITWORD FOLLOW_altpair_in_altList1284_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000040000000) }; static ANTLR3_BITSET_LIST FOLLOW_altpair_in_altList1284 = { FOLLOW_altpair_in_altList1284_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_element_in_alternative1322 */ -static ANTLR3_BITWORD FOLLOW_element_in_alternative1322_bits[] = { ANTLR3_UINT64_LIT(0x1120000000020012), ANTLR3_UINT64_LIT(0x000000010000420C) }; +static ANTLR3_BITWORD FOLLOW_element_in_alternative1322_bits[] = { ANTLR3_UINT64_LIT(0x2240000000420012), ANTLR3_UINT64_LIT(0x0000000100000418) }; static ANTLR3_BITSET_LIST FOLLOW_element_in_alternative1322 = { FOLLOW_element_in_alternative1322_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_exceptionHandler_in_exceptionGroup1373 */ -static ANTLR3_BITWORD FOLLOW_exceptionHandler_in_exceptionGroup1373_bits[] = { ANTLR3_UINT64_LIT(0x0000000020010002) }; +static ANTLR3_BITWORD FOLLOW_exceptionHandler_in_exceptionGroup1373_bits[] = { ANTLR3_UINT64_LIT(0x0000000040010002) }; static ANTLR3_BITSET_LIST FOLLOW_exceptionHandler_in_exceptionGroup1373 = { FOLLOW_exceptionHandler_in_exceptionGroup1373_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_finallyClause_in_exceptionGroup1380 */ static ANTLR3_BITWORD FOLLOW_finallyClause_in_exceptionGroup1380_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; @@ -1092,37 +1092,37 @@ static ANTLR3_BITWORD FOLLOW_ACTION_in_finallyClause1444_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_ACTION_in_finallyClause1444 = { FOLLOW_ACTION_in_finallyClause1444_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_element1466 */ -static ANTLR3_BITWORD FOLLOW_id_in_element1466_bits[] = { ANTLR3_UINT64_LIT(0x0000004400000000) }; +static ANTLR3_BITWORD FOLLOW_id_in_element1466_bits[] = { ANTLR3_UINT64_LIT(0x0000008800000000) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_element1466 = { FOLLOW_id_in_element1466_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_LABEL_ASSIGN_V3TOK_in_element1471 */ -static ANTLR3_BITWORD FOLLOW_LABEL_ASSIGN_V3TOK_in_element1471_bits[] = { ANTLR3_UINT64_LIT(0x1020000000020000), ANTLR3_UINT64_LIT(0x0000000100004004) }; +static ANTLR3_BITWORD FOLLOW_LABEL_ASSIGN_V3TOK_in_element1471_bits[] = { ANTLR3_UINT64_LIT(0x2040000000420000), ANTLR3_UINT64_LIT(0x0000000100000008) }; static ANTLR3_BITSET_LIST FOLLOW_LABEL_ASSIGN_V3TOK_in_element1471 = { FOLLOW_LABEL_ASSIGN_V3TOK_in_element1471_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_LIST_LABEL_ASSIGN_V3TOK_in_element1475 */ -static ANTLR3_BITWORD FOLLOW_LIST_LABEL_ASSIGN_V3TOK_in_element1475_bits[] = { ANTLR3_UINT64_LIT(0x1020000000020000), ANTLR3_UINT64_LIT(0x0000000100004004) }; +static ANTLR3_BITWORD FOLLOW_LIST_LABEL_ASSIGN_V3TOK_in_element1475_bits[] = { ANTLR3_UINT64_LIT(0x2040000000420000), ANTLR3_UINT64_LIT(0x0000000100000008) }; static ANTLR3_BITSET_LIST FOLLOW_LIST_LABEL_ASSIGN_V3TOK_in_element1475 = { FOLLOW_LIST_LABEL_ASSIGN_V3TOK_in_element1475_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_atom_in_element1478 */ -static ANTLR3_BITWORD FOLLOW_atom_in_element1478_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000201800) }; +static ANTLR3_BITWORD FOLLOW_atom_in_element1478_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000203000) }; static ANTLR3_BITSET_LIST FOLLOW_atom_in_element1478 = { FOLLOW_atom_in_element1478_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ebnfSuffix_in_element1484 */ static ANTLR3_BITWORD FOLLOW_ebnfSuffix_in_element1484_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_ebnfSuffix_in_element1484 = { FOLLOW_ebnfSuffix_in_element1484_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_element1543 */ -static ANTLR3_BITWORD FOLLOW_id_in_element1543_bits[] = { ANTLR3_UINT64_LIT(0x0000004400000000) }; +static ANTLR3_BITWORD FOLLOW_id_in_element1543_bits[] = { ANTLR3_UINT64_LIT(0x0000008800000000) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_element1543 = { FOLLOW_id_in_element1543_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_LABEL_ASSIGN_V3TOK_in_element1548 */ -static ANTLR3_BITWORD FOLLOW_LABEL_ASSIGN_V3TOK_in_element1548_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000200) }; +static ANTLR3_BITWORD FOLLOW_LABEL_ASSIGN_V3TOK_in_element1548_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) }; static ANTLR3_BITSET_LIST FOLLOW_LABEL_ASSIGN_V3TOK_in_element1548 = { FOLLOW_LABEL_ASSIGN_V3TOK_in_element1548_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_LIST_LABEL_ASSIGN_V3TOK_in_element1552 */ -static ANTLR3_BITWORD FOLLOW_LIST_LABEL_ASSIGN_V3TOK_in_element1552_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000200) }; +static ANTLR3_BITWORD FOLLOW_LIST_LABEL_ASSIGN_V3TOK_in_element1552_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) }; static ANTLR3_BITSET_LIST FOLLOW_LIST_LABEL_ASSIGN_V3TOK_in_element1552 = { FOLLOW_LIST_LABEL_ASSIGN_V3TOK_in_element1552_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_block_in_element1555 */ -static ANTLR3_BITWORD FOLLOW_block_in_element1555_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000201800) }; +static ANTLR3_BITWORD FOLLOW_block_in_element1555_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000203000) }; static ANTLR3_BITSET_LIST FOLLOW_block_in_element1555 = { FOLLOW_block_in_element1555_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ebnfSuffix_in_element1562 */ static ANTLR3_BITWORD FOLLOW_ebnfSuffix_in_element1562_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_ebnfSuffix_in_element1562 = { FOLLOW_ebnfSuffix_in_element1562_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_atom_in_element1621 */ -static ANTLR3_BITWORD FOLLOW_atom_in_element1621_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000201800) }; +static ANTLR3_BITWORD FOLLOW_atom_in_element1621_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000203000) }; static ANTLR3_BITSET_LIST FOLLOW_atom_in_element1621 = { FOLLOW_atom_in_element1621_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ebnfSuffix_in_element1627 */ static ANTLR3_BITWORD FOLLOW_ebnfSuffix_in_element1627_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; @@ -1140,7 +1140,7 @@ static ANTLR3_BITWORD FOLLOW_83_in_element1701_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_83_in_element1701 = { FOLLOW_83_in_element1701_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_treeSpec_in_element1727 */ -static ANTLR3_BITWORD FOLLOW_treeSpec_in_element1727_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000201800) }; +static ANTLR3_BITWORD FOLLOW_treeSpec_in_element1727_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000203000) }; static ANTLR3_BITSET_LIST FOLLOW_treeSpec_in_element1727 = { FOLLOW_treeSpec_in_element1727_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ebnfSuffix_in_element1733 */ static ANTLR3_BITWORD FOLLOW_ebnfSuffix_in_element1733_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; @@ -1149,7 +1149,7 @@ static ANTLR3_BITWORD FOLLOW_terminal_in_atom1784_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_terminal_in_atom1784 = { FOLLOW_terminal_in_atom1784_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_range_in_atom1789 */ -static ANTLR3_BITWORD FOLLOW_range_in_atom1789_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002) }; +static ANTLR3_BITWORD FOLLOW_range_in_atom1789_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002) }; static ANTLR3_BITSET_LIST FOLLOW_range_in_atom1789 = { FOLLOW_range_in_atom1789_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ROOT_V3TOK_in_atom1799 */ static ANTLR3_BITWORD FOLLOW_ROOT_V3TOK_in_atom1799_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; @@ -1158,7 +1158,7 @@ static ANTLR3_BITWORD FOLLOW_BANG_V3TOK_in_atom1803_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_BANG_V3TOK_in_atom1803 = { FOLLOW_BANG_V3TOK_in_atom1803_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_notSet_in_atom1837 */ -static ANTLR3_BITWORD FOLLOW_notSet_in_atom1837_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002) }; +static ANTLR3_BITWORD FOLLOW_notSet_in_atom1837_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002) }; static ANTLR3_BITSET_LIST FOLLOW_notSet_in_atom1837 = { FOLLOW_notSet_in_atom1837_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ROOT_V3TOK_in_atom1846 */ static ANTLR3_BITWORD FOLLOW_ROOT_V3TOK_in_atom1846_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; @@ -1167,10 +1167,10 @@ static ANTLR3_BITWORD FOLLOW_BANG_V3TOK_in_atom1850_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_BANG_V3TOK_in_atom1850 = { FOLLOW_BANG_V3TOK_in_atom1850_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_RULE_REF_in_atom1884 */ -static ANTLR3_BITWORD FOLLOW_RULE_REF_in_atom1884_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004402) }; +static ANTLR3_BITWORD FOLLOW_RULE_REF_in_atom1884_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004402) }; static ANTLR3_BITSET_LIST FOLLOW_RULE_REF_in_atom1884 = { FOLLOW_RULE_REF_in_atom1884_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ARG_ACTION_in_atom1886 */ -static ANTLR3_BITWORD FOLLOW_ARG_ACTION_in_atom1886_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002) }; +static ANTLR3_BITWORD FOLLOW_ARG_ACTION_in_atom1886_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002) }; static ANTLR3_BITSET_LIST FOLLOW_ARG_ACTION_in_atom1886 = { FOLLOW_ARG_ACTION_in_atom1886_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ROOT_V3TOK_in_atom1896 */ static ANTLR3_BITWORD FOLLOW_ROOT_V3TOK_in_atom1896_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; @@ -1179,7 +1179,7 @@ static ANTLR3_BITWORD FOLLOW_BANG_V3TOK_in_atom1900_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_BANG_V3TOK_in_atom1900 = { FOLLOW_BANG_V3TOK_in_atom1900_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_96_in_notSet1944 */ -static ANTLR3_BITWORD FOLLOW_96_in_notSet1944_bits[] = { ANTLR3_UINT64_LIT(0x1000000000020000), ANTLR3_UINT64_LIT(0x0000000000000204) }; +static ANTLR3_BITWORD FOLLOW_96_in_notSet1944_bits[] = { ANTLR3_UINT64_LIT(0x2000000000020000), ANTLR3_UINT64_LIT(0x0000000000000408) }; static ANTLR3_BITSET_LIST FOLLOW_96_in_notSet1944 = { FOLLOW_96_in_notSet1944_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_notTerminal_in_notSet1950 */ static ANTLR3_BITWORD FOLLOW_notTerminal_in_notSet1950_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000040000) }; @@ -1194,7 +1194,7 @@ static ANTLR3_BITWORD FOLLOW_elementOptions_in_notSet1972_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_elementOptions_in_notSet1972 = { FOLLOW_elementOptions_in_notSet1972_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_82_in_elementOptions2024 */ -static ANTLR3_BITWORD FOLLOW_82_in_elementOptions2024_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_82_in_elementOptions2024_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_82_in_elementOptions2024 = { FOLLOW_82_in_elementOptions2024_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_qid_in_elementOptions2026 */ static ANTLR3_BITWORD FOLLOW_qid_in_elementOptions2026_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000100000) }; @@ -1203,13 +1203,13 @@ static ANTLR3_BITWORD FOLLOW_84_in_elementOptions2028_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_84_in_elementOptions2028 = { FOLLOW_84_in_elementOptions2028_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_82_in_elementOptions2046 */ -static ANTLR3_BITWORD FOLLOW_82_in_elementOptions2046_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_82_in_elementOptions2046_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_82_in_elementOptions2046 = { FOLLOW_82_in_elementOptions2046_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_option_in_elementOptions2048 */ static ANTLR3_BITWORD FOLLOW_option_in_elementOptions2048_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000120000) }; static ANTLR3_BITSET_LIST FOLLOW_option_in_elementOptions2048 = { FOLLOW_option_in_elementOptions2048_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_81_in_elementOptions2051 */ -static ANTLR3_BITWORD FOLLOW_81_in_elementOptions2051_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; +static ANTLR3_BITWORD FOLLOW_81_in_elementOptions2051_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; static ANTLR3_BITSET_LIST FOLLOW_81_in_elementOptions2051 = { FOLLOW_81_in_elementOptions2051_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_option_in_elementOptions2053 */ static ANTLR3_BITWORD FOLLOW_option_in_elementOptions2053_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000120000) }; @@ -1218,28 +1218,28 @@ static ANTLR3_BITWORD FOLLOW_84_in_elementOptions2057_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_84_in_elementOptions2057 = { FOLLOW_84_in_elementOptions2057_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_elementOption2077 */ -static ANTLR3_BITWORD FOLLOW_id_in_elementOption2077_bits[] = { ANTLR3_UINT64_LIT(0x0000000400000000) }; +static ANTLR3_BITWORD FOLLOW_id_in_elementOption2077_bits[] = { ANTLR3_UINT64_LIT(0x0000000800000000) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_elementOption2077 = { FOLLOW_id_in_elementOption2077_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_LABEL_ASSIGN_V3TOK_in_elementOption2079 */ -static ANTLR3_BITWORD FOLLOW_LABEL_ASSIGN_V3TOK_in_elementOption2079_bits[] = { ANTLR3_UINT64_LIT(0x1020000200020000), ANTLR3_UINT64_LIT(0x0000000000000804) }; +static ANTLR3_BITWORD FOLLOW_LABEL_ASSIGN_V3TOK_in_elementOption2079_bits[] = { ANTLR3_UINT64_LIT(0x2040000400020000), ANTLR3_UINT64_LIT(0x0000000000001008) }; static ANTLR3_BITSET_LIST FOLLOW_LABEL_ASSIGN_V3TOK_in_elementOption2079 = { FOLLOW_LABEL_ASSIGN_V3TOK_in_elementOption2079_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_optionValue_in_elementOption2081 */ static ANTLR3_BITWORD FOLLOW_optionValue_in_elementOption2081_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_optionValue_in_elementOption2081 = { FOLLOW_optionValue_in_elementOption2081_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_TREE_BEGIN_V3TOK_in_treeSpec2103 */ -static ANTLR3_BITWORD FOLLOW_TREE_BEGIN_V3TOK_in_treeSpec2103_bits[] = { ANTLR3_UINT64_LIT(0x1120000000020010), ANTLR3_UINT64_LIT(0x000000010000420C) }; +static ANTLR3_BITWORD FOLLOW_TREE_BEGIN_V3TOK_in_treeSpec2103_bits[] = { ANTLR3_UINT64_LIT(0x2240000000420010), ANTLR3_UINT64_LIT(0x0000000100000418) }; static ANTLR3_BITSET_LIST FOLLOW_TREE_BEGIN_V3TOK_in_treeSpec2103 = { FOLLOW_TREE_BEGIN_V3TOK_in_treeSpec2103_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_element_in_treeSpec2105 */ -static ANTLR3_BITWORD FOLLOW_element_in_treeSpec2105_bits[] = { ANTLR3_UINT64_LIT(0x1120000000020010), ANTLR3_UINT64_LIT(0x000000010000420C) }; +static ANTLR3_BITWORD FOLLOW_element_in_treeSpec2105_bits[] = { ANTLR3_UINT64_LIT(0x2240000000420010), ANTLR3_UINT64_LIT(0x0000000100000418) }; static ANTLR3_BITSET_LIST FOLLOW_element_in_treeSpec2105 = { FOLLOW_element_in_treeSpec2105_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_element_in_treeSpec2109 */ -static ANTLR3_BITWORD FOLLOW_element_in_treeSpec2109_bits[] = { ANTLR3_UINT64_LIT(0x1120000000020010), ANTLR3_UINT64_LIT(0x000000010000460C) }; +static ANTLR3_BITWORD FOLLOW_element_in_treeSpec2109_bits[] = { ANTLR3_UINT64_LIT(0x2240000000420010), ANTLR3_UINT64_LIT(0x0000000100000C18) }; static ANTLR3_BITSET_LIST FOLLOW_element_in_treeSpec2109 = { FOLLOW_element_in_treeSpec2109_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_treeSpec2114 */ -static ANTLR3_BITWORD FOLLOW_74_in_treeSpec2114_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -static ANTLR3_BITSET_LIST FOLLOW_74_in_treeSpec2114 = { FOLLOW_74_in_treeSpec2114_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_75_in_treeSpec2114 */ +static ANTLR3_BITWORD FOLLOW_75_in_treeSpec2114_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; +static ANTLR3_BITSET_LIST FOLLOW_75_in_treeSpec2114 = { FOLLOW_75_in_treeSpec2114_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_CHAR_LITERAL_in_range2137 */ -static ANTLR3_BITWORD FOLLOW_CHAR_LITERAL_in_range2137_bits[] = { ANTLR3_UINT64_LIT(0x0002000000000000) }; +static ANTLR3_BITWORD FOLLOW_CHAR_LITERAL_in_range2137_bits[] = { ANTLR3_UINT64_LIT(0x0004000000000000) }; static ANTLR3_BITSET_LIST FOLLOW_CHAR_LITERAL_in_range2137 = { FOLLOW_CHAR_LITERAL_in_range2137_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_RANGE_V3TOK_in_range2139 */ static ANTLR3_BITWORD FOLLOW_RANGE_V3TOK_in_range2139_bits[] = { ANTLR3_UINT64_LIT(0x0000000000020000) }; @@ -1251,31 +1251,31 @@ static ANTLR3_BITWORD FOLLOW_elementOptions_in_range2145_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_elementOptions_in_range2145 = { FOLLOW_elementOptions_in_range2145_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_CHAR_LITERAL_in_terminal2178 */ -static ANTLR3_BITWORD FOLLOW_CHAR_LITERAL_in_terminal2178_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002), ANTLR3_UINT64_LIT(0x0000000000040000) }; +static ANTLR3_BITWORD FOLLOW_CHAR_LITERAL_in_terminal2178_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002), ANTLR3_UINT64_LIT(0x0000000000040000) }; static ANTLR3_BITSET_LIST FOLLOW_CHAR_LITERAL_in_terminal2178 = { FOLLOW_CHAR_LITERAL_in_terminal2178_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_elementOptions_in_terminal2180 */ -static ANTLR3_BITWORD FOLLOW_elementOptions_in_terminal2180_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002) }; +static ANTLR3_BITWORD FOLLOW_elementOptions_in_terminal2180_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002) }; static ANTLR3_BITSET_LIST FOLLOW_elementOptions_in_terminal2180 = { FOLLOW_elementOptions_in_terminal2180_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_TOKEN_REF_in_terminal2209 */ -static ANTLR3_BITWORD FOLLOW_TOKEN_REF_in_terminal2209_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004402), ANTLR3_UINT64_LIT(0x0000000000040000) }; +static ANTLR3_BITWORD FOLLOW_TOKEN_REF_in_terminal2209_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004402), ANTLR3_UINT64_LIT(0x0000000000040000) }; static ANTLR3_BITSET_LIST FOLLOW_TOKEN_REF_in_terminal2209 = { FOLLOW_TOKEN_REF_in_terminal2209_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ARG_ACTION_in_terminal2211 */ -static ANTLR3_BITWORD FOLLOW_ARG_ACTION_in_terminal2211_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002), ANTLR3_UINT64_LIT(0x0000000000040000) }; +static ANTLR3_BITWORD FOLLOW_ARG_ACTION_in_terminal2211_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002), ANTLR3_UINT64_LIT(0x0000000000040000) }; static ANTLR3_BITSET_LIST FOLLOW_ARG_ACTION_in_terminal2211 = { FOLLOW_ARG_ACTION_in_terminal2211_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_elementOptions_in_terminal2214 */ -static ANTLR3_BITWORD FOLLOW_elementOptions_in_terminal2214_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002) }; +static ANTLR3_BITWORD FOLLOW_elementOptions_in_terminal2214_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002) }; static ANTLR3_BITSET_LIST FOLLOW_elementOptions_in_terminal2214 = { FOLLOW_elementOptions_in_terminal2214_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_STRING_LITERAL_in_terminal2233 */ -static ANTLR3_BITWORD FOLLOW_STRING_LITERAL_in_terminal2233_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002), ANTLR3_UINT64_LIT(0x0000000000040000) }; +static ANTLR3_BITWORD FOLLOW_STRING_LITERAL_in_terminal2233_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002), ANTLR3_UINT64_LIT(0x0000000000040000) }; static ANTLR3_BITSET_LIST FOLLOW_STRING_LITERAL_in_terminal2233 = { FOLLOW_STRING_LITERAL_in_terminal2233_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_elementOptions_in_terminal2235 */ -static ANTLR3_BITWORD FOLLOW_elementOptions_in_terminal2235_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002) }; +static ANTLR3_BITWORD FOLLOW_elementOptions_in_terminal2235_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002) }; static ANTLR3_BITSET_LIST FOLLOW_elementOptions_in_terminal2235 = { FOLLOW_elementOptions_in_terminal2235_bits, 1 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_78_in_terminal2254 */ -static ANTLR3_BITWORD FOLLOW_78_in_terminal2254_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002), ANTLR3_UINT64_LIT(0x0000000000040000) }; -static ANTLR3_BITSET_LIST FOLLOW_78_in_terminal2254 = { FOLLOW_78_in_terminal2254_bits, 2 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_DOT_SYM_in_terminal2254 */ +static ANTLR3_BITWORD FOLLOW_DOT_SYM_in_terminal2254_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002), ANTLR3_UINT64_LIT(0x0000000000040000) }; +static ANTLR3_BITSET_LIST FOLLOW_DOT_SYM_in_terminal2254 = { FOLLOW_DOT_SYM_in_terminal2254_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_elementOptions_in_terminal2256 */ -static ANTLR3_BITWORD FOLLOW_elementOptions_in_terminal2256_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002) }; +static ANTLR3_BITWORD FOLLOW_elementOptions_in_terminal2256_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002) }; static ANTLR3_BITSET_LIST FOLLOW_elementOptions_in_terminal2256 = { FOLLOW_elementOptions_in_terminal2256_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ROOT_V3TOK_in_terminal2283 */ static ANTLR3_BITWORD FOLLOW_ROOT_V3TOK_in_terminal2283_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; @@ -1284,19 +1284,19 @@ static ANTLR3_BITWORD FOLLOW_BANG_V3TOK_in_terminal2298_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_BANG_V3TOK_in_terminal2298 = { FOLLOW_BANG_V3TOK_in_terminal2298_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_block_in_ebnf2332 */ -static ANTLR3_BITWORD FOLLOW_block_in_ebnf2332_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002), ANTLR3_UINT64_LIT(0x0000000000281800) }; +static ANTLR3_BITWORD FOLLOW_block_in_ebnf2332_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002), ANTLR3_UINT64_LIT(0x0000000000283000) }; static ANTLR3_BITSET_LIST FOLLOW_block_in_ebnf2332 = { FOLLOW_block_in_ebnf2332_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_85_in_ebnf2341 */ -static ANTLR3_BITWORD FOLLOW_85_in_ebnf2341_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002) }; +static ANTLR3_BITWORD FOLLOW_85_in_ebnf2341_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002) }; static ANTLR3_BITSET_LIST FOLLOW_85_in_ebnf2341 = { FOLLOW_85_in_ebnf2341_bits, 1 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_75_in_ebnf2358 */ -static ANTLR3_BITWORD FOLLOW_75_in_ebnf2358_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002) }; -static ANTLR3_BITSET_LIST FOLLOW_75_in_ebnf2358 = { FOLLOW_75_in_ebnf2358_bits, 1 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_76_in_ebnf2375 */ -static ANTLR3_BITWORD FOLLOW_76_in_ebnf2375_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002) }; -static ANTLR3_BITSET_LIST FOLLOW_76_in_ebnf2375 = { FOLLOW_76_in_ebnf2375_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_76_in_ebnf2358 */ +static ANTLR3_BITWORD FOLLOW_76_in_ebnf2358_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002) }; +static ANTLR3_BITSET_LIST FOLLOW_76_in_ebnf2358 = { FOLLOW_76_in_ebnf2358_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_77_in_ebnf2375 */ +static ANTLR3_BITWORD FOLLOW_77_in_ebnf2375_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002) }; +static ANTLR3_BITSET_LIST FOLLOW_77_in_ebnf2375 = { FOLLOW_77_in_ebnf2375_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_83_in_ebnf2392 */ -static ANTLR3_BITWORD FOLLOW_83_in_ebnf2392_bits[] = { ANTLR3_UINT64_LIT(0x0010000000004002) }; +static ANTLR3_BITWORD FOLLOW_83_in_ebnf2392_bits[] = { ANTLR3_UINT64_LIT(0x0020000000004002) }; static ANTLR3_BITSET_LIST FOLLOW_83_in_ebnf2392 = { FOLLOW_83_in_ebnf2392_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ROOT_V3TOK_in_ebnf2459 */ static ANTLR3_BITWORD FOLLOW_ROOT_V3TOK_in_ebnf2459_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; @@ -1307,23 +1307,23 @@ /** Bitset defining follow set for error recovery in rule state: FOLLOW_85_in_ebnfSuffix2502 */ static ANTLR3_BITWORD FOLLOW_85_in_ebnfSuffix2502_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_85_in_ebnfSuffix2502 = { FOLLOW_85_in_ebnfSuffix2502_bits, 1 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_75_in_ebnfSuffix2514 */ -static ANTLR3_BITWORD FOLLOW_75_in_ebnfSuffix2514_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -static ANTLR3_BITSET_LIST FOLLOW_75_in_ebnfSuffix2514 = { FOLLOW_75_in_ebnfSuffix2514_bits, 1 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_76_in_ebnfSuffix2527 */ -static ANTLR3_BITWORD FOLLOW_76_in_ebnfSuffix2527_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -static ANTLR3_BITSET_LIST FOLLOW_76_in_ebnfSuffix2527 = { FOLLOW_76_in_ebnfSuffix2527_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_76_in_ebnfSuffix2514 */ +static ANTLR3_BITWORD FOLLOW_76_in_ebnfSuffix2514_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; +static ANTLR3_BITSET_LIST FOLLOW_76_in_ebnfSuffix2514 = { FOLLOW_76_in_ebnfSuffix2514_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_77_in_ebnfSuffix2527 */ +static ANTLR3_BITWORD FOLLOW_77_in_ebnfSuffix2527_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; +static ANTLR3_BITSET_LIST FOLLOW_77_in_ebnfSuffix2527 = { FOLLOW_77_in_ebnfSuffix2527_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_REWRITE_V3TOK_in_rewrite2551 */ -static ANTLR3_BITWORD FOLLOW_REWRITE_V3TOK_in_rewrite2551_bits[] = { ANTLR3_UINT64_LIT(0x0100000000000000) }; +static ANTLR3_BITWORD FOLLOW_REWRITE_V3TOK_in_rewrite2551_bits[] = { ANTLR3_UINT64_LIT(0x0200000000000000) }; static ANTLR3_BITSET_LIST FOLLOW_REWRITE_V3TOK_in_rewrite2551 = { FOLLOW_REWRITE_V3TOK_in_rewrite2551_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_SEMPRED_V3TOK_in_rewrite2555 */ -static ANTLR3_BITWORD FOLLOW_SEMPRED_V3TOK_in_rewrite2555_bits[] = { ANTLR3_UINT64_LIT(0x1028000000020010), ANTLR3_UINT64_LIT(0x000000000000030C) }; +static ANTLR3_BITWORD FOLLOW_SEMPRED_V3TOK_in_rewrite2555_bits[] = { ANTLR3_UINT64_LIT(0x2050000000020010), ANTLR3_UINT64_LIT(0x0000000000000618) }; static ANTLR3_BITSET_LIST FOLLOW_SEMPRED_V3TOK_in_rewrite2555 = { FOLLOW_SEMPRED_V3TOK_in_rewrite2555_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_alternative_in_rewrite2559 */ -static ANTLR3_BITWORD FOLLOW_rewrite_alternative_in_rewrite2559_bits[] = { ANTLR3_UINT64_LIT(0x0008000000000000) }; +static ANTLR3_BITWORD FOLLOW_rewrite_alternative_in_rewrite2559_bits[] = { ANTLR3_UINT64_LIT(0x0010000000000000) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_alternative_in_rewrite2559 = { FOLLOW_rewrite_alternative_in_rewrite2559_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_REWRITE_V3TOK_in_rewrite2567 */ -static ANTLR3_BITWORD FOLLOW_REWRITE_V3TOK_in_rewrite2567_bits[] = { ANTLR3_UINT64_LIT(0x1020000000020010), ANTLR3_UINT64_LIT(0x000000000000030C) }; +static ANTLR3_BITWORD FOLLOW_REWRITE_V3TOK_in_rewrite2567_bits[] = { ANTLR3_UINT64_LIT(0x2040000000020010), ANTLR3_UINT64_LIT(0x0000000000000618) }; static ANTLR3_BITSET_LIST FOLLOW_REWRITE_V3TOK_in_rewrite2567 = { FOLLOW_REWRITE_V3TOK_in_rewrite2567_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_alternative_in_rewrite2571 */ static ANTLR3_BITWORD FOLLOW_rewrite_alternative_in_rewrite2571_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; @@ -1334,29 +1334,29 @@ /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_tree_alternative_in_rewrite_alternative2627 */ static ANTLR3_BITWORD FOLLOW_rewrite_tree_alternative_in_rewrite_alternative2627_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_tree_alternative_in_rewrite_alternative2627 = { FOLLOW_rewrite_tree_alternative_in_rewrite_alternative2627_bits, 1 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_73_in_rewrite_tree_block2669 */ -static ANTLR3_BITWORD FOLLOW_73_in_rewrite_tree_block2669_bits[] = { ANTLR3_UINT64_LIT(0x1020000000020010), ANTLR3_UINT64_LIT(0x000000000000030C) }; -static ANTLR3_BITSET_LIST FOLLOW_73_in_rewrite_tree_block2669 = { FOLLOW_73_in_rewrite_tree_block2669_bits, 2 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_rewrite_tree_block2669 */ +static ANTLR3_BITWORD FOLLOW_74_in_rewrite_tree_block2669_bits[] = { ANTLR3_UINT64_LIT(0x2040000000020010), ANTLR3_UINT64_LIT(0x0000000000000618) }; +static ANTLR3_BITSET_LIST FOLLOW_74_in_rewrite_tree_block2669 = { FOLLOW_74_in_rewrite_tree_block2669_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_tree_alternative_in_rewrite_tree_block2671 */ -static ANTLR3_BITWORD FOLLOW_rewrite_tree_alternative_in_rewrite_tree_block2671_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) }; +static ANTLR3_BITWORD FOLLOW_rewrite_tree_alternative_in_rewrite_tree_block2671_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000800) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_tree_alternative_in_rewrite_tree_block2671 = { FOLLOW_rewrite_tree_alternative_in_rewrite_tree_block2671_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_rewrite_tree_block2673 */ -static ANTLR3_BITWORD FOLLOW_74_in_rewrite_tree_block2673_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -static ANTLR3_BITSET_LIST FOLLOW_74_in_rewrite_tree_block2673 = { FOLLOW_74_in_rewrite_tree_block2673_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_75_in_rewrite_tree_block2673 */ +static ANTLR3_BITWORD FOLLOW_75_in_rewrite_tree_block2673_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; +static ANTLR3_BITSET_LIST FOLLOW_75_in_rewrite_tree_block2673 = { FOLLOW_75_in_rewrite_tree_block2673_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_tree_element_in_rewrite_tree_alternative2707 */ -static ANTLR3_BITWORD FOLLOW_rewrite_tree_element_in_rewrite_tree_alternative2707_bits[] = { ANTLR3_UINT64_LIT(0x1020000000020012), ANTLR3_UINT64_LIT(0x000000000000030C) }; +static ANTLR3_BITWORD FOLLOW_rewrite_tree_element_in_rewrite_tree_alternative2707_bits[] = { ANTLR3_UINT64_LIT(0x2040000000020012), ANTLR3_UINT64_LIT(0x0000000000000618) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_tree_element_in_rewrite_tree_alternative2707 = { FOLLOW_rewrite_tree_element_in_rewrite_tree_alternative2707_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2735 */ static ANTLR3_BITWORD FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2735_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2735 = { FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2735_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2740 */ -static ANTLR3_BITWORD FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2740_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000201800) }; +static ANTLR3_BITWORD FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2740_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000203000) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2740 = { FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2740_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ebnfSuffix_in_rewrite_tree_element2742 */ static ANTLR3_BITWORD FOLLOW_ebnfSuffix_in_rewrite_tree_element2742_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_ebnfSuffix_in_rewrite_tree_element2742 = { FOLLOW_ebnfSuffix_in_rewrite_tree_element2742_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_tree_in_rewrite_tree_element2776 */ -static ANTLR3_BITWORD FOLLOW_rewrite_tree_in_rewrite_tree_element2776_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000201800) }; +static ANTLR3_BITWORD FOLLOW_rewrite_tree_in_rewrite_tree_element2776_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000203000) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_tree_in_rewrite_tree_element2776 = { FOLLOW_rewrite_tree_in_rewrite_tree_element2776_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ebnfSuffix_in_rewrite_tree_element2782 */ static ANTLR3_BITWORD FOLLOW_ebnfSuffix_in_rewrite_tree_element2782_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; @@ -1379,9 +1379,9 @@ /** Bitset defining follow set for error recovery in rule state: FOLLOW_STRING_LITERAL_in_rewrite_tree_atom2881 */ static ANTLR3_BITWORD FOLLOW_STRING_LITERAL_in_rewrite_tree_atom2881_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_STRING_LITERAL_in_rewrite_tree_atom2881 = { FOLLOW_STRING_LITERAL_in_rewrite_tree_atom2881_bits, 1 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_72_in_rewrite_tree_atom2890 */ -static ANTLR3_BITWORD FOLLOW_72_in_rewrite_tree_atom2890_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; -static ANTLR3_BITSET_LIST FOLLOW_72_in_rewrite_tree_atom2890 = { FOLLOW_72_in_rewrite_tree_atom2890_bits, 2 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_73_in_rewrite_tree_atom2890 */ +static ANTLR3_BITWORD FOLLOW_73_in_rewrite_tree_atom2890_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; +static ANTLR3_BITSET_LIST FOLLOW_73_in_rewrite_tree_atom2890 = { FOLLOW_73_in_rewrite_tree_atom2890_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_rewrite_tree_atom2892 */ static ANTLR3_BITWORD FOLLOW_id_in_rewrite_tree_atom2892_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_rewrite_tree_atom2892 = { FOLLOW_id_in_rewrite_tree_atom2892_bits, 1 }; @@ -1389,35 +1389,35 @@ static ANTLR3_BITWORD FOLLOW_ACTION_in_rewrite_tree_atom2903_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_ACTION_in_rewrite_tree_atom2903 = { FOLLOW_ACTION_in_rewrite_tree_atom2903_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_tree_block_in_rewrite_tree_ebnf2924 */ -static ANTLR3_BITWORD FOLLOW_rewrite_tree_block_in_rewrite_tree_ebnf2924_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000201800) }; +static ANTLR3_BITWORD FOLLOW_rewrite_tree_block_in_rewrite_tree_ebnf2924_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000203000) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_tree_block_in_rewrite_tree_ebnf2924 = { FOLLOW_rewrite_tree_block_in_rewrite_tree_ebnf2924_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ebnfSuffix_in_rewrite_tree_ebnf2926 */ static ANTLR3_BITWORD FOLLOW_ebnfSuffix_in_rewrite_tree_ebnf2926_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_ebnfSuffix_in_rewrite_tree_ebnf2926 = { FOLLOW_ebnfSuffix_in_rewrite_tree_ebnf2926_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_TREE_BEGIN_V3TOK_in_rewrite_tree2946 */ -static ANTLR3_BITWORD FOLLOW_TREE_BEGIN_V3TOK_in_rewrite_tree2946_bits[] = { ANTLR3_UINT64_LIT(0x1020000000020010), ANTLR3_UINT64_LIT(0x0000000000000104) }; +static ANTLR3_BITWORD FOLLOW_TREE_BEGIN_V3TOK_in_rewrite_tree2946_bits[] = { ANTLR3_UINT64_LIT(0x2040000000020010), ANTLR3_UINT64_LIT(0x0000000000000208) }; static ANTLR3_BITSET_LIST FOLLOW_TREE_BEGIN_V3TOK_in_rewrite_tree2946 = { FOLLOW_TREE_BEGIN_V3TOK_in_rewrite_tree2946_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_tree_atom_in_rewrite_tree2948 */ -static ANTLR3_BITWORD FOLLOW_rewrite_tree_atom_in_rewrite_tree2948_bits[] = { ANTLR3_UINT64_LIT(0x1020000000020010), ANTLR3_UINT64_LIT(0x000000000000070C) }; +static ANTLR3_BITWORD FOLLOW_rewrite_tree_atom_in_rewrite_tree2948_bits[] = { ANTLR3_UINT64_LIT(0x2040000000020010), ANTLR3_UINT64_LIT(0x0000000000000E18) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_tree_atom_in_rewrite_tree2948 = { FOLLOW_rewrite_tree_atom_in_rewrite_tree2948_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_tree_element_in_rewrite_tree2950 */ -static ANTLR3_BITWORD FOLLOW_rewrite_tree_element_in_rewrite_tree2950_bits[] = { ANTLR3_UINT64_LIT(0x1020000000020010), ANTLR3_UINT64_LIT(0x000000000000070C) }; +static ANTLR3_BITWORD FOLLOW_rewrite_tree_element_in_rewrite_tree2950_bits[] = { ANTLR3_UINT64_LIT(0x2040000000020010), ANTLR3_UINT64_LIT(0x0000000000000E18) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_tree_element_in_rewrite_tree2950 = { FOLLOW_rewrite_tree_element_in_rewrite_tree2950_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_rewrite_tree2953 */ -static ANTLR3_BITWORD FOLLOW_74_in_rewrite_tree2953_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -static ANTLR3_BITSET_LIST FOLLOW_74_in_rewrite_tree2953 = { FOLLOW_74_in_rewrite_tree2953_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_75_in_rewrite_tree2953 */ +static ANTLR3_BITWORD FOLLOW_75_in_rewrite_tree2953_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; +static ANTLR3_BITSET_LIST FOLLOW_75_in_rewrite_tree2953 = { FOLLOW_75_in_rewrite_tree2953_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_rewrite_template2985 */ -static ANTLR3_BITWORD FOLLOW_id_in_rewrite_template2985_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000200) }; +static ANTLR3_BITWORD FOLLOW_id_in_rewrite_template2985_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_rewrite_template2985 = { FOLLOW_id_in_rewrite_template2985_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_73_in_rewrite_template2989 */ -static ANTLR3_BITWORD FOLLOW_73_in_rewrite_template2989_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000404) }; -static ANTLR3_BITSET_LIST FOLLOW_73_in_rewrite_template2989 = { FOLLOW_73_in_rewrite_template2989_bits, 2 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_rewrite_template2989 */ +static ANTLR3_BITWORD FOLLOW_74_in_rewrite_template2989_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000808) }; +static ANTLR3_BITSET_LIST FOLLOW_74_in_rewrite_template2989 = { FOLLOW_74_in_rewrite_template2989_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_template_args_in_rewrite_template2991 */ -static ANTLR3_BITWORD FOLLOW_rewrite_template_args_in_rewrite_template2991_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) }; +static ANTLR3_BITWORD FOLLOW_rewrite_template_args_in_rewrite_template2991_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000800) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_template_args_in_rewrite_template2991 = { FOLLOW_rewrite_template_args_in_rewrite_template2991_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_rewrite_template2993 */ -static ANTLR3_BITWORD FOLLOW_74_in_rewrite_template2993_bits[] = { ANTLR3_UINT64_LIT(0x0000000000C00000) }; -static ANTLR3_BITSET_LIST FOLLOW_74_in_rewrite_template2993 = { FOLLOW_74_in_rewrite_template2993_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_75_in_rewrite_template2993 */ +static ANTLR3_BITWORD FOLLOW_75_in_rewrite_template2993_bits[] = { ANTLR3_UINT64_LIT(0x0000000001800000) }; +static ANTLR3_BITSET_LIST FOLLOW_75_in_rewrite_template2993 = { FOLLOW_75_in_rewrite_template2993_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_DOUBLE_QUOTE_STRING_LITERAL_in_rewrite_template3001 */ static ANTLR3_BITWORD FOLLOW_DOUBLE_QUOTE_STRING_LITERAL_in_rewrite_template3001_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_DOUBLE_QUOTE_STRING_LITERAL_in_rewrite_template3001 = { FOLLOW_DOUBLE_QUOTE_STRING_LITERAL_in_rewrite_template3001_bits, 1 }; @@ -1434,46 +1434,46 @@ static ANTLR3_BITWORD FOLLOW_ACTION_in_rewrite_template3052_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_ACTION_in_rewrite_template3052 = { FOLLOW_ACTION_in_rewrite_template3052_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_rewrite_template_ref3065 */ -static ANTLR3_BITWORD FOLLOW_id_in_rewrite_template_ref3065_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000200) }; +static ANTLR3_BITWORD FOLLOW_id_in_rewrite_template_ref3065_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_rewrite_template_ref3065 = { FOLLOW_id_in_rewrite_template_ref3065_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_73_in_rewrite_template_ref3069 */ -static ANTLR3_BITWORD FOLLOW_73_in_rewrite_template_ref3069_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000404) }; -static ANTLR3_BITSET_LIST FOLLOW_73_in_rewrite_template_ref3069 = { FOLLOW_73_in_rewrite_template_ref3069_bits, 2 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_rewrite_template_ref3069 */ +static ANTLR3_BITWORD FOLLOW_74_in_rewrite_template_ref3069_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000808) }; +static ANTLR3_BITSET_LIST FOLLOW_74_in_rewrite_template_ref3069 = { FOLLOW_74_in_rewrite_template_ref3069_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_template_args_in_rewrite_template_ref3071 */ -static ANTLR3_BITWORD FOLLOW_rewrite_template_args_in_rewrite_template_ref3071_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) }; +static ANTLR3_BITWORD FOLLOW_rewrite_template_args_in_rewrite_template_ref3071_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000800) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_template_args_in_rewrite_template_ref3071 = { FOLLOW_rewrite_template_args_in_rewrite_template_ref3071_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_rewrite_template_ref3073 */ -static ANTLR3_BITWORD FOLLOW_74_in_rewrite_template_ref3073_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -static ANTLR3_BITSET_LIST FOLLOW_74_in_rewrite_template_ref3073 = { FOLLOW_74_in_rewrite_template_ref3073_bits, 1 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_73_in_rewrite_indirect_template_head3101 */ -static ANTLR3_BITWORD FOLLOW_73_in_rewrite_indirect_template_head3101_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000010) }; -static ANTLR3_BITSET_LIST FOLLOW_73_in_rewrite_indirect_template_head3101 = { FOLLOW_73_in_rewrite_indirect_template_head3101_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_75_in_rewrite_template_ref3073 */ +static ANTLR3_BITWORD FOLLOW_75_in_rewrite_template_ref3073_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; +static ANTLR3_BITSET_LIST FOLLOW_75_in_rewrite_template_ref3073 = { FOLLOW_75_in_rewrite_template_ref3073_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_rewrite_indirect_template_head3101 */ +static ANTLR3_BITWORD FOLLOW_74_in_rewrite_indirect_template_head3101_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000010) }; +static ANTLR3_BITSET_LIST FOLLOW_74_in_rewrite_indirect_template_head3101 = { FOLLOW_74_in_rewrite_indirect_template_head3101_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_ACTION_in_rewrite_indirect_template_head3103 */ -static ANTLR3_BITWORD FOLLOW_ACTION_in_rewrite_indirect_template_head3103_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) }; +static ANTLR3_BITWORD FOLLOW_ACTION_in_rewrite_indirect_template_head3103_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000800) }; static ANTLR3_BITSET_LIST FOLLOW_ACTION_in_rewrite_indirect_template_head3103 = { FOLLOW_ACTION_in_rewrite_indirect_template_head3103_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_rewrite_indirect_template_head3105 */ -static ANTLR3_BITWORD FOLLOW_74_in_rewrite_indirect_template_head3105_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000200) }; -static ANTLR3_BITSET_LIST FOLLOW_74_in_rewrite_indirect_template_head3105 = { FOLLOW_74_in_rewrite_indirect_template_head3105_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_73_in_rewrite_indirect_template_head3107 */ -static ANTLR3_BITWORD FOLLOW_73_in_rewrite_indirect_template_head3107_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000404) }; -static ANTLR3_BITSET_LIST FOLLOW_73_in_rewrite_indirect_template_head3107 = { FOLLOW_73_in_rewrite_indirect_template_head3107_bits, 2 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_75_in_rewrite_indirect_template_head3105 */ +static ANTLR3_BITWORD FOLLOW_75_in_rewrite_indirect_template_head3105_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) }; +static ANTLR3_BITSET_LIST FOLLOW_75_in_rewrite_indirect_template_head3105 = { FOLLOW_75_in_rewrite_indirect_template_head3105_bits, 2 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_rewrite_indirect_template_head3107 */ +static ANTLR3_BITWORD FOLLOW_74_in_rewrite_indirect_template_head3107_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000808) }; +static ANTLR3_BITSET_LIST FOLLOW_74_in_rewrite_indirect_template_head3107 = { FOLLOW_74_in_rewrite_indirect_template_head3107_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_template_args_in_rewrite_indirect_template_head3109 */ -static ANTLR3_BITWORD FOLLOW_rewrite_template_args_in_rewrite_indirect_template_head3109_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) }; +static ANTLR3_BITWORD FOLLOW_rewrite_template_args_in_rewrite_indirect_template_head3109_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000800) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_template_args_in_rewrite_indirect_template_head3109 = { FOLLOW_rewrite_template_args_in_rewrite_indirect_template_head3109_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_74_in_rewrite_indirect_template_head3111 */ -static ANTLR3_BITWORD FOLLOW_74_in_rewrite_indirect_template_head3111_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -static ANTLR3_BITSET_LIST FOLLOW_74_in_rewrite_indirect_template_head3111 = { FOLLOW_74_in_rewrite_indirect_template_head3111_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_75_in_rewrite_indirect_template_head3111 */ +static ANTLR3_BITWORD FOLLOW_75_in_rewrite_indirect_template_head3111_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; +static ANTLR3_BITSET_LIST FOLLOW_75_in_rewrite_indirect_template_head3111 = { FOLLOW_75_in_rewrite_indirect_template_head3111_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_template_arg_in_rewrite_template_args3135 */ -static ANTLR3_BITWORD FOLLOW_rewrite_template_arg_in_rewrite_template_args3135_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000002000) }; +static ANTLR3_BITWORD FOLLOW_rewrite_template_arg_in_rewrite_template_args3135_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_template_arg_in_rewrite_template_args3135 = { FOLLOW_rewrite_template_arg_in_rewrite_template_args3135_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_77_in_rewrite_template_args3138 */ -static ANTLR3_BITWORD FOLLOW_77_in_rewrite_template_args3138_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; -static ANTLR3_BITSET_LIST FOLLOW_77_in_rewrite_template_args3138 = { FOLLOW_77_in_rewrite_template_args3138_bits, 2 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_78_in_rewrite_template_args3138 */ +static ANTLR3_BITWORD FOLLOW_78_in_rewrite_template_args3138_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; +static ANTLR3_BITSET_LIST FOLLOW_78_in_rewrite_template_args3138 = { FOLLOW_78_in_rewrite_template_args3138_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_template_arg_in_rewrite_template_args3140 */ -static ANTLR3_BITWORD FOLLOW_rewrite_template_arg_in_rewrite_template_args3140_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000002000) }; +static ANTLR3_BITWORD FOLLOW_rewrite_template_arg_in_rewrite_template_args3140_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_template_arg_in_rewrite_template_args3140 = { FOLLOW_rewrite_template_arg_in_rewrite_template_args3140_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_rewrite_template_arg3173 */ -static ANTLR3_BITWORD FOLLOW_id_in_rewrite_template_arg3173_bits[] = { ANTLR3_UINT64_LIT(0x0000000400000000) }; +static ANTLR3_BITWORD FOLLOW_id_in_rewrite_template_arg3173_bits[] = { ANTLR3_UINT64_LIT(0x0000000800000000) }; static ANTLR3_BITSET_LIST FOLLOW_id_in_rewrite_template_arg3173 = { FOLLOW_id_in_rewrite_template_arg3173_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_LABEL_ASSIGN_V3TOK_in_rewrite_template_arg3175 */ static ANTLR3_BITWORD FOLLOW_LABEL_ASSIGN_V3TOK_in_rewrite_template_arg3175_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000010) }; @@ -1482,14 +1482,14 @@ static ANTLR3_BITWORD FOLLOW_ACTION_in_rewrite_template_arg3177_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_ACTION_in_rewrite_template_arg3177 = { FOLLOW_ACTION_in_rewrite_template_arg3177_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_qid3198 */ -static ANTLR3_BITWORD FOLLOW_id_in_qid3198_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) }; -static ANTLR3_BITSET_LIST FOLLOW_id_in_qid3198 = { FOLLOW_id_in_qid3198_bits, 2 }; -/** Bitset defining follow set for error recovery in rule state: FOLLOW_78_in_qid3201 */ -static ANTLR3_BITWORD FOLLOW_78_in_qid3201_bits[] = { ANTLR3_UINT64_LIT(0x0020000000000000), ANTLR3_UINT64_LIT(0x0000000000000004) }; -static ANTLR3_BITSET_LIST FOLLOW_78_in_qid3201 = { FOLLOW_78_in_qid3201_bits, 2 }; +static ANTLR3_BITWORD FOLLOW_id_in_qid3198_bits[] = { ANTLR3_UINT64_LIT(0x0000000000400002) }; +static ANTLR3_BITSET_LIST FOLLOW_id_in_qid3198 = { FOLLOW_id_in_qid3198_bits, 1 }; +/** Bitset defining follow set for error recovery in rule state: FOLLOW_DOT_SYM_in_qid3201 */ +static ANTLR3_BITWORD FOLLOW_DOT_SYM_in_qid3201_bits[] = { ANTLR3_UINT64_LIT(0x0040000000000000), ANTLR3_UINT64_LIT(0x0000000000000008) }; +static ANTLR3_BITSET_LIST FOLLOW_DOT_SYM_in_qid3201 = { FOLLOW_DOT_SYM_in_qid3201_bits, 2 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_id_in_qid3203 */ -static ANTLR3_BITWORD FOLLOW_id_in_qid3203_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) }; -static ANTLR3_BITSET_LIST FOLLOW_id_in_qid3203 = { FOLLOW_id_in_qid3203_bits, 2 }; +static ANTLR3_BITWORD FOLLOW_id_in_qid3203_bits[] = { ANTLR3_UINT64_LIT(0x0000000000400002) }; +static ANTLR3_BITSET_LIST FOLLOW_id_in_qid3203 = { FOLLOW_id_in_qid3203_bits, 1 }; /** Bitset defining follow set for error recovery in rule state: FOLLOW_rewrite_template_in_synpred100_ANTLRv32622 */ static ANTLR3_BITWORD FOLLOW_rewrite_template_in_synpred100_ANTLRv32622_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; static ANTLR3_BITSET_LIST FOLLOW_rewrite_template_in_synpred100_ANTLRv32622 = { FOLLOW_rewrite_template_in_synpred100_ANTLRv32622_bits, 1 }; @@ -1515,11 +1515,11 @@ }; static const ANTLR3_INT32 dfa82_min[15] = { - 4, 73, -1, -1, 53, 34, 22, 4, -1, -1, 74, 53, 34, 4, 74 + 4, 74, -1, -1, 54, 35, 23, 4, -1, -1, 75, 54, 35, 4, 75 }; static const ANTLR3_INT32 dfa82_max[15] = { - 73, 73, -1, -1, 74, 34, 94, 4, -1, -1, 77, 66, 34, 4, 77 + 74, 74, -1, -1, 75, 35, 94, 4, -1, -1, 78, 67, 35, 4, 78 }; static const ANTLR3_INT32 dfa82_accept[15] = { @@ -1548,7 +1548,7 @@ 8, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1, - -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9 + -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9 }; static const ANTLR3_INT32 dfa82_T3[] = @@ -1566,8 +1566,8 @@ { 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 2 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 2 }; static const ANTLR3_INT32 dfa82_T6[] = @@ -1634,7 +1634,7 @@ */ /** * $ANTLR start grammarDef - * ./ANTLRv3.g:122:1: grammarDef : ( DOC_COMMENT_V3TOK )? ( 'lexer' | 'parser' | 'tree' |) g= 'grammar' id ';' ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ EOF -> ^( $g id ( DOC_COMMENT_V3TOK )? ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ ) ; + * ANTLRv3.g:122:1: grammarDef : ( DOC_COMMENT_V3TOK )? ( 'lexer' | 'parser' | 'tree' |) g= 'grammar' id ';' ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ EOF -> ^( $g id ( DOC_COMMENT_V3TOK )? ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ ) ; */ static ANTLRv3Parser_grammarDef_return grammarDef(pANTLRv3Parser ctx) @@ -1759,10 +1759,10 @@ retval.tree = NULL; { - // ./ANTLRv3.g:122:11: ( ( DOC_COMMENT_V3TOK )? ( 'lexer' | 'parser' | 'tree' |) g= 'grammar' id ';' ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ EOF -> ^( $g id ( DOC_COMMENT_V3TOK )? ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ ) ) - // ./ANTLRv3.g:123:2: ( DOC_COMMENT_V3TOK )? ( 'lexer' | 'parser' | 'tree' |) g= 'grammar' id ';' ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ EOF + // ANTLRv3.g:122:11: ( ( DOC_COMMENT_V3TOK )? ( 'lexer' | 'parser' | 'tree' |) g= 'grammar' id ';' ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ EOF -> ^( $g id ( DOC_COMMENT_V3TOK )? ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ ) ) + // ANTLRv3.g:123:2: ( DOC_COMMENT_V3TOK )? ( 'lexer' | 'parser' | 'tree' |) g= 'grammar' id ';' ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ EOF { - // ./ANTLRv3.g:123:2: ( DOC_COMMENT_V3TOK )? + // ANTLRv3.g:123:2: ( DOC_COMMENT_V3TOK )? { int alt1=2; switch ( LA(1) ) @@ -1777,7 +1777,7 @@ switch (alt1) { case 1: - // ./ANTLRv3.g:123:2: DOC_COMMENT_V3TOK + // ANTLRv3.g:123:2: DOC_COMMENT_V3TOK { DOC_COMMENT_V3TOK1 = (pANTLR3_COMMON_TOKEN) MATCHT(DOC_COMMENT_V3TOK, &FOLLOW_DOC_COMMENT_V3TOK_in_grammarDef392); if (HASEXCEPTION()) @@ -1798,7 +1798,7 @@ } } - // ./ANTLRv3.g:124:5: ( 'lexer' | 'parser' | 'tree' |) + // ANTLRv3.g:124:5: ( 'lexer' | 'parser' | 'tree' |) { int alt2=4; switch ( LA(1) ) @@ -1845,7 +1845,7 @@ switch (alt2) { case 1: - // ./ANTLRv3.g:125:6: 'lexer' + // ANTLRv3.g:125:6: 'lexer' { string_literal2 = (pANTLR3_COMMON_TOKEN) MATCHT(87, &FOLLOW_87_in_grammarDef406); if (HASEXCEPTION()) @@ -1869,7 +1869,7 @@ } break; case 2: - // ./ANTLRv3.g:126:8: 'parser' + // ANTLRv3.g:126:8: 'parser' { string_literal3 = (pANTLR3_COMMON_TOKEN) MATCHT(88, &FOLLOW_88_in_grammarDef422); if (HASEXCEPTION()) @@ -1893,7 +1893,7 @@ } break; case 3: - // ./ANTLRv3.g:127:8: 'tree' + // ANTLRv3.g:127:8: 'tree' { string_literal4 = (pANTLR3_COMMON_TOKEN) MATCHT(93, &FOLLOW_93_in_grammarDef436); if (HASEXCEPTION()) @@ -1917,7 +1917,7 @@ } break; case 4: - // ./ANTLRv3.g:128:8: + // ANTLRv3.g:128:8: { if ( BACKTRACKING==0 ) { @@ -1972,7 +1972,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_81; stream_81->add(stream_81, char_literal6, NULL); } - // ./ANTLRv3.g:130:23: ( optionsSpec )? + // ANTLRv3.g:130:23: ( optionsSpec )? { int alt3=2; switch ( LA(1) ) @@ -1987,7 +1987,7 @@ switch (alt3) { case 1: - // ./ANTLRv3.g:130:23: optionsSpec + // ANTLRv3.g:130:23: optionsSpec { FOLLOWPUSH(FOLLOW_optionsSpec_in_grammarDef474); optionsSpec7=optionsSpec(ctx); @@ -2010,7 +2010,7 @@ } } - // ./ANTLRv3.g:130:36: ( tokensSpec )? + // ANTLRv3.g:130:36: ( tokensSpec )? { int alt4=2; switch ( LA(1) ) @@ -2025,7 +2025,7 @@ switch (alt4) { case 1: - // ./ANTLRv3.g:130:36: tokensSpec + // ANTLRv3.g:130:36: tokensSpec { FOLLOWPUSH(FOLLOW_tokensSpec_in_grammarDef477); tokensSpec8=tokensSpec(ctx); @@ -2048,7 +2048,7 @@ } } - // ./ANTLRv3.g:130:48: ( attrScope )* + // ANTLRv3.g:130:48: ( attrScope )* for (;;) { @@ -2066,7 +2066,7 @@ switch (alt5) { case 1: - // ./ANTLRv3.g:130:48: attrScope + // ANTLRv3.g:130:48: attrScope { FOLLOWPUSH(FOLLOW_attrScope_in_grammarDef480); attrScope9=attrScope(ctx); @@ -2094,7 +2094,7 @@ loop5: ; /* Jump out to here if this rule does not match */ - // ./ANTLRv3.g:130:59: ( action )* + // ANTLRv3.g:130:59: ( action )* for (;;) { @@ -2112,7 +2112,7 @@ switch (alt6) { case 1: - // ./ANTLRv3.g:130:59: action + // ANTLRv3.g:130:59: action { FOLLOWPUSH(FOLLOW_action_in_grammarDef483); action10=action(ctx); @@ -2140,7 +2140,7 @@ loop6: ; /* Jump out to here if this rule does not match */ - // ./ANTLRv3.g:130:67: ( rule )+ + // ANTLRv3.g:130:67: ( rule )+ { int cnt7=0; @@ -2166,7 +2166,7 @@ switch (alt7) { case 1: - // ./ANTLRv3.g:130:67: rule + // ANTLRv3.g:130:67: rule { FOLLOWPUSH(FOLLOW_rule_in_grammarDef486); rule11=rule(ctx); @@ -2232,7 +2232,7 @@ /* AST REWRITE - * elements : optionsSpec, DOC_COMMENT_V3TOK, action, tokensSpec, id, rule, g, attrScope + * elements : id, action, rule, tokensSpec, g, DOC_COMMENT_V3TOK, attrScope, optionsSpec * token labels : g * rule labels : retval * token list labels : @@ -2251,14 +2251,14 @@ retval.tree = root_0; // 132:6: -> ^( $g id ( DOC_COMMENT_V3TOK )? ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ ) { - // ./ANTLRv3.g:132:9: ^( $g id ( DOC_COMMENT_V3TOK )? ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ ) + // ANTLRv3.g:132:9: ^( $g id ( DOC_COMMENT_V3TOK )? ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRootToken(ADAPTOR, stream_g == NULL ? NULL : stream_g->nextToken(stream_g), root_1)); ADAPTOR->addChild(ADAPTOR, root_1, stream_id == NULL ? NULL : stream_id->nextTree(stream_id)); - // ./ANTLRv3.g:133:15: ( DOC_COMMENT_V3TOK )? + // ANTLRv3.g:133:15: ( DOC_COMMENT_V3TOK )? { if ( (stream_DOC_COMMENT_V3TOK != NULL && stream_DOC_COMMENT_V3TOK->hasNext(stream_DOC_COMMENT_V3TOK)) ) { @@ -2271,7 +2271,7 @@ } - // ./ANTLRv3.g:133:34: ( optionsSpec )? + // ANTLRv3.g:133:34: ( optionsSpec )? { if ( (stream_optionsSpec != NULL && stream_optionsSpec->hasNext(stream_optionsSpec)) ) { @@ -2282,7 +2282,7 @@ } - // ./ANTLRv3.g:133:47: ( tokensSpec )? + // ANTLRv3.g:133:47: ( tokensSpec )? { if ( (stream_tokensSpec != NULL && stream_tokensSpec->hasNext(stream_tokensSpec)) ) { @@ -2293,7 +2293,7 @@ } - // ./ANTLRv3.g:133:59: ( attrScope )* + // ANTLRv3.g:133:59: ( attrScope )* { while ( (stream_attrScope != NULL && stream_attrScope->hasNext(stream_attrScope)) ) { @@ -2304,7 +2304,7 @@ } - // ./ANTLRv3.g:133:70: ( action )* + // ANTLRv3.g:133:70: ( action )* { while ( (stream_action != NULL && stream_action->hasNext(stream_action)) ) { @@ -2388,7 +2388,7 @@ /** * $ANTLR start tokensSpec - * ./ANTLRv3.g:137:1: tokensSpec : TOKENS ( tokenSpec )+ '}' -> ^( TOKENS ( tokenSpec )+ ) ; + * ANTLRv3.g:137:1: tokensSpec : TOKENS ( tokenSpec )+ '}' -> ^( TOKENS ( tokenSpec )+ ) ; */ static ANTLRv3Parser_tokensSpec_return tokensSpec(pANTLRv3Parser ctx) @@ -2433,8 +2433,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:138:2: ( TOKENS ( tokenSpec )+ '}' -> ^( TOKENS ( tokenSpec )+ ) ) - // ./ANTLRv3.g:138:4: TOKENS ( tokenSpec )+ '}' + // ANTLRv3.g:138:2: ( TOKENS ( tokenSpec )+ '}' -> ^( TOKENS ( tokenSpec )+ ) ) + // ANTLRv3.g:138:4: TOKENS ( tokenSpec )+ '}' { TOKENS13 = (pANTLR3_COMMON_TOKEN) MATCHT(TOKENS, &FOLLOW_TOKENS_in_tokensSpec550); if (HASEXCEPTION()) @@ -2449,7 +2449,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_TOKENS; stream_TOKENS->add(stream_TOKENS, TOKENS13, NULL); } - // ./ANTLRv3.g:138:11: ( tokenSpec )+ + // ANTLRv3.g:138:11: ( tokenSpec )+ { int cnt8=0; @@ -2469,7 +2469,7 @@ switch (alt8) { case 1: - // ./ANTLRv3.g:138:11: tokenSpec + // ANTLRv3.g:138:11: tokenSpec { FOLLOWPUSH(FOLLOW_tokenSpec_in_tokensSpec552); tokenSpec14=tokenSpec(ctx); @@ -2529,7 +2529,7 @@ /* AST REWRITE - * elements : tokenSpec, TOKENS + * elements : TOKENS, tokenSpec * token labels : * rule labels : retval * token list labels : @@ -2546,7 +2546,7 @@ retval.tree = root_0; // 138:26: -> ^( TOKENS ( tokenSpec )+ ) { - // ./ANTLRv3.g:138:29: ^( TOKENS ( tokenSpec )+ ) + // ANTLRv3.g:138:29: ^( TOKENS ( tokenSpec )+ ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -2615,7 +2615,7 @@ /** * $ANTLR start tokenSpec - * ./ANTLRv3.g:141:1: tokenSpec : TOKEN_REF ( '=' (lit= STRING_LITERAL |lit= CHAR_LITERAL ) -> ^( '=' TOKEN_REF $lit) | -> TOKEN_REF ) ';' ; + * ANTLRv3.g:141:1: tokenSpec : TOKEN_REF ( '=' (lit= STRING_LITERAL |lit= CHAR_LITERAL ) -> ^( '=' TOKEN_REF $lit) | -> TOKEN_REF ) ';' ; */ static ANTLRv3Parser_tokenSpec_return tokenSpec(pANTLRv3Parser ctx) @@ -2671,8 +2671,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:142:2: ( TOKEN_REF ( '=' (lit= STRING_LITERAL |lit= CHAR_LITERAL ) -> ^( '=' TOKEN_REF $lit) | -> TOKEN_REF ) ';' ) - // ./ANTLRv3.g:142:4: TOKEN_REF ( '=' (lit= STRING_LITERAL |lit= CHAR_LITERAL ) -> ^( '=' TOKEN_REF $lit) | -> TOKEN_REF ) ';' + // ANTLRv3.g:142:2: ( TOKEN_REF ( '=' (lit= STRING_LITERAL |lit= CHAR_LITERAL ) -> ^( '=' TOKEN_REF $lit) | -> TOKEN_REF ) ';' ) + // ANTLRv3.g:142:4: TOKEN_REF ( '=' (lit= STRING_LITERAL |lit= CHAR_LITERAL ) -> ^( '=' TOKEN_REF $lit) | -> TOKEN_REF ) ';' { TOKEN_REF16 = (pANTLR3_COMMON_TOKEN) MATCHT(TOKEN_REF, &FOLLOW_TOKEN_REF_in_tokenSpec575); if (HASEXCEPTION()) @@ -2687,7 +2687,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_TOKEN_REF; stream_TOKEN_REF->add(stream_TOKEN_REF, TOKEN_REF16, NULL); } - // ./ANTLRv3.g:143:3: ( '=' (lit= STRING_LITERAL |lit= CHAR_LITERAL ) -> ^( '=' TOKEN_REF $lit) | -> TOKEN_REF ) + // ANTLRv3.g:143:3: ( '=' (lit= STRING_LITERAL |lit= CHAR_LITERAL ) -> ^( '=' TOKEN_REF $lit) | -> TOKEN_REF ) { int alt10=2; switch ( LA(1) ) @@ -2724,7 +2724,7 @@ switch (alt10) { case 1: - // ./ANTLRv3.g:143:5: '=' (lit= STRING_LITERAL |lit= CHAR_LITERAL ) + // ANTLRv3.g:143:5: '=' (lit= STRING_LITERAL |lit= CHAR_LITERAL ) { char_literal17 = (pANTLR3_COMMON_TOKEN) MATCHT(LABEL_ASSIGN_V3TOK, &FOLLOW_LABEL_ASSIGN_V3TOK_in_tokenSpec581); if (HASEXCEPTION()) @@ -2739,7 +2739,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_LABEL_ASSIGN_V3TOK; stream_LABEL_ASSIGN_V3TOK->add(stream_LABEL_ASSIGN_V3TOK, char_literal17, NULL); } - // ./ANTLRv3.g:143:9: (lit= STRING_LITERAL |lit= CHAR_LITERAL ) + // ANTLRv3.g:143:9: (lit= STRING_LITERAL |lit= CHAR_LITERAL ) { int alt9=2; switch ( LA(1) ) @@ -2776,7 +2776,7 @@ switch (alt9) { case 1: - // ./ANTLRv3.g:143:10: lit= STRING_LITERAL + // ANTLRv3.g:143:10: lit= STRING_LITERAL { lit = (pANTLR3_COMMON_TOKEN) MATCHT(STRING_LITERAL, &FOLLOW_STRING_LITERAL_in_tokenSpec586); if (HASEXCEPTION()) @@ -2794,7 +2794,7 @@ } break; case 2: - // ./ANTLRv3.g:143:29: lit= CHAR_LITERAL + // ANTLRv3.g:143:29: lit= CHAR_LITERAL { lit = (pANTLR3_COMMON_TOKEN) MATCHT(CHAR_LITERAL, &FOLLOW_CHAR_LITERAL_in_tokenSpec590); if (HASEXCEPTION()) @@ -2816,7 +2816,7 @@ } /* AST REWRITE - * elements : TOKEN_REF, lit, LABEL_ASSIGN_V3TOK + * elements : LABEL_ASSIGN_V3TOK, TOKEN_REF, lit * token labels : lit * rule labels : retval * token list labels : @@ -2835,7 +2835,7 @@ retval.tree = root_0; // 143:47: -> ^( '=' TOKEN_REF $lit) { - // ./ANTLRv3.g:143:50: ^( '=' TOKEN_REF $lit) + // ANTLRv3.g:143:50: ^( '=' TOKEN_REF $lit) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -2863,7 +2863,7 @@ } break; case 2: - // ./ANTLRv3.g:144:16: + // ANTLRv3.g:144:16: { /* AST REWRITE * elements : TOKEN_REF @@ -2952,7 +2952,7 @@ /** * $ANTLR start attrScope - * ./ANTLRv3.g:149:1: attrScope : 'scope' id ACTION -> ^( 'scope' id ACTION ) ; + * ANTLRv3.g:149:1: attrScope : 'scope' id ACTION -> ^( 'scope' id ACTION ) ; */ static ANTLRv3Parser_attrScope_return attrScope(pANTLRv3Parser ctx) @@ -2997,8 +2997,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:150:2: ( 'scope' id ACTION -> ^( 'scope' id ACTION ) ) - // ./ANTLRv3.g:150:4: 'scope' id ACTION + // ANTLRv3.g:150:2: ( 'scope' id ACTION -> ^( 'scope' id ACTION ) ) + // ANTLRv3.g:150:4: 'scope' id ACTION { string_literal19 = (pANTLR3_COMMON_TOKEN) MATCHT(SCOPE_V3TOK, &FOLLOW_SCOPE_V3TOK_in_attrScope640); if (HASEXCEPTION()) @@ -3042,7 +3042,7 @@ /* AST REWRITE - * elements : ACTION, SCOPE_V3TOK, id + * elements : ACTION, id, SCOPE_V3TOK * token labels : * rule labels : retval * token list labels : @@ -3059,7 +3059,7 @@ retval.tree = root_0; // 150:22: -> ^( 'scope' id ACTION ) { - // ./ANTLRv3.g:150:25: ^( 'scope' id ACTION ) + // ANTLRv3.g:150:25: ^( 'scope' id ACTION ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -3119,7 +3119,7 @@ /** * $ANTLR start action - * ./ANTLRv3.g:154:1: action : '@' ( actionScopeName '::' )? id ACTION -> ^( '@' ( actionScopeName )? id ACTION ) ; + * ANTLRv3.g:154:1: action : '@' ( actionScopeName '::' )? id ACTION -> ^( '@' ( actionScopeName )? id ACTION ) ; */ static ANTLRv3Parser_action_return action(pANTLRv3Parser ctx) @@ -3180,8 +3180,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:155:2: ( '@' ( actionScopeName '::' )? id ACTION -> ^( '@' ( actionScopeName )? id ACTION ) ) - // ./ANTLRv3.g:155:4: '@' ( actionScopeName '::' )? id ACTION + // ANTLRv3.g:155:2: ( '@' ( actionScopeName '::' )? id ACTION -> ^( '@' ( actionScopeName )? id ACTION ) ) + // ANTLRv3.g:155:4: '@' ( actionScopeName '::' )? id ACTION { char_literal22 = (pANTLR3_COMMON_TOKEN) MATCHT(AT_V3TOK, &FOLLOW_AT_V3TOK_in_action667); if (HASEXCEPTION()) @@ -3196,7 +3196,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_AT_V3TOK; stream_AT_V3TOK->add(stream_AT_V3TOK, char_literal22, NULL); } - // ./ANTLRv3.g:155:8: ( actionScopeName '::' )? + // ANTLRv3.g:155:8: ( actionScopeName '::' )? { int alt11=2; switch ( LA(1) ) @@ -3226,7 +3226,7 @@ switch (alt11) { case 1: - // ./ANTLRv3.g:155:9: actionScopeName '::' + // ANTLRv3.g:155:9: actionScopeName '::' { FOLLOWPUSH(FOLLOW_actionScopeName_in_action670); actionScopeName23=actionScopeName(ctx); @@ -3291,7 +3291,7 @@ /* AST REWRITE - * elements : actionScopeName, id, AT_V3TOK, ACTION + * elements : AT_V3TOK, id, actionScopeName, ACTION * token labels : * rule labels : retval * token list labels : @@ -3308,14 +3308,14 @@ retval.tree = root_0; // 155:42: -> ^( '@' ( actionScopeName )? id ACTION ) { - // ./ANTLRv3.g:155:45: ^( '@' ( actionScopeName )? id ACTION ) + // ANTLRv3.g:155:45: ^( '@' ( actionScopeName )? id ACTION ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_AT_V3TOK == NULL ? NULL : stream_AT_V3TOK->nextNode(stream_AT_V3TOK) , root_1)); - // ./ANTLRv3.g:155:51: ( actionScopeName )? + // ANTLRv3.g:155:51: ( actionScopeName )? { if ( (stream_actionScopeName != NULL && stream_actionScopeName->hasNext(stream_actionScopeName)) ) { @@ -3381,7 +3381,7 @@ /** * $ANTLR start actionScopeName - * ./ANTLRv3.g:161:1: actionScopeName : ( id |l= 'lexer' |p= 'parser' ); + * ANTLRv3.g:161:1: actionScopeName : ( id |l= 'lexer' |p= 'parser' ); */ static ANTLRv3Parser_actionScopeName_return actionScopeName(pANTLRv3Parser ctx) @@ -3419,7 +3419,7 @@ { { - // ./ANTLRv3.g:161:16: ( id |l= 'lexer' |p= 'parser' ) + // ANTLRv3.g:161:16: ( id |l= 'lexer' |p= 'parser' ) ANTLR3_UINT32 alt12; @@ -3465,7 +3465,7 @@ switch (alt12) { case 1: - // ./ANTLRv3.g:162:2: id + // ANTLRv3.g:162:2: id { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -3488,7 +3488,7 @@ } break; case 2: - // ./ANTLRv3.g:163:4: l= 'lexer' + // ANTLRv3.g:163:4: l= 'lexer' { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -3511,7 +3511,7 @@ } break; case 3: - // ./ANTLRv3.g:164:9: p= 'parser' + // ANTLRv3.g:164:9: p= 'parser' { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -3575,7 +3575,7 @@ /** * $ANTLR start optionsSpec - * ./ANTLRv3.g:173:1: optionsSpec : OPTIONS ( option ';' )+ '}' -> ^( OPTIONS ( option )+ ) ; + * ANTLRv3.g:173:1: optionsSpec : OPTIONS ( option ';' )+ '}' -> ^( OPTIONS ( option )+ ) ; */ static ANTLRv3Parser_optionsSpec_return optionsSpec(pANTLRv3Parser ctx) @@ -3627,8 +3627,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:174:2: ( OPTIONS ( option ';' )+ '}' -> ^( OPTIONS ( option )+ ) ) - // ./ANTLRv3.g:174:4: OPTIONS ( option ';' )+ '}' + // ANTLRv3.g:174:2: ( OPTIONS ( option ';' )+ '}' -> ^( OPTIONS ( option )+ ) ) + // ANTLRv3.g:174:4: OPTIONS ( option ';' )+ '}' { OPTIONS28 = (pANTLR3_COMMON_TOKEN) MATCHT(OPTIONS, &FOLLOW_OPTIONS_in_optionsSpec742); if (HASEXCEPTION()) @@ -3643,7 +3643,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_OPTIONS; stream_OPTIONS->add(stream_OPTIONS, OPTIONS28, NULL); } - // ./ANTLRv3.g:174:12: ( option ';' )+ + // ANTLRv3.g:174:12: ( option ';' )+ { int cnt13=0; @@ -3664,7 +3664,7 @@ switch (alt13) { case 1: - // ./ANTLRv3.g:174:13: option ';' + // ANTLRv3.g:174:13: option ';' { FOLLOWPUSH(FOLLOW_option_in_optionsSpec745); option29=option(ctx); @@ -3754,7 +3754,7 @@ retval.tree = root_0; // 174:30: -> ^( OPTIONS ( option )+ ) { - // ./ANTLRv3.g:174:33: ^( OPTIONS ( option )+ ) + // ANTLRv3.g:174:33: ^( OPTIONS ( option )+ ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -3824,7 +3824,7 @@ /** * $ANTLR start option - * ./ANTLRv3.g:177:1: option : id '=' optionValue -> ^( '=' id optionValue ) ; + * ANTLRv3.g:177:1: option : id '=' optionValue -> ^( '=' id optionValue ) ; */ static ANTLRv3Parser_option_return option(pANTLRv3Parser ctx) @@ -3871,8 +3871,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:178:5: ( id '=' optionValue -> ^( '=' id optionValue ) ) - // ./ANTLRv3.g:178:9: id '=' optionValue + // ANTLRv3.g:178:5: ( id '=' optionValue -> ^( '=' id optionValue ) ) + // ANTLRv3.g:178:9: id '=' optionValue { FOLLOWPUSH(FOLLOW_id_in_option776); id32=id(ctx); @@ -3918,7 +3918,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_optionValue; stream_optionValue->add(stream_optionValue, optionValue34.tree, NULL); } /* AST REWRITE - * elements : id, LABEL_ASSIGN_V3TOK, optionValue + * elements : LABEL_ASSIGN_V3TOK, optionValue, id * token labels : * rule labels : retval * token list labels : @@ -3935,7 +3935,7 @@ retval.tree = root_0; // 178:28: -> ^( '=' id optionValue ) { - // ./ANTLRv3.g:178:31: ^( '=' id optionValue ) + // ANTLRv3.g:178:31: ^( '=' id optionValue ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -3993,7 +3993,7 @@ /** * $ANTLR start optionValue - * ./ANTLRv3.g:181:1: optionValue : ( qid | STRING_LITERAL | CHAR_LITERAL | INT |s= '*' -> STRING_LITERAL[$s] ); + * ANTLRv3.g:181:1: optionValue : ( qid | STRING_LITERAL | CHAR_LITERAL | INT |s= '*' -> STRING_LITERAL[$s] ); */ static ANTLRv3Parser_optionValue_return optionValue(pANTLRv3Parser ctx) @@ -4015,7 +4015,7 @@ pANTLR3_BASE_TREE STRING_LITERAL36_tree; pANTLR3_BASE_TREE CHAR_LITERAL37_tree; pANTLR3_BASE_TREE INT38_tree; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_75; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_76; /* Initialize rule variables */ @@ -4035,14 +4035,14 @@ CHAR_LITERAL37_tree = NULL; INT38_tree = NULL; - stream_75 = NULL; - #define CREATE_stream_75 if (stream_75 == NULL) {stream_75 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 75"); } + stream_76 = NULL; + #define CREATE_stream_76 if (stream_76 == NULL) {stream_76 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 76"); } retval.tree = NULL; { { - // ./ANTLRv3.g:182:5: ( qid | STRING_LITERAL | CHAR_LITERAL | INT |s= '*' -> STRING_LITERAL[$s] ) + // ANTLRv3.g:182:5: ( qid | STRING_LITERAL | CHAR_LITERAL | INT |s= '*' -> STRING_LITERAL[$s] ) ANTLR3_UINT32 alt14; @@ -4071,7 +4071,7 @@ alt14=4; } break; - case 75: + case 76: { alt14=5; } @@ -4098,7 +4098,7 @@ switch (alt14) { case 1: - // ./ANTLRv3.g:182:9: qid + // ANTLRv3.g:182:9: qid { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -4121,7 +4121,7 @@ } break; case 2: - // ./ANTLRv3.g:183:9: STRING_LITERAL + // ANTLRv3.g:183:9: STRING_LITERAL { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -4144,7 +4144,7 @@ } break; case 3: - // ./ANTLRv3.g:184:9: CHAR_LITERAL + // ANTLRv3.g:184:9: CHAR_LITERAL { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -4167,7 +4167,7 @@ } break; case 4: - // ./ANTLRv3.g:185:9: INT + // ANTLRv3.g:185:9: INT { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -4190,9 +4190,9 @@ } break; case 5: - // ./ANTLRv3.g:186:7: s= '*' + // ANTLRv3.g:186:7: s= '*' { - s = (pANTLR3_COMMON_TOKEN) MATCHT(75, &FOLLOW_75_in_optionValue849); + s = (pANTLR3_COMMON_TOKEN) MATCHT(76, &FOLLOW_76_in_optionValue849); if (HASEXCEPTION()) { goto ruleoptionValueEx; @@ -4202,7 +4202,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_75; stream_75->add(stream_75, s, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_76; stream_76->add(stream_76, s, NULL); } /* AST REWRITE @@ -4262,7 +4262,7 @@ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); - if (stream_75 != NULL) stream_75->free(stream_75); + if (stream_76 != NULL) stream_76->free(stream_76); } @@ -4278,7 +4278,7 @@ /** * $ANTLR start rule - * ./ANTLRv3.g:189:1: rule : ( DOC_COMMENT_V3TOK )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( BANG_V3TOK )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )? -> ^( RULE_V3TOK id ( ^( ARG_V3TOK[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR_V3TOK[\"EORu\"] ) ; + * ANTLRv3.g:189:1: rule : ( DOC_COMMENT_V3TOK )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( BANG_V3TOK )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )? -> ^( RULE_V3TOK id ( ^( ARG_V3TOK[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR_V3TOK[\"EORu\"] ) ; */ static ANTLRv3Parser_rule_return rule(pANTLRv3Parser ctx) @@ -4441,10 +4441,10 @@ retval.tree = NULL; { - // ./ANTLRv3.g:193:2: ( ( DOC_COMMENT_V3TOK )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( BANG_V3TOK )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )? -> ^( RULE_V3TOK id ( ^( ARG_V3TOK[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR_V3TOK[\"EORu\"] ) ) - // ./ANTLRv3.g:193:4: ( DOC_COMMENT_V3TOK )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( BANG_V3TOK )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )? + // ANTLRv3.g:193:2: ( ( DOC_COMMENT_V3TOK )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( BANG_V3TOK )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )? -> ^( RULE_V3TOK id ( ^( ARG_V3TOK[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR_V3TOK[\"EORu\"] ) ) + // ANTLRv3.g:193:4: ( DOC_COMMENT_V3TOK )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( BANG_V3TOK )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )? { - // ./ANTLRv3.g:193:4: ( DOC_COMMENT_V3TOK )? + // ANTLRv3.g:193:4: ( DOC_COMMENT_V3TOK )? { int alt15=2; switch ( LA(1) ) @@ -4459,7 +4459,7 @@ switch (alt15) { case 1: - // ./ANTLRv3.g:193:4: DOC_COMMENT_V3TOK + // ANTLRv3.g:193:4: DOC_COMMENT_V3TOK { DOC_COMMENT_V3TOK39 = (pANTLR3_COMMON_TOKEN) MATCHT(DOC_COMMENT_V3TOK, &FOLLOW_DOC_COMMENT_V3TOK_in_rule874); if (HASEXCEPTION()) @@ -4482,7 +4482,7 @@ } } - // ./ANTLRv3.g:194:3: (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? + // ANTLRv3.g:194:3: (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? { int alt17=2; switch ( LA(1) ) @@ -4500,9 +4500,9 @@ switch (alt17) { case 1: - // ./ANTLRv3.g:194:5: modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) + // ANTLRv3.g:194:5: modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) { - // ./ANTLRv3.g:194:14: ( 'protected' | 'public' | 'private' | 'fragment' ) + // ANTLRv3.g:194:14: ( 'protected' | 'public' | 'private' | 'fragment' ) { int alt16=4; switch ( LA(1) ) @@ -4551,7 +4551,7 @@ switch (alt16) { case 1: - // ./ANTLRv3.g:194:15: 'protected' + // ANTLRv3.g:194:15: 'protected' { string_literal40 = (pANTLR3_COMMON_TOKEN) MATCHT(90, &FOLLOW_90_in_rule884); if (HASEXCEPTION()) @@ -4571,7 +4571,7 @@ } break; case 2: - // ./ANTLRv3.g:194:27: 'public' + // ANTLRv3.g:194:27: 'public' { string_literal41 = (pANTLR3_COMMON_TOKEN) MATCHT(91, &FOLLOW_91_in_rule886); if (HASEXCEPTION()) @@ -4591,7 +4591,7 @@ } break; case 3: - // ./ANTLRv3.g:194:36: 'private' + // ANTLRv3.g:194:36: 'private' { string_literal42 = (pANTLR3_COMMON_TOKEN) MATCHT(89, &FOLLOW_89_in_rule888); if (HASEXCEPTION()) @@ -4611,7 +4611,7 @@ } break; case 4: - // ./ANTLRv3.g:194:46: 'fragment' + // ANTLRv3.g:194:46: 'fragment' { string_literal43 = (pANTLR3_COMMON_TOKEN) MATCHT(FRAGMENT_V3TOK, &FOLLOW_FRAGMENT_V3TOK_in_rule890); if (HASEXCEPTION()) @@ -4665,7 +4665,7 @@ } - // ./ANTLRv3.g:196:3: ( BANG_V3TOK )? + // ANTLRv3.g:196:3: ( BANG_V3TOK )? { int alt18=2; switch ( LA(1) ) @@ -4680,7 +4680,7 @@ switch (alt18) { case 1: - // ./ANTLRv3.g:196:3: BANG_V3TOK + // ANTLRv3.g:196:3: BANG_V3TOK { BANG_V3TOK45 = (pANTLR3_COMMON_TOKEN) MATCHT(BANG_V3TOK, &FOLLOW_BANG_V3TOK_in_rule904); if (HASEXCEPTION()) @@ -4703,7 +4703,7 @@ } } - // ./ANTLRv3.g:197:3: (arg= ARG_ACTION )? + // ANTLRv3.g:197:3: (arg= ARG_ACTION )? { int alt19=2; switch ( LA(1) ) @@ -4718,7 +4718,7 @@ switch (alt19) { case 1: - // ./ANTLRv3.g:197:5: arg= ARG_ACTION + // ANTLRv3.g:197:5: arg= ARG_ACTION { arg = (pANTLR3_COMMON_TOKEN) MATCHT(ARG_ACTION, &FOLLOW_ARG_ACTION_in_rule913); if (HASEXCEPTION()) @@ -4741,7 +4741,7 @@ } } - // ./ANTLRv3.g:198:3: ( 'returns' rt= ARG_ACTION )? + // ANTLRv3.g:198:3: ( 'returns' rt= ARG_ACTION )? { int alt20=2; switch ( LA(1) ) @@ -4756,7 +4756,7 @@ switch (alt20) { case 1: - // ./ANTLRv3.g:198:5: 'returns' rt= ARG_ACTION + // ANTLRv3.g:198:5: 'returns' rt= ARG_ACTION { string_literal46 = (pANTLR3_COMMON_TOKEN) MATCHT(RET_V3TOK, &FOLLOW_RET_V3TOK_in_rule922); if (HASEXCEPTION()) @@ -4794,7 +4794,7 @@ } } - // ./ANTLRv3.g:199:3: ( throwsSpec )? + // ANTLRv3.g:199:3: ( throwsSpec )? { int alt21=2; switch ( LA(1) ) @@ -4809,7 +4809,7 @@ switch (alt21) { case 1: - // ./ANTLRv3.g:199:3: throwsSpec + // ANTLRv3.g:199:3: throwsSpec { FOLLOWPUSH(FOLLOW_throwsSpec_in_rule934); throwsSpec47=throwsSpec(ctx); @@ -4834,7 +4834,7 @@ } } - // ./ANTLRv3.g:199:15: ( optionsSpec )? + // ANTLRv3.g:199:15: ( optionsSpec )? { int alt22=2; switch ( LA(1) ) @@ -4849,7 +4849,7 @@ switch (alt22) { case 1: - // ./ANTLRv3.g:199:15: optionsSpec + // ANTLRv3.g:199:15: optionsSpec { FOLLOWPUSH(FOLLOW_optionsSpec_in_rule937); optionsSpec48=optionsSpec(ctx); @@ -4874,7 +4874,7 @@ } } - // ./ANTLRv3.g:199:28: ( ruleScopeSpec )? + // ANTLRv3.g:199:28: ( ruleScopeSpec )? { int alt23=2; switch ( LA(1) ) @@ -4889,7 +4889,7 @@ switch (alt23) { case 1: - // ./ANTLRv3.g:199:28: ruleScopeSpec + // ANTLRv3.g:199:28: ruleScopeSpec { FOLLOWPUSH(FOLLOW_ruleScopeSpec_in_rule940); ruleScopeSpec49=ruleScopeSpec(ctx); @@ -4914,7 +4914,7 @@ } } - // ./ANTLRv3.g:199:43: ( ruleAction )* + // ANTLRv3.g:199:43: ( ruleAction )* for (;;) { @@ -4932,7 +4932,7 @@ switch (alt24) { case 1: - // ./ANTLRv3.g:199:43: ruleAction + // ANTLRv3.g:199:43: ruleAction { FOLLOWPUSH(FOLLOW_ruleAction_in_rule943); ruleAction50=ruleAction(ctx); @@ -5009,7 +5009,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_81; stream_81->add(stream_81, char_literal53, NULL); } - // ./ANTLRv3.g:201:3: ( exceptionGroup )? + // ANTLRv3.g:201:3: ( exceptionGroup )? { int alt25=2; switch ( LA(1) ) @@ -5025,7 +5025,7 @@ switch (alt25) { case 1: - // ./ANTLRv3.g:201:3: exceptionGroup + // ANTLRv3.g:201:3: exceptionGroup { FOLLOWPUSH(FOLLOW_exceptionGroup_in_rule956); exceptionGroup54=exceptionGroup(ctx); @@ -5051,7 +5051,7 @@ } /* AST REWRITE - * elements : id, ruleAction, arg, altList, RET_V3TOK, rt, optionsSpec, exceptionGroup, ruleScopeSpec, throwsSpec + * elements : id, ruleScopeSpec, arg, altList, exceptionGroup, optionsSpec, throwsSpec, ruleAction, rt, RET_V3TOK * token labels : arg, rt * rule labels : retval * token list labels : @@ -5072,7 +5072,7 @@ retval.tree = root_0; // 202:6: -> ^( RULE_V3TOK id ( ^( ARG_V3TOK[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR_V3TOK[\"EORu\"] ) { - // ./ANTLRv3.g:202:9: ^( RULE_V3TOK id ( ^( ARG_V3TOK[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR_V3TOK[\"EORu\"] ) + // ANTLRv3.g:202:9: ^( RULE_V3TOK id ( ^( ARG_V3TOK[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR_V3TOK[\"EORu\"] ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -5081,11 +5081,11 @@ ADAPTOR->addChild(ADAPTOR, root_1, stream_id == NULL ? NULL : stream_id->nextTree(stream_id)); - // ./ANTLRv3.g:202:26: ( ^( ARG_V3TOK[$arg] $arg) )? + // ANTLRv3.g:202:26: ( ^( ARG_V3TOK[$arg] $arg) )? { if ( (stream_arg != NULL && stream_arg->hasNext(stream_arg)) ) { - // ./ANTLRv3.g:202:26: ^( ARG_V3TOK[$arg] $arg) + // ANTLRv3.g:202:26: ^( ARG_V3TOK[$arg] $arg) { pANTLR3_BASE_TREE root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -5108,11 +5108,11 @@ } - // ./ANTLRv3.g:202:51: ( ^( 'returns' $rt) )? + // ANTLRv3.g:202:51: ( ^( 'returns' $rt) )? { - if ( (stream_RET_V3TOK != NULL && stream_RET_V3TOK->hasNext(stream_RET_V3TOK)) || (stream_rt != NULL && stream_rt->hasNext(stream_rt)) ) + if ( (stream_rt != NULL && stream_rt->hasNext(stream_rt)) || (stream_RET_V3TOK != NULL && stream_RET_V3TOK->hasNext(stream_RET_V3TOK)) ) { - // ./ANTLRv3.g:202:51: ^( 'returns' $rt) + // ANTLRv3.g:202:51: ^( 'returns' $rt) { pANTLR3_BASE_TREE root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -5125,12 +5125,12 @@ } } - if ( stream_RET_V3TOK != NULL) stream_RET_V3TOK->reset(stream_RET_V3TOK); if ( stream_rt != NULL) stream_rt->reset(stream_rt); + if ( stream_RET_V3TOK != NULL) stream_RET_V3TOK->reset(stream_RET_V3TOK); } - // ./ANTLRv3.g:203:9: ( throwsSpec )? + // ANTLRv3.g:203:9: ( throwsSpec )? { if ( (stream_throwsSpec != NULL && stream_throwsSpec->hasNext(stream_throwsSpec)) ) { @@ -5141,7 +5141,7 @@ } - // ./ANTLRv3.g:203:21: ( optionsSpec )? + // ANTLRv3.g:203:21: ( optionsSpec )? { if ( (stream_optionsSpec != NULL && stream_optionsSpec->hasNext(stream_optionsSpec)) ) { @@ -5152,7 +5152,7 @@ } - // ./ANTLRv3.g:203:34: ( ruleScopeSpec )? + // ANTLRv3.g:203:34: ( ruleScopeSpec )? { if ( (stream_ruleScopeSpec != NULL && stream_ruleScopeSpec->hasNext(stream_ruleScopeSpec)) ) { @@ -5163,7 +5163,7 @@ } - // ./ANTLRv3.g:203:49: ( ruleAction )* + // ANTLRv3.g:203:49: ( ruleAction )* { while ( (stream_ruleAction != NULL && stream_ruleAction->hasNext(stream_ruleAction)) ) { @@ -5176,7 +5176,7 @@ ADAPTOR->addChild(ADAPTOR, root_1, stream_altList == NULL ? NULL : stream_altList->nextTree(stream_altList)); - // ./ANTLRv3.g:205:9: ( exceptionGroup )? + // ANTLRv3.g:205:9: ( exceptionGroup )? { if ( (stream_exceptionGroup != NULL && stream_exceptionGroup->hasNext(stream_exceptionGroup)) ) { @@ -5262,7 +5262,7 @@ /** * $ANTLR start ruleAction - * ./ANTLRv3.g:211:1: ruleAction : '@' id ACTION -> ^( '@' id ACTION ) ; + * ANTLRv3.g:211:1: ruleAction : '@' id ACTION -> ^( '@' id ACTION ) ; */ static ANTLRv3Parser_ruleAction_return ruleAction(pANTLRv3Parser ctx) @@ -5307,8 +5307,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:212:2: ( '@' id ACTION -> ^( '@' id ACTION ) ) - // ./ANTLRv3.g:212:4: '@' id ACTION + // ANTLRv3.g:212:2: ( '@' id ACTION -> ^( '@' id ACTION ) ) + // ANTLRv3.g:212:4: '@' id ACTION { char_literal55 = (pANTLR3_COMMON_TOKEN) MATCHT(AT_V3TOK, &FOLLOW_AT_V3TOK_in_ruleAction1060); if (HASEXCEPTION()) @@ -5352,7 +5352,7 @@ /* AST REWRITE - * elements : AT_V3TOK, id, ACTION + * elements : id, ACTION, AT_V3TOK * token labels : * rule labels : retval * token list labels : @@ -5369,7 +5369,7 @@ retval.tree = root_0; // 212:18: -> ^( '@' id ACTION ) { - // ./ANTLRv3.g:212:21: ^( '@' id ACTION ) + // ANTLRv3.g:212:21: ^( '@' id ACTION ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -5429,7 +5429,7 @@ /** * $ANTLR start throwsSpec - * ./ANTLRv3.g:215:1: throwsSpec : 'throws' id ( ',' id )* -> ^( 'throws' ( id )+ ) ; + * ANTLRv3.g:215:1: throwsSpec : 'throws' id ( ',' id )* -> ^( 'throws' ( id )+ ) ; */ static ANTLRv3Parser_throwsSpec_return throwsSpec(pANTLRv3Parser ctx) @@ -5451,7 +5451,7 @@ pANTLR3_BASE_TREE string_literal58_tree; pANTLR3_BASE_TREE char_literal60_tree; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_77; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_78; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_92; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_id; /* Initialize rule variables @@ -5470,8 +5470,8 @@ string_literal58_tree = NULL; char_literal60_tree = NULL; - stream_77 = NULL; - #define CREATE_stream_77 if (stream_77 == NULL) {stream_77 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 77"); } + stream_78 = NULL; + #define CREATE_stream_78 if (stream_78 == NULL) {stream_78 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 78"); } stream_92 = NULL; #define CREATE_stream_92 if (stream_92 == NULL) {stream_92 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 92"); } stream_id = NULL; @@ -5480,8 +5480,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:216:2: ( 'throws' id ( ',' id )* -> ^( 'throws' ( id )+ ) ) - // ./ANTLRv3.g:216:4: 'throws' id ( ',' id )* + // ANTLRv3.g:216:2: ( 'throws' id ( ',' id )* -> ^( 'throws' ( id )+ ) ) + // ANTLRv3.g:216:4: 'throws' id ( ',' id )* { string_literal58 = (pANTLR3_COMMON_TOKEN) MATCHT(92, &FOLLOW_92_in_throwsSpec1085); if (HASEXCEPTION()) @@ -5511,14 +5511,14 @@ if ( BACKTRACKING==0 ) { CREATE_stream_id; stream_id->add(stream_id, id59.tree, NULL); } - // ./ANTLRv3.g:216:16: ( ',' id )* + // ANTLRv3.g:216:16: ( ',' id )* for (;;) { int alt26=2; switch ( LA(1) ) { - case 77: + case 78: { alt26=1; } @@ -5529,9 +5529,9 @@ switch (alt26) { case 1: - // ./ANTLRv3.g:216:18: ',' id + // ANTLRv3.g:216:18: ',' id { - char_literal60 = (pANTLR3_COMMON_TOKEN) MATCHT(77, &FOLLOW_77_in_throwsSpec1091); + char_literal60 = (pANTLR3_COMMON_TOKEN) MATCHT(78, &FOLLOW_78_in_throwsSpec1091); if (HASEXCEPTION()) { goto rulethrowsSpecEx; @@ -5541,7 +5541,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_77; stream_77->add(stream_77, char_literal60, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_78; stream_78->add(stream_78, char_literal60, NULL); } FOLLOWPUSH(FOLLOW_id_in_throwsSpec1093); @@ -5588,7 +5588,7 @@ retval.tree = root_0; // 216:28: -> ^( 'throws' ( id )+ ) { - // ./ANTLRv3.g:216:31: ^( 'throws' ( id )+ ) + // ANTLRv3.g:216:31: ^( 'throws' ( id )+ ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -5639,7 +5639,7 @@ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); - if (stream_77 != NULL) stream_77->free(stream_77); + if (stream_78 != NULL) stream_78->free(stream_78); if (stream_92 != NULL) stream_92->free(stream_92); if (stream_id != NULL) stream_id->free(stream_id); } @@ -5657,7 +5657,7 @@ /** * $ANTLR start ruleScopeSpec - * ./ANTLRv3.g:219:1: ruleScopeSpec : ( 'scope' ACTION -> ^( 'scope' ACTION ) | 'scope' id ( ',' id )* ';' -> ^( 'scope' ( id )+ ) | 'scope' ACTION 'scope' id ( ',' id )* ';' -> ^( 'scope' ACTION ( id )+ ) ); + * ANTLRv3.g:219:1: ruleScopeSpec : ( 'scope' ACTION -> ^( 'scope' ACTION ) | 'scope' id ( ',' id )* ';' -> ^( 'scope' ( id )+ ) | 'scope' ACTION 'scope' id ( ',' id )* ';' -> ^( 'scope' ACTION ( id )+ ) ); */ static ANTLRv3Parser_ruleScopeSpec_return ruleScopeSpec(pANTLRv3Parser ctx) @@ -5703,7 +5703,7 @@ pANTLR3_BASE_TREE string_literal71_tree; pANTLR3_BASE_TREE char_literal73_tree; pANTLR3_BASE_TREE char_literal75_tree; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_77; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_78; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_81; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_ACTION; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_SCOPE_V3TOK; @@ -5744,8 +5744,8 @@ char_literal73_tree = NULL; char_literal75_tree = NULL; - stream_77 = NULL; - #define CREATE_stream_77 if (stream_77 == NULL) {stream_77 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 77"); } + stream_78 = NULL; + #define CREATE_stream_78 if (stream_78 == NULL) {stream_78 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 78"); } stream_81 = NULL; #define CREATE_stream_81 if (stream_81 == NULL) {stream_81 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 81"); } stream_ACTION = NULL; @@ -5759,7 +5759,7 @@ { { - // ./ANTLRv3.g:220:2: ( 'scope' ACTION -> ^( 'scope' ACTION ) | 'scope' id ( ',' id )* ';' -> ^( 'scope' ( id )+ ) | 'scope' ACTION 'scope' id ( ',' id )* ';' -> ^( 'scope' ACTION ( id )+ ) ) + // ANTLRv3.g:220:2: ( 'scope' ACTION -> ^( 'scope' ACTION ) | 'scope' id ( ',' id )* ';' -> ^( 'scope' ( id )+ ) | 'scope' ACTION 'scope' id ( ',' id )* ';' -> ^( 'scope' ACTION ( id )+ ) ) ANTLR3_UINT32 alt29; @@ -5857,7 +5857,7 @@ switch (alt29) { case 1: - // ./ANTLRv3.g:220:4: 'scope' ACTION + // ANTLRv3.g:220:4: 'scope' ACTION { string_literal62 = (pANTLR3_COMMON_TOKEN) MATCHT(SCOPE_V3TOK, &FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1116); if (HASEXCEPTION()) @@ -5886,7 +5886,7 @@ /* AST REWRITE - * elements : SCOPE_V3TOK, ACTION + * elements : ACTION, SCOPE_V3TOK * token labels : * rule labels : retval * token list labels : @@ -5903,7 +5903,7 @@ retval.tree = root_0; // 220:19: -> ^( 'scope' ACTION ) { - // ./ANTLRv3.g:220:22: ^( 'scope' ACTION ) + // ANTLRv3.g:220:22: ^( 'scope' ACTION ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -5928,7 +5928,7 @@ } break; case 2: - // ./ANTLRv3.g:221:4: 'scope' id ( ',' id )* ';' + // ANTLRv3.g:221:4: 'scope' id ( ',' id )* ';' { string_literal64 = (pANTLR3_COMMON_TOKEN) MATCHT(SCOPE_V3TOK, &FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1131); if (HASEXCEPTION()) @@ -5958,14 +5958,14 @@ if ( BACKTRACKING==0 ) { CREATE_stream_id; stream_id->add(stream_id, id65.tree, NULL); } - // ./ANTLRv3.g:221:15: ( ',' id )* + // ANTLRv3.g:221:15: ( ',' id )* for (;;) { int alt27=2; switch ( LA(1) ) { - case 77: + case 78: { alt27=1; } @@ -5976,9 +5976,9 @@ switch (alt27) { case 1: - // ./ANTLRv3.g:221:16: ',' id + // ANTLRv3.g:221:16: ',' id { - char_literal66 = (pANTLR3_COMMON_TOKEN) MATCHT(77, &FOLLOW_77_in_ruleScopeSpec1136); + char_literal66 = (pANTLR3_COMMON_TOKEN) MATCHT(78, &FOLLOW_78_in_ruleScopeSpec1136); if (HASEXCEPTION()) { goto ruleruleScopeSpecEx; @@ -5988,7 +5988,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_77; stream_77->add(stream_77, char_literal66, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_78; stream_78->add(stream_78, char_literal66, NULL); } FOLLOWPUSH(FOLLOW_id_in_ruleScopeSpec1138); @@ -6048,7 +6048,7 @@ retval.tree = root_0; // 221:29: -> ^( 'scope' ( id )+ ) { - // ./ANTLRv3.g:221:32: ^( 'scope' ( id )+ ) + // ANTLRv3.g:221:32: ^( 'scope' ( id )+ ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -6084,7 +6084,7 @@ } break; case 3: - // ./ANTLRv3.g:222:4: 'scope' ACTION 'scope' id ( ',' id )* ';' + // ANTLRv3.g:222:4: 'scope' ACTION 'scope' id ( ',' id )* ';' { string_literal69 = (pANTLR3_COMMON_TOKEN) MATCHT(SCOPE_V3TOK, &FOLLOW_SCOPE_V3TOK_in_ruleScopeSpec1156); if (HASEXCEPTION()) @@ -6140,14 +6140,14 @@ if ( BACKTRACKING==0 ) { CREATE_stream_id; stream_id->add(stream_id, id72.tree, NULL); } - // ./ANTLRv3.g:223:14: ( ',' id )* + // ANTLRv3.g:223:14: ( ',' id )* for (;;) { int alt28=2; switch ( LA(1) ) { - case 77: + case 78: { alt28=1; } @@ -6158,9 +6158,9 @@ switch (alt28) { case 1: - // ./ANTLRv3.g:223:15: ',' id + // ANTLRv3.g:223:15: ',' id { - char_literal73 = (pANTLR3_COMMON_TOKEN) MATCHT(77, &FOLLOW_77_in_ruleScopeSpec1167); + char_literal73 = (pANTLR3_COMMON_TOKEN) MATCHT(78, &FOLLOW_78_in_ruleScopeSpec1167); if (HASEXCEPTION()) { goto ruleruleScopeSpecEx; @@ -6170,7 +6170,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_77; stream_77->add(stream_77, char_literal73, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_78; stream_78->add(stream_78, char_literal73, NULL); } FOLLOWPUSH(FOLLOW_id_in_ruleScopeSpec1169); @@ -6213,7 +6213,7 @@ /* AST REWRITE - * elements : ACTION, id, SCOPE_V3TOK + * elements : SCOPE_V3TOK, id, ACTION * token labels : * rule labels : retval * token list labels : @@ -6230,7 +6230,7 @@ retval.tree = root_0; // 224:3: -> ^( 'scope' ACTION ( id )+ ) { - // ./ANTLRv3.g:224:6: ^( 'scope' ACTION ( id )+ ) + // ANTLRv3.g:224:6: ^( 'scope' ACTION ( id )+ ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -6288,7 +6288,7 @@ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); - if (stream_77 != NULL) stream_77->free(stream_77); + if (stream_78 != NULL) stream_78->free(stream_78); if (stream_81 != NULL) stream_81->free(stream_81); if (stream_ACTION != NULL) stream_ACTION->free(stream_ACTION); if (stream_SCOPE_V3TOK != NULL) stream_SCOPE_V3TOK->free(stream_SCOPE_V3TOK); @@ -6308,7 +6308,7 @@ /** * $ANTLR start block - * ./ANTLRv3.g:227:1: block : lp= '(' ( (opts= optionsSpec )? ':' )? altpair ( '|' altpair )* rp= ')' -> ^( BLOCK_V3TOK[$lp,\"BLOCK\"] ( optionsSpec )? ( altpair )+ EOB_V3TOK[$rp,\"EOB\"] ) ; + * ANTLRv3.g:227:1: block : lp= '(' ( (opts= optionsSpec )? ':' )? altpair ( '|' altpair )* rp= ')' -> ^( BLOCK_V3TOK[$lp,\"BLOCK\"] ( optionsSpec )? ( altpair )+ EOB_V3TOK[$rp,\"EOB\"] ) ; */ static ANTLRv3Parser_block_return block(pANTLRv3Parser ctx) @@ -6340,8 +6340,8 @@ pANTLR3_BASE_TREE char_literal78_tree; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_79; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_94; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_73; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_74; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_75; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_altpair; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_optionsSpec; /* Initialize rule variables @@ -6370,10 +6370,10 @@ #define CREATE_stream_79 if (stream_79 == NULL) {stream_79 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 79"); } stream_94 = NULL; #define CREATE_stream_94 if (stream_94 == NULL) {stream_94 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 94"); } - stream_73 = NULL; - #define CREATE_stream_73 if (stream_73 == NULL) {stream_73 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 73"); } stream_74 = NULL; #define CREATE_stream_74 if (stream_74 == NULL) {stream_74 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 74"); } + stream_75 = NULL; + #define CREATE_stream_75 if (stream_75 == NULL) {stream_75 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 75"); } stream_altpair = NULL; #define CREATE_stream_altpair if (stream_altpair == NULL) {stream_altpair = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule altpair"); } stream_optionsSpec = NULL; @@ -6382,10 +6382,10 @@ retval.tree = NULL; { - // ./ANTLRv3.g:227:6: (lp= '(' ( (opts= optionsSpec )? ':' )? altpair ( '|' altpair )* rp= ')' -> ^( BLOCK_V3TOK[$lp,\"BLOCK\"] ( optionsSpec )? ( altpair )+ EOB_V3TOK[$rp,\"EOB\"] ) ) - // ./ANTLRv3.g:228:2: lp= '(' ( (opts= optionsSpec )? ':' )? altpair ( '|' altpair )* rp= ')' + // ANTLRv3.g:227:6: (lp= '(' ( (opts= optionsSpec )? ':' )? altpair ( '|' altpair )* rp= ')' -> ^( BLOCK_V3TOK[$lp,\"BLOCK\"] ( optionsSpec )? ( altpair )+ EOB_V3TOK[$rp,\"EOB\"] ) ) + // ANTLRv3.g:228:2: lp= '(' ( (opts= optionsSpec )? ':' )? altpair ( '|' altpair )* rp= ')' { - lp = (pANTLR3_COMMON_TOKEN) MATCHT(73, &FOLLOW_73_in_block1201); + lp = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_block1201); if (HASEXCEPTION()) { goto ruleblockEx; @@ -6395,10 +6395,10 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_73; stream_73->add(stream_73, lp, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, lp, NULL); } - // ./ANTLRv3.g:228:11: ( (opts= optionsSpec )? ':' )? + // ANTLRv3.g:228:11: ( (opts= optionsSpec )? ':' )? { int alt31=2; switch ( LA(1) ) @@ -6414,9 +6414,9 @@ switch (alt31) { case 1: - // ./ANTLRv3.g:228:12: (opts= optionsSpec )? ':' + // ANTLRv3.g:228:12: (opts= optionsSpec )? ':' { - // ./ANTLRv3.g:228:12: (opts= optionsSpec )? + // ANTLRv3.g:228:12: (opts= optionsSpec )? { int alt30=2; switch ( LA(1) ) @@ -6431,7 +6431,7 @@ switch (alt30) { case 1: - // ./ANTLRv3.g:228:13: opts= optionsSpec + // ANTLRv3.g:228:13: opts= optionsSpec { FOLLOWPUSH(FOLLOW_optionsSpec_in_block1209); opts=optionsSpec(ctx); @@ -6488,7 +6488,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_altpair; stream_altpair->add(stream_altpair, altpair77.tree, NULL); } - // ./ANTLRv3.g:228:49: ( '|' altpair )* + // ANTLRv3.g:228:49: ( '|' altpair )* for (;;) { @@ -6506,7 +6506,7 @@ switch (alt32) { case 1: - // ./ANTLRv3.g:228:51: '|' altpair + // ANTLRv3.g:228:51: '|' altpair { char_literal78 = (pANTLR3_COMMON_TOKEN) MATCHT(94, &FOLLOW_94_in_block1222); if (HASEXCEPTION()) @@ -6547,7 +6547,7 @@ loop32: ; /* Jump out to here if this rule does not match */ - rp = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_block1233); + rp = (pANTLR3_COMMON_TOKEN) MATCHT(75, &FOLLOW_75_in_block1233); if (HASEXCEPTION()) { goto ruleblockEx; @@ -6557,7 +6557,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, rp, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_75; stream_75->add(stream_75, rp, NULL); } /* AST REWRITE @@ -6578,7 +6578,7 @@ retval.tree = root_0; // 229:3: -> ^( BLOCK_V3TOK[$lp,\"BLOCK\"] ( optionsSpec )? ( altpair )+ EOB_V3TOK[$rp,\"EOB\"] ) { - // ./ANTLRv3.g:229:6: ^( BLOCK_V3TOK[$lp,\"BLOCK\"] ( optionsSpec )? ( altpair )+ EOB_V3TOK[$rp,\"EOB\"] ) + // ANTLRv3.g:229:6: ^( BLOCK_V3TOK[$lp,\"BLOCK\"] ( optionsSpec )? ( altpair )+ EOB_V3TOK[$rp,\"EOB\"] ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -6591,7 +6591,7 @@ , root_1)); - // ./ANTLRv3.g:229:34: ( optionsSpec )? + // ANTLRv3.g:229:34: ( optionsSpec )? { if ( (stream_optionsSpec != NULL && stream_optionsSpec->hasNext(stream_optionsSpec)) ) { @@ -6658,8 +6658,8 @@ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); if (stream_79 != NULL) stream_79->free(stream_79); if (stream_94 != NULL) stream_94->free(stream_94); - if (stream_73 != NULL) stream_73->free(stream_73); if (stream_74 != NULL) stream_74->free(stream_74); + if (stream_75 != NULL) stream_75->free(stream_75); if (stream_altpair != NULL) stream_altpair->free(stream_altpair); if (stream_optionsSpec != NULL) stream_optionsSpec->free(stream_optionsSpec); } @@ -6677,7 +6677,7 @@ /** * $ANTLR start altpair - * ./ANTLRv3.g:232:1: altpair : alternative rewrite ; + * ANTLRv3.g:232:1: altpair : alternative rewrite ; */ static ANTLRv3Parser_altpair_return altpair(pANTLRv3Parser ctx) @@ -6712,8 +6712,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:232:9: ( alternative rewrite ) - // ./ANTLRv3.g:232:11: alternative rewrite + // ANTLRv3.g:232:9: ( alternative rewrite ) + // ANTLRv3.g:232:11: alternative rewrite { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -6781,7 +6781,7 @@ /** * $ANTLR start altList - * ./ANTLRv3.g:234:1: altList : altpair ( '|' altpair )* -> ^( BLOCK_V3TOK[prevToken, \"BLOCK\"] ( altpair )+ EOB_V3TOK[\"EOB\"] ) ; + * ANTLRv3.g:234:1: altList : altpair ( '|' altpair )* -> ^( BLOCK_V3TOK[prevToken, \"BLOCK\"] ( altpair )+ EOB_V3TOK[\"EOB\"] ) ; */ static ANTLRv3Parser_altList_return altList(pANTLRv3Parser ctx) @@ -6828,8 +6828,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:237:2: ( altpair ( '|' altpair )* -> ^( BLOCK_V3TOK[prevToken, \"BLOCK\"] ( altpair )+ EOB_V3TOK[\"EOB\"] ) ) - // ./ANTLRv3.g:238:2: altpair ( '|' altpair )* + // ANTLRv3.g:237:2: ( altpair ( '|' altpair )* -> ^( BLOCK_V3TOK[prevToken, \"BLOCK\"] ( altpair )+ EOB_V3TOK[\"EOB\"] ) ) + // ANTLRv3.g:238:2: altpair ( '|' altpair )* { FOLLOWPUSH(FOLLOW_altpair_in_altList1278); altpair82=altpair(ctx); @@ -6846,7 +6846,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_altpair; stream_altpair->add(stream_altpair, altpair82.tree, NULL); } - // ./ANTLRv3.g:238:10: ( '|' altpair )* + // ANTLRv3.g:238:10: ( '|' altpair )* for (;;) { @@ -6864,7 +6864,7 @@ switch (alt33) { case 1: - // ./ANTLRv3.g:238:12: '|' altpair + // ANTLRv3.g:238:12: '|' altpair { char_literal83 = (pANTLR3_COMMON_TOKEN) MATCHT(94, &FOLLOW_94_in_altList1282); if (HASEXCEPTION()) @@ -6923,7 +6923,7 @@ retval.tree = root_0; // 238:27: -> ^( BLOCK_V3TOK[prevToken, \"BLOCK\"] ( altpair )+ EOB_V3TOK[\"EOB\"] ) { - // ./ANTLRv3.g:238:30: ^( BLOCK_V3TOK[prevToken, \"BLOCK\"] ( altpair )+ EOB_V3TOK[\"EOB\"] ) + // ANTLRv3.g:238:30: ^( BLOCK_V3TOK[prevToken, \"BLOCK\"] ( altpair )+ EOB_V3TOK[\"EOB\"] ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -7007,7 +7007,7 @@ /** * $ANTLR start alternative - * ./ANTLRv3.g:241:1: alternative : ( ( element )+ -> ^( ALT_V3TOK[firstToken,\"ALT\"] ( element )+ EOA_V3TOK[\"EOA\"] ) | -> ^( ALT_V3TOK[prevToken,\"ALT\"] EPSILON_V3TOK[prevToken,\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) ); + * ANTLRv3.g:241:1: alternative : ( ( element )+ -> ^( ALT_V3TOK[firstToken,\"ALT\"] ( element )+ EOA_V3TOK[\"EOA\"] ) | -> ^( ALT_V3TOK[prevToken,\"ALT\"] EPSILON_V3TOK[prevToken,\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) ); */ static ANTLRv3Parser_alternative_return alternative(pANTLRv3Parser ctx) @@ -7043,7 +7043,7 @@ { { - // ./ANTLRv3.g:246:5: ( ( element )+ -> ^( ALT_V3TOK[firstToken,\"ALT\"] ( element )+ EOA_V3TOK[\"EOA\"] ) | -> ^( ALT_V3TOK[prevToken,\"ALT\"] EPSILON_V3TOK[prevToken,\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) ) + // ANTLRv3.g:246:5: ( ( element )+ -> ^( ALT_V3TOK[firstToken,\"ALT\"] ( element )+ EOA_V3TOK[\"EOA\"] ) | -> ^( ALT_V3TOK[prevToken,\"ALT\"] EPSILON_V3TOK[prevToken,\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) ) ANTLR3_UINT32 alt35; @@ -7053,13 +7053,13 @@ { case ACTION: case CHAR_LITERAL: + case DOT_SYM: case RULE_REF: case SEMPRED_V3TOK: case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: - case 78: + case 74: case 96: { alt35=1; @@ -7067,7 +7067,7 @@ break; case EOF: case REWRITE_V3TOK: - case 74: + case 75: case 81: case 94: { @@ -7096,9 +7096,9 @@ switch (alt35) { case 1: - // ./ANTLRv3.g:246:9: ( element )+ + // ANTLRv3.g:246:9: ( element )+ { - // ./ANTLRv3.g:246:9: ( element )+ + // ANTLRv3.g:246:9: ( element )+ { int cnt34=0; @@ -7109,13 +7109,13 @@ { case ACTION: case CHAR_LITERAL: + case DOT_SYM: case RULE_REF: case SEMPRED_V3TOK: case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: - case 78: + case 74: case 96: { alt34=1; @@ -7127,7 +7127,7 @@ switch (alt34) { case 1: - // ./ANTLRv3.g:246:9: element + // ANTLRv3.g:246:9: element { FOLLOWPUSH(FOLLOW_element_in_alternative1322); element85=element(ctx); @@ -7191,7 +7191,7 @@ retval.tree = root_0; // 246:18: -> ^( ALT_V3TOK[firstToken,\"ALT\"] ( element )+ EOA_V3TOK[\"EOA\"] ) { - // ./ANTLRv3.g:246:21: ^( ALT_V3TOK[firstToken,\"ALT\"] ( element )+ EOA_V3TOK[\"EOA\"] ) + // ANTLRv3.g:246:21: ^( ALT_V3TOK[firstToken,\"ALT\"] ( element )+ EOA_V3TOK[\"EOA\"] ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -7243,7 +7243,7 @@ } break; case 2: - // ./ANTLRv3.g:247:9: + // ANTLRv3.g:247:9: { /* AST REWRITE * elements : @@ -7263,7 +7263,7 @@ retval.tree = root_0; // 247:9: -> ^( ALT_V3TOK[prevToken,\"ALT\"] EPSILON_V3TOK[prevToken,\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) { - // ./ANTLRv3.g:247:12: ^( ALT_V3TOK[prevToken,\"ALT\"] EPSILON_V3TOK[prevToken,\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) + // ANTLRv3.g:247:12: ^( ALT_V3TOK[prevToken,\"ALT\"] EPSILON_V3TOK[prevToken,\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -7344,7 +7344,7 @@ /** * $ANTLR start exceptionGroup - * ./ANTLRv3.g:250:1: exceptionGroup : ( ( exceptionHandler )+ ( finallyClause )? | finallyClause ); + * ANTLRv3.g:250:1: exceptionGroup : ( ( exceptionHandler )+ ( finallyClause )? | finallyClause ); */ static ANTLRv3Parser_exceptionGroup_return exceptionGroup(pANTLRv3Parser ctx) @@ -7386,7 +7386,7 @@ { { - // ./ANTLRv3.g:251:2: ( ( exceptionHandler )+ ( finallyClause )? | finallyClause ) + // ANTLRv3.g:251:2: ( ( exceptionHandler )+ ( finallyClause )? | finallyClause ) ANTLR3_UINT32 alt38; @@ -7426,12 +7426,12 @@ switch (alt38) { case 1: - // ./ANTLRv3.g:251:4: ( exceptionHandler )+ ( finallyClause )? + // ANTLRv3.g:251:4: ( exceptionHandler )+ ( finallyClause )? { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); - // ./ANTLRv3.g:251:4: ( exceptionHandler )+ + // ANTLRv3.g:251:4: ( exceptionHandler )+ { int cnt36=0; @@ -7451,7 +7451,7 @@ switch (alt36) { case 1: - // ./ANTLRv3.g:251:6: exceptionHandler + // ANTLRv3.g:251:6: exceptionHandler { FOLLOWPUSH(FOLLOW_exceptionHandler_in_exceptionGroup1373); exceptionHandler86=exceptionHandler(ctx); @@ -7497,7 +7497,7 @@ loop36: ; /* Jump to here if this rule does not match */ } - // ./ANTLRv3.g:251:26: ( finallyClause )? + // ANTLRv3.g:251:26: ( finallyClause )? { int alt37=2; switch ( LA(1) ) @@ -7512,7 +7512,7 @@ switch (alt37) { case 1: - // ./ANTLRv3.g:251:28: finallyClause + // ANTLRv3.g:251:28: finallyClause { FOLLOWPUSH(FOLLOW_finallyClause_in_exceptionGroup1380); finallyClause87=finallyClause(ctx); @@ -7538,7 +7538,7 @@ } break; case 2: - // ./ANTLRv3.g:252:4: finallyClause + // ANTLRv3.g:252:4: finallyClause { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -7594,7 +7594,7 @@ /** * $ANTLR start exceptionHandler - * ./ANTLRv3.g:255:1: exceptionHandler : CATCH_SYM ARG_ACTION ACTION -> ^( CATCH_SYM ARG_ACTION ACTION ) ; + * ANTLRv3.g:255:1: exceptionHandler : CATCH_SYM ARG_ACTION ACTION -> ^( CATCH_SYM ARG_ACTION ACTION ) ; */ static ANTLRv3Parser_exceptionHandler_return exceptionHandler(pANTLRv3Parser ctx) @@ -7640,8 +7640,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:256:5: ( CATCH_SYM ARG_ACTION ACTION -> ^( CATCH_SYM ARG_ACTION ACTION ) ) - // ./ANTLRv3.g:256:10: CATCH_SYM ARG_ACTION ACTION + // ANTLRv3.g:256:5: ( CATCH_SYM ARG_ACTION ACTION -> ^( CATCH_SYM ARG_ACTION ACTION ) ) + // ANTLRv3.g:256:10: CATCH_SYM ARG_ACTION ACTION { CATCH_SYM89 = (pANTLR3_COMMON_TOKEN) MATCHT(CATCH_SYM, &FOLLOW_CATCH_SYM_in_exceptionHandler1408); if (HASEXCEPTION()) @@ -7683,7 +7683,7 @@ /* AST REWRITE - * elements : ACTION, ARG_ACTION, CATCH_SYM + * elements : ARG_ACTION, ACTION, CATCH_SYM * token labels : * rule labels : retval * token list labels : @@ -7700,7 +7700,7 @@ retval.tree = root_0; // 256:38: -> ^( CATCH_SYM ARG_ACTION ACTION ) { - // ./ANTLRv3.g:256:41: ^( CATCH_SYM ARG_ACTION ACTION ) + // ANTLRv3.g:256:41: ^( CATCH_SYM ARG_ACTION ACTION ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -7762,7 +7762,7 @@ /** * $ANTLR start finallyClause - * ./ANTLRv3.g:259:1: finallyClause : FINALLY_SYM ACTION -> ^( FINALLY_SYM ACTION ) ; + * ANTLRv3.g:259:1: finallyClause : FINALLY_SYM ACTION -> ^( FINALLY_SYM ACTION ) ; */ static ANTLRv3Parser_finallyClause_return finallyClause(pANTLRv3Parser ctx) @@ -7801,8 +7801,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:260:5: ( FINALLY_SYM ACTION -> ^( FINALLY_SYM ACTION ) ) - // ./ANTLRv3.g:260:10: FINALLY_SYM ACTION + // ANTLRv3.g:260:5: ( FINALLY_SYM ACTION -> ^( FINALLY_SYM ACTION ) ) + // ANTLRv3.g:260:10: FINALLY_SYM ACTION { FINALLY_SYM92 = (pANTLR3_COMMON_TOKEN) MATCHT(FINALLY_SYM, &FOLLOW_FINALLY_SYM_in_finallyClause1442); if (HASEXCEPTION()) @@ -7831,7 +7831,7 @@ /* AST REWRITE - * elements : ACTION, FINALLY_SYM + * elements : FINALLY_SYM, ACTION * token labels : * rule labels : retval * token list labels : @@ -7848,7 +7848,7 @@ retval.tree = root_0; // 260:29: -> ^( FINALLY_SYM ACTION ) { - // ./ANTLRv3.g:260:32: ^( FINALLY_SYM ACTION ) + // ANTLRv3.g:260:32: ^( FINALLY_SYM ACTION ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -7905,7 +7905,7 @@ /** * $ANTLR start element - * ./ANTLRv3.g:263:1: element : ( id (labelOp= '=' |labelOp= '+=' ) atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id atom ) ) | id (labelOp= '=' |labelOp= '+=' ) block ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id block ) ) | atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> atom ) | ebnf | ACTION |p= SEMPRED_V3TOK ( '=>' ->| -> SEMPRED_V3TOK ) | treeSpec ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> treeSpec ) ); + * ANTLRv3.g:263:1: element : ( id (labelOp= '=' |labelOp= '+=' ) atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id atom ) ) | id (labelOp= '=' |labelOp= '+=' ) block ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id block ) ) | atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> atom ) | ebnf | ACTION |p= SEMPRED_V3TOK ( '=>' ->| -> SEMPRED_V3TOK ) | treeSpec ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> treeSpec ) ); */ static ANTLRv3Parser_element_return element(pANTLRv3Parser ctx) @@ -8037,7 +8037,7 @@ { { - // ./ANTLRv3.g:264:2: ( id (labelOp= '=' |labelOp= '+=' ) atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id atom ) ) | id (labelOp= '=' |labelOp= '+=' ) block ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id block ) ) | atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> atom ) | ebnf | ACTION |p= SEMPRED_V3TOK ( '=>' ->| -> SEMPRED_V3TOK ) | treeSpec ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> treeSpec ) ) + // ANTLRv3.g:264:2: ( id (labelOp= '=' |labelOp= '+=' ) atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id atom ) ) | id (labelOp= '=' |labelOp= '+=' ) block ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id block ) ) | atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> atom ) | ebnf | ACTION |p= SEMPRED_V3TOK ( '=>' ->| -> SEMPRED_V3TOK ) | treeSpec ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> treeSpec ) ) ANTLR3_UINT32 alt46; @@ -8054,16 +8054,16 @@ switch ( LA(3) ) { case CHAR_LITERAL: + case DOT_SYM: case RULE_REF: case STRING_LITERAL: case TOKEN_REF: - case 78: case 96: { alt46=1; } break; - case 73: + case 74: { alt46=2; } @@ -8094,16 +8094,16 @@ switch ( LA(3) ) { case CHAR_LITERAL: + case DOT_SYM: case RULE_REF: case STRING_LITERAL: case TOKEN_REF: - case 78: case 96: { alt46=1; } break; - case 73: + case 74: { alt46=2; } @@ -8134,6 +8134,7 @@ case ARG_ACTION: case BANG_V3TOK: case CHAR_LITERAL: + case DOT_SYM: case REWRITE_V3TOK: case ROOT_V3TOK: case RULE_REF: @@ -8141,11 +8142,10 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: case 74: case 75: case 76: - case 78: + case 77: case 81: case 82: case 85: @@ -8177,8 +8177,8 @@ } break; case CHAR_LITERAL: + case DOT_SYM: case STRING_LITERAL: - case 78: case 96: { alt46=3; @@ -8193,16 +8193,16 @@ switch ( LA(3) ) { case CHAR_LITERAL: + case DOT_SYM: case RULE_REF: case STRING_LITERAL: case TOKEN_REF: - case 78: case 96: { alt46=1; } break; - case 73: + case 74: { alt46=2; } @@ -8233,16 +8233,16 @@ switch ( LA(3) ) { case CHAR_LITERAL: + case DOT_SYM: case RULE_REF: case STRING_LITERAL: case TOKEN_REF: - case 78: case 96: { alt46=1; } break; - case 73: + case 74: { alt46=2; } @@ -8273,6 +8273,7 @@ case ARG_ACTION: case BANG_V3TOK: case CHAR_LITERAL: + case DOT_SYM: case REWRITE_V3TOK: case ROOT_V3TOK: case RULE_REF: @@ -8280,11 +8281,10 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: case 74: case 75: case 76: - case 78: + case 77: case 81: case 85: case 94: @@ -8314,7 +8314,7 @@ } break; - case 73: + case 74: { alt46=4; } @@ -8356,7 +8356,7 @@ switch (alt46) { case 1: - // ./ANTLRv3.g:264:4: id (labelOp= '=' |labelOp= '+=' ) atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id atom ) ) + // ANTLRv3.g:264:4: id (labelOp= '=' |labelOp= '+=' ) atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id atom ) ) { FOLLOWPUSH(FOLLOW_id_in_element1466); id94=id(ctx); @@ -8373,7 +8373,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_id; stream_id->add(stream_id, id94.tree, NULL); } - // ./ANTLRv3.g:264:7: (labelOp= '=' |labelOp= '+=' ) + // ANTLRv3.g:264:7: (labelOp= '=' |labelOp= '+=' ) { int alt39=2; switch ( LA(1) ) @@ -8410,7 +8410,7 @@ switch (alt39) { case 1: - // ./ANTLRv3.g:264:8: labelOp= '=' + // ANTLRv3.g:264:8: labelOp= '=' { labelOp = (pANTLR3_COMMON_TOKEN) MATCHT(LABEL_ASSIGN_V3TOK, &FOLLOW_LABEL_ASSIGN_V3TOK_in_element1471); if (HASEXCEPTION()) @@ -8428,7 +8428,7 @@ } break; case 2: - // ./ANTLRv3.g:264:20: labelOp= '+=' + // ANTLRv3.g:264:20: labelOp= '+=' { labelOp = (pANTLR3_COMMON_TOKEN) MATCHT(LIST_LABEL_ASSIGN_V3TOK, &FOLLOW_LIST_LABEL_ASSIGN_V3TOK_in_element1475); if (HASEXCEPTION()) @@ -8464,13 +8464,13 @@ if ( BACKTRACKING==0 ) { CREATE_stream_atom; stream_atom->add(stream_atom, atom95.tree, NULL); } - // ./ANTLRv3.g:265:3: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id atom ) ) + // ANTLRv3.g:265:3: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id atom ) ) { int alt40=2; switch ( LA(1) ) { - case 75: case 76: + case 77: case 85: { alt40=1; @@ -8479,15 +8479,15 @@ case EOF: case ACTION: case CHAR_LITERAL: + case DOT_SYM: case REWRITE_V3TOK: case RULE_REF: case SEMPRED_V3TOK: case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: case 74: - case 78: + case 75: case 81: case 94: case 96: @@ -8517,7 +8517,7 @@ switch (alt40) { case 1: - // ./ANTLRv3.g:265:5: ebnfSuffix + // ANTLRv3.g:265:5: ebnfSuffix { FOLLOWPUSH(FOLLOW_ebnfSuffix_in_element1484); ebnfSuffix96=ebnfSuffix(ctx); @@ -8535,7 +8535,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_ebnfSuffix; stream_ebnfSuffix->add(stream_ebnfSuffix, ebnfSuffix96.tree, NULL); } /* AST REWRITE - * elements : atom, id, labelOp, ebnfSuffix + * elements : labelOp, id, ebnfSuffix, atom * token labels : labelOp * rule labels : retval * token list labels : @@ -8554,12 +8554,12 @@ retval.tree = root_0; // 265:16: -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) { - // ./ANTLRv3.g:265:19: ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) + // ANTLRv3.g:265:19: ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_ebnfSuffix == NULL ? NULL : stream_ebnfSuffix->nextNode(stream_ebnfSuffix), root_1)); - // ./ANTLRv3.g:265:33: ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) + // ANTLRv3.g:265:33: ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) { pANTLR3_BASE_TREE root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -8572,7 +8572,7 @@ , root_2)); - // ./ANTLRv3.g:265:56: ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) + // ANTLRv3.g:265:56: ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id atom ) EOA_V3TOK[\"EOA\"] ) { pANTLR3_BASE_TREE root_3 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_3 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -8585,7 +8585,7 @@ , root_3)); - // ./ANTLRv3.g:265:75: ^( $labelOp id atom ) + // ANTLRv3.g:265:75: ^( $labelOp id atom ) { pANTLR3_BASE_TREE root_4 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_4 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRootToken(ADAPTOR, stream_labelOp == NULL ? NULL : stream_labelOp->nextToken(stream_labelOp), root_4)); @@ -8638,10 +8638,10 @@ } break; case 2: - // ./ANTLRv3.g:266:8: + // ANTLRv3.g:266:8: { /* AST REWRITE - * elements : atom, id, labelOp + * elements : id, atom, labelOp * token labels : labelOp * rule labels : retval * token list labels : @@ -8660,7 +8660,7 @@ retval.tree = root_0; // 266:8: -> ^( $labelOp id atom ) { - // ./ANTLRv3.g:266:11: ^( $labelOp id atom ) + // ANTLRv3.g:266:11: ^( $labelOp id atom ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRootToken(ADAPTOR, stream_labelOp == NULL ? NULL : stream_labelOp->nextToken(stream_labelOp), root_1)); @@ -8690,7 +8690,7 @@ } break; case 2: - // ./ANTLRv3.g:268:4: id (labelOp= '=' |labelOp= '+=' ) block ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id block ) ) + // ANTLRv3.g:268:4: id (labelOp= '=' |labelOp= '+=' ) block ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id block ) ) { FOLLOWPUSH(FOLLOW_id_in_element1543); id97=id(ctx); @@ -8707,7 +8707,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_id; stream_id->add(stream_id, id97.tree, NULL); } - // ./ANTLRv3.g:268:7: (labelOp= '=' |labelOp= '+=' ) + // ANTLRv3.g:268:7: (labelOp= '=' |labelOp= '+=' ) { int alt41=2; switch ( LA(1) ) @@ -8744,7 +8744,7 @@ switch (alt41) { case 1: - // ./ANTLRv3.g:268:8: labelOp= '=' + // ANTLRv3.g:268:8: labelOp= '=' { labelOp = (pANTLR3_COMMON_TOKEN) MATCHT(LABEL_ASSIGN_V3TOK, &FOLLOW_LABEL_ASSIGN_V3TOK_in_element1548); if (HASEXCEPTION()) @@ -8762,7 +8762,7 @@ } break; case 2: - // ./ANTLRv3.g:268:20: labelOp= '+=' + // ANTLRv3.g:268:20: labelOp= '+=' { labelOp = (pANTLR3_COMMON_TOKEN) MATCHT(LIST_LABEL_ASSIGN_V3TOK, &FOLLOW_LIST_LABEL_ASSIGN_V3TOK_in_element1552); if (HASEXCEPTION()) @@ -8798,13 +8798,13 @@ if ( BACKTRACKING==0 ) { CREATE_stream_block; stream_block->add(stream_block, block98.tree, NULL); } - // ./ANTLRv3.g:269:4: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id block ) ) + // ANTLRv3.g:269:4: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> ^( $labelOp id block ) ) { int alt42=2; switch ( LA(1) ) { - case 75: case 76: + case 77: case 85: { alt42=1; @@ -8813,15 +8813,15 @@ case EOF: case ACTION: case CHAR_LITERAL: + case DOT_SYM: case REWRITE_V3TOK: case RULE_REF: case SEMPRED_V3TOK: case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: case 74: - case 78: + case 75: case 81: case 94: case 96: @@ -8851,7 +8851,7 @@ switch (alt42) { case 1: - // ./ANTLRv3.g:269:6: ebnfSuffix + // ANTLRv3.g:269:6: ebnfSuffix { FOLLOWPUSH(FOLLOW_ebnfSuffix_in_element1562); ebnfSuffix99=ebnfSuffix(ctx); @@ -8869,7 +8869,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_ebnfSuffix; stream_ebnfSuffix->add(stream_ebnfSuffix, ebnfSuffix99.tree, NULL); } /* AST REWRITE - * elements : labelOp, block, ebnfSuffix, id + * elements : block, id, ebnfSuffix, labelOp * token labels : labelOp * rule labels : retval * token list labels : @@ -8888,12 +8888,12 @@ retval.tree = root_0; // 269:17: -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) { - // ./ANTLRv3.g:269:20: ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) + // ANTLRv3.g:269:20: ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_ebnfSuffix == NULL ? NULL : stream_ebnfSuffix->nextNode(stream_ebnfSuffix), root_1)); - // ./ANTLRv3.g:269:34: ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) + // ANTLRv3.g:269:34: ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) { pANTLR3_BASE_TREE root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -8906,7 +8906,7 @@ , root_2)); - // ./ANTLRv3.g:269:57: ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) + // ANTLRv3.g:269:57: ^( ALT_V3TOK[\"ALT\"] ^( $labelOp id block ) EOA_V3TOK[\"EOA\"] ) { pANTLR3_BASE_TREE root_3 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_3 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -8919,7 +8919,7 @@ , root_3)); - // ./ANTLRv3.g:269:76: ^( $labelOp id block ) + // ANTLRv3.g:269:76: ^( $labelOp id block ) { pANTLR3_BASE_TREE root_4 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_4 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRootToken(ADAPTOR, stream_labelOp == NULL ? NULL : stream_labelOp->nextToken(stream_labelOp), root_4)); @@ -8972,7 +8972,7 @@ } break; case 2: - // ./ANTLRv3.g:270:8: + // ANTLRv3.g:270:8: { /* AST REWRITE * elements : labelOp, block, id @@ -8994,7 +8994,7 @@ retval.tree = root_0; // 270:8: -> ^( $labelOp id block ) { - // ./ANTLRv3.g:270:11: ^( $labelOp id block ) + // ANTLRv3.g:270:11: ^( $labelOp id block ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRootToken(ADAPTOR, stream_labelOp == NULL ? NULL : stream_labelOp->nextToken(stream_labelOp), root_1)); @@ -9024,7 +9024,7 @@ } break; case 3: - // ./ANTLRv3.g:272:4: atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> atom ) + // ANTLRv3.g:272:4: atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> atom ) { FOLLOWPUSH(FOLLOW_atom_in_element1621); atom100=atom(ctx); @@ -9041,13 +9041,13 @@ if ( BACKTRACKING==0 ) { CREATE_stream_atom; stream_atom->add(stream_atom, atom100.tree, NULL); } - // ./ANTLRv3.g:273:3: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> atom ) + // ANTLRv3.g:273:3: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> atom ) { int alt43=2; switch ( LA(1) ) { - case 75: case 76: + case 77: case 85: { alt43=1; @@ -9056,15 +9056,15 @@ case EOF: case ACTION: case CHAR_LITERAL: + case DOT_SYM: case REWRITE_V3TOK: case RULE_REF: case SEMPRED_V3TOK: case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: case 74: - case 78: + case 75: case 81: case 94: case 96: @@ -9094,7 +9094,7 @@ switch (alt43) { case 1: - // ./ANTLRv3.g:273:5: ebnfSuffix + // ANTLRv3.g:273:5: ebnfSuffix { FOLLOWPUSH(FOLLOW_ebnfSuffix_in_element1627); ebnfSuffix101=ebnfSuffix(ctx); @@ -9129,12 +9129,12 @@ retval.tree = root_0; // 273:16: -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) { - // ./ANTLRv3.g:273:19: ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) + // ANTLRv3.g:273:19: ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_ebnfSuffix == NULL ? NULL : stream_ebnfSuffix->nextNode(stream_ebnfSuffix), root_1)); - // ./ANTLRv3.g:273:33: ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) + // ANTLRv3.g:273:33: ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) { pANTLR3_BASE_TREE root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -9147,7 +9147,7 @@ , root_2)); - // ./ANTLRv3.g:273:56: ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) + // ANTLRv3.g:273:56: ^( ALT_V3TOK[\"ALT\"] atom EOA_V3TOK[\"EOA\"] ) { pANTLR3_BASE_TREE root_3 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_3 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -9202,7 +9202,7 @@ } break; case 2: - // ./ANTLRv3.g:274:8: + // ANTLRv3.g:274:8: { /* AST REWRITE * elements : atom @@ -9241,7 +9241,7 @@ } break; case 4: - // ./ANTLRv3.g:276:4: ebnf + // ANTLRv3.g:276:4: ebnf { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -9264,7 +9264,7 @@ } break; case 5: - // ./ANTLRv3.g:277:6: ACTION + // ANTLRv3.g:277:6: ACTION { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -9287,7 +9287,7 @@ } break; case 6: - // ./ANTLRv3.g:278:6: p= SEMPRED_V3TOK ( '=>' ->| -> SEMPRED_V3TOK ) + // ANTLRv3.g:278:6: p= SEMPRED_V3TOK ( '=>' ->| -> SEMPRED_V3TOK ) { p = (pANTLR3_COMMON_TOKEN) MATCHT(SEMPRED_V3TOK, &FOLLOW_SEMPRED_V3TOK_in_element1691); if (HASEXCEPTION()) @@ -9302,7 +9302,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_SEMPRED_V3TOK; stream_SEMPRED_V3TOK->add(stream_SEMPRED_V3TOK, p, NULL); } - // ./ANTLRv3.g:279:3: ( '=>' ->| -> SEMPRED_V3TOK ) + // ANTLRv3.g:279:3: ( '=>' ->| -> SEMPRED_V3TOK ) { int alt44=2; switch ( LA(1) ) @@ -9315,15 +9315,15 @@ case EOF: case ACTION: case CHAR_LITERAL: + case DOT_SYM: case REWRITE_V3TOK: case RULE_REF: case SEMPRED_V3TOK: case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: case 74: - case 78: + case 75: case 81: case 94: case 96: @@ -9353,7 +9353,7 @@ switch (alt44) { case 1: - // ./ANTLRv3.g:280:5: '=>' + // ANTLRv3.g:280:5: '=>' { string_literal104 = (pANTLR3_COMMON_TOKEN) MATCHT(83, &FOLLOW_83_in_element1701); if (HASEXCEPTION()) @@ -9399,7 +9399,7 @@ } break; case 2: - // ./ANTLRv3.g:281:7: + // ANTLRv3.g:281:7: { /* AST REWRITE * elements : SEMPRED_V3TOK @@ -9440,7 +9440,7 @@ } break; case 7: - // ./ANTLRv3.g:283:6: treeSpec ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> treeSpec ) + // ANTLRv3.g:283:6: treeSpec ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> treeSpec ) { FOLLOWPUSH(FOLLOW_treeSpec_in_element1727); treeSpec105=treeSpec(ctx); @@ -9457,13 +9457,13 @@ if ( BACKTRACKING==0 ) { CREATE_stream_treeSpec; stream_treeSpec->add(stream_treeSpec, treeSpec105.tree, NULL); } - // ./ANTLRv3.g:284:3: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> treeSpec ) + // ANTLRv3.g:284:3: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> treeSpec ) { int alt45=2; switch ( LA(1) ) { - case 75: case 76: + case 77: case 85: { alt45=1; @@ -9472,15 +9472,15 @@ case EOF: case ACTION: case CHAR_LITERAL: + case DOT_SYM: case REWRITE_V3TOK: case RULE_REF: case SEMPRED_V3TOK: case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: case 74: - case 78: + case 75: case 81: case 94: case 96: @@ -9510,7 +9510,7 @@ switch (alt45) { case 1: - // ./ANTLRv3.g:284:5: ebnfSuffix + // ANTLRv3.g:284:5: ebnfSuffix { FOLLOWPUSH(FOLLOW_ebnfSuffix_in_element1733); ebnfSuffix106=ebnfSuffix(ctx); @@ -9528,7 +9528,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_ebnfSuffix; stream_ebnfSuffix->add(stream_ebnfSuffix, ebnfSuffix106.tree, NULL); } /* AST REWRITE - * elements : treeSpec, ebnfSuffix + * elements : ebnfSuffix, treeSpec * token labels : * rule labels : retval * token list labels : @@ -9545,12 +9545,12 @@ retval.tree = root_0; // 284:16: -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) { - // ./ANTLRv3.g:284:19: ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) + // ANTLRv3.g:284:19: ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_ebnfSuffix == NULL ? NULL : stream_ebnfSuffix->nextNode(stream_ebnfSuffix), root_1)); - // ./ANTLRv3.g:284:33: ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) + // ANTLRv3.g:284:33: ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) { pANTLR3_BASE_TREE root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -9563,7 +9563,7 @@ , root_2)); - // ./ANTLRv3.g:284:56: ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) + // ANTLRv3.g:284:56: ^( ALT_V3TOK[\"ALT\"] treeSpec EOA_V3TOK[\"EOA\"] ) { pANTLR3_BASE_TREE root_3 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_3 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -9618,7 +9618,7 @@ } break; case 2: - // ./ANTLRv3.g:285:8: + // ANTLRv3.g:285:8: { /* AST REWRITE * elements : treeSpec @@ -9699,7 +9699,7 @@ /** * $ANTLR start atom - * ./ANTLRv3.g:289:1: atom : ( terminal | range ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op range ) | -> range ) | notSet ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op notSet ) | -> notSet ) | RULE_REF ( ARG_ACTION )? ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op RULE_REF ( ARG_ACTION )? ) | -> ^( RULE_REF ( ARG_ACTION )? ) ) ); + * ANTLRv3.g:289:1: atom : ( terminal | range ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op range ) | -> range ) | notSet ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op notSet ) | -> notSet ) | RULE_REF ( ARG_ACTION )? ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op RULE_REF ( ARG_ACTION )? ) | -> ^( RULE_REF ( ARG_ACTION )? ) ) ); */ static ANTLRv3Parser_atom_return atom(pANTLRv3Parser ctx) @@ -9770,7 +9770,7 @@ { { - // ./ANTLRv3.g:289:5: ( terminal | range ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op range ) | -> range ) | notSet ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op notSet ) | -> notSet ) | RULE_REF ( ARG_ACTION )? ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op RULE_REF ( ARG_ACTION )? ) | -> ^( RULE_REF ( ARG_ACTION )? ) ) ) + // ANTLRv3.g:289:5: ( terminal | range ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op range ) | -> range ) | notSet ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op notSet ) | -> notSet ) | RULE_REF ( ARG_ACTION )? ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op RULE_REF ( ARG_ACTION )? ) | -> ^( RULE_REF ( ARG_ACTION )? ) ) ) ANTLR3_UINT32 alt54; @@ -9791,6 +9791,7 @@ case ACTION: case BANG_V3TOK: case CHAR_LITERAL: + case DOT_SYM: case REWRITE_V3TOK: case ROOT_V3TOK: case RULE_REF: @@ -9798,11 +9799,10 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: case 74: case 75: case 76: - case 78: + case 77: case 81: case 82: case 85: @@ -9833,9 +9833,9 @@ } break; + case DOT_SYM: case STRING_LITERAL: case TOKEN_REF: - case 78: { alt54=1; } @@ -9872,7 +9872,7 @@ switch (alt54) { case 1: - // ./ANTLRv3.g:290:2: terminal + // ANTLRv3.g:290:2: terminal { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -9895,7 +9895,7 @@ } break; case 2: - // ./ANTLRv3.g:291:4: range ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op range ) | -> range ) + // ANTLRv3.g:291:4: range ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op range ) | -> range ) { FOLLOWPUSH(FOLLOW_range_in_atom1789); range108=range(ctx); @@ -9912,7 +9912,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_range; stream_range->add(stream_range, range108.tree, NULL); } - // ./ANTLRv3.g:292:3: ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op range ) | -> range ) + // ANTLRv3.g:292:3: ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op range ) | -> range ) { int alt48=2; switch ( LA(1) ) @@ -9926,17 +9926,17 @@ case EOF: case ACTION: case CHAR_LITERAL: + case DOT_SYM: case REWRITE_V3TOK: case RULE_REF: case SEMPRED_V3TOK: case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: case 74: case 75: case 76: - case 78: + case 77: case 81: case 85: case 94: @@ -9967,9 +9967,9 @@ switch (alt48) { case 1: - // ./ANTLRv3.g:292:5: (op= ROOT_V3TOK |op= BANG_V3TOK ) + // ANTLRv3.g:292:5: (op= ROOT_V3TOK |op= BANG_V3TOK ) { - // ./ANTLRv3.g:292:5: (op= ROOT_V3TOK |op= BANG_V3TOK ) + // ANTLRv3.g:292:5: (op= ROOT_V3TOK |op= BANG_V3TOK ) { int alt47=2; switch ( LA(1) ) @@ -10006,7 +10006,7 @@ switch (alt47) { case 1: - // ./ANTLRv3.g:292:6: op= ROOT_V3TOK + // ANTLRv3.g:292:6: op= ROOT_V3TOK { op = (pANTLR3_COMMON_TOKEN) MATCHT(ROOT_V3TOK, &FOLLOW_ROOT_V3TOK_in_atom1799); if (HASEXCEPTION()) @@ -10024,7 +10024,7 @@ } break; case 2: - // ./ANTLRv3.g:292:20: op= BANG_V3TOK + // ANTLRv3.g:292:20: op= BANG_V3TOK { op = (pANTLR3_COMMON_TOKEN) MATCHT(BANG_V3TOK, &FOLLOW_BANG_V3TOK_in_atom1803); if (HASEXCEPTION()) @@ -10046,7 +10046,7 @@ } /* AST REWRITE - * elements : range, op + * elements : op, range * token labels : op * rule labels : retval * token list labels : @@ -10065,7 +10065,7 @@ retval.tree = root_0; // 292:35: -> ^( $op range ) { - // ./ANTLRv3.g:292:38: ^( $op range ) + // ANTLRv3.g:292:38: ^( $op range ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRootToken(ADAPTOR, stream_op == NULL ? NULL : stream_op->nextToken(stream_op), root_1)); @@ -10087,7 +10087,7 @@ } break; case 2: - // ./ANTLRv3.g:293:9: + // ANTLRv3.g:293:9: { /* AST REWRITE * elements : range @@ -10126,7 +10126,7 @@ } break; case 3: - // ./ANTLRv3.g:295:7: notSet ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op notSet ) | -> notSet ) + // ANTLRv3.g:295:7: notSet ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op notSet ) | -> notSet ) { FOLLOWPUSH(FOLLOW_notSet_in_atom1837); notSet109=notSet(ctx); @@ -10143,7 +10143,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_notSet; stream_notSet->add(stream_notSet, notSet109.tree, NULL); } - // ./ANTLRv3.g:296:3: ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op notSet ) | -> notSet ) + // ANTLRv3.g:296:3: ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op notSet ) | -> notSet ) { int alt50=2; switch ( LA(1) ) @@ -10157,17 +10157,17 @@ case EOF: case ACTION: case CHAR_LITERAL: + case DOT_SYM: case REWRITE_V3TOK: case RULE_REF: case SEMPRED_V3TOK: case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: case 74: case 75: case 76: - case 78: + case 77: case 81: case 85: case 94: @@ -10198,9 +10198,9 @@ switch (alt50) { case 1: - // ./ANTLRv3.g:296:5: (op= ROOT_V3TOK |op= BANG_V3TOK ) + // ANTLRv3.g:296:5: (op= ROOT_V3TOK |op= BANG_V3TOK ) { - // ./ANTLRv3.g:296:5: (op= ROOT_V3TOK |op= BANG_V3TOK ) + // ANTLRv3.g:296:5: (op= ROOT_V3TOK |op= BANG_V3TOK ) { int alt49=2; switch ( LA(1) ) @@ -10237,7 +10237,7 @@ switch (alt49) { case 1: - // ./ANTLRv3.g:296:6: op= ROOT_V3TOK + // ANTLRv3.g:296:6: op= ROOT_V3TOK { op = (pANTLR3_COMMON_TOKEN) MATCHT(ROOT_V3TOK, &FOLLOW_ROOT_V3TOK_in_atom1846); if (HASEXCEPTION()) @@ -10255,7 +10255,7 @@ } break; case 2: - // ./ANTLRv3.g:296:20: op= BANG_V3TOK + // ANTLRv3.g:296:20: op= BANG_V3TOK { op = (pANTLR3_COMMON_TOKEN) MATCHT(BANG_V3TOK, &FOLLOW_BANG_V3TOK_in_atom1850); if (HASEXCEPTION()) @@ -10296,7 +10296,7 @@ retval.tree = root_0; // 296:35: -> ^( $op notSet ) { - // ./ANTLRv3.g:296:38: ^( $op notSet ) + // ANTLRv3.g:296:38: ^( $op notSet ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRootToken(ADAPTOR, stream_op == NULL ? NULL : stream_op->nextToken(stream_op), root_1)); @@ -10318,7 +10318,7 @@ } break; case 2: - // ./ANTLRv3.g:297:9: + // ANTLRv3.g:297:9: { /* AST REWRITE * elements : notSet @@ -10357,7 +10357,7 @@ } break; case 4: - // ./ANTLRv3.g:299:7: RULE_REF ( ARG_ACTION )? ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op RULE_REF ( ARG_ACTION )? ) | -> ^( RULE_REF ( ARG_ACTION )? ) ) + // ANTLRv3.g:299:7: RULE_REF ( ARG_ACTION )? ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op RULE_REF ( ARG_ACTION )? ) | -> ^( RULE_REF ( ARG_ACTION )? ) ) { RULE_REF110 = (pANTLR3_COMMON_TOKEN) MATCHT(RULE_REF, &FOLLOW_RULE_REF_in_atom1884); if (HASEXCEPTION()) @@ -10372,7 +10372,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_RULE_REF; stream_RULE_REF->add(stream_RULE_REF, RULE_REF110, NULL); } - // ./ANTLRv3.g:299:16: ( ARG_ACTION )? + // ANTLRv3.g:299:16: ( ARG_ACTION )? { int alt51=2; switch ( LA(1) ) @@ -10387,7 +10387,7 @@ switch (alt51) { case 1: - // ./ANTLRv3.g:299:16: ARG_ACTION + // ANTLRv3.g:299:16: ARG_ACTION { ARG_ACTION111 = (pANTLR3_COMMON_TOKEN) MATCHT(ARG_ACTION, &FOLLOW_ARG_ACTION_in_atom1886); if (HASEXCEPTION()) @@ -10408,7 +10408,7 @@ } } - // ./ANTLRv3.g:300:3: ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op RULE_REF ( ARG_ACTION )? ) | -> ^( RULE_REF ( ARG_ACTION )? ) ) + // ANTLRv3.g:300:3: ( (op= ROOT_V3TOK |op= BANG_V3TOK ) -> ^( $op RULE_REF ( ARG_ACTION )? ) | -> ^( RULE_REF ( ARG_ACTION )? ) ) { int alt53=2; switch ( LA(1) ) @@ -10422,17 +10422,17 @@ case EOF: case ACTION: case CHAR_LITERAL: + case DOT_SYM: case REWRITE_V3TOK: case RULE_REF: case SEMPRED_V3TOK: case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: case 74: case 75: case 76: - case 78: + case 77: case 81: case 85: case 94: @@ -10463,9 +10463,9 @@ switch (alt53) { case 1: - // ./ANTLRv3.g:300:5: (op= ROOT_V3TOK |op= BANG_V3TOK ) + // ANTLRv3.g:300:5: (op= ROOT_V3TOK |op= BANG_V3TOK ) { - // ./ANTLRv3.g:300:5: (op= ROOT_V3TOK |op= BANG_V3TOK ) + // ANTLRv3.g:300:5: (op= ROOT_V3TOK |op= BANG_V3TOK ) { int alt52=2; switch ( LA(1) ) @@ -10502,7 +10502,7 @@ switch (alt52) { case 1: - // ./ANTLRv3.g:300:6: op= ROOT_V3TOK + // ANTLRv3.g:300:6: op= ROOT_V3TOK { op = (pANTLR3_COMMON_TOKEN) MATCHT(ROOT_V3TOK, &FOLLOW_ROOT_V3TOK_in_atom1896); if (HASEXCEPTION()) @@ -10520,7 +10520,7 @@ } break; case 2: - // ./ANTLRv3.g:300:20: op= BANG_V3TOK + // ANTLRv3.g:300:20: op= BANG_V3TOK { op = (pANTLR3_COMMON_TOKEN) MATCHT(BANG_V3TOK, &FOLLOW_BANG_V3TOK_in_atom1900); if (HASEXCEPTION()) @@ -10542,7 +10542,7 @@ } /* AST REWRITE - * elements : ARG_ACTION, op, RULE_REF + * elements : RULE_REF, op, ARG_ACTION * token labels : op * rule labels : retval * token list labels : @@ -10561,7 +10561,7 @@ retval.tree = root_0; // 300:35: -> ^( $op RULE_REF ( ARG_ACTION )? ) { - // ./ANTLRv3.g:300:38: ^( $op RULE_REF ( ARG_ACTION )? ) + // ANTLRv3.g:300:38: ^( $op RULE_REF ( ARG_ACTION )? ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRootToken(ADAPTOR, stream_op == NULL ? NULL : stream_op->nextToken(stream_op), root_1)); @@ -10570,7 +10570,7 @@ stream_RULE_REF == NULL ? NULL : stream_RULE_REF->nextNode(stream_RULE_REF) ); - // ./ANTLRv3.g:300:53: ( ARG_ACTION )? + // ANTLRv3.g:300:53: ( ARG_ACTION )? { if ( (stream_ARG_ACTION != NULL && stream_ARG_ACTION->hasNext(stream_ARG_ACTION)) ) { @@ -10598,7 +10598,7 @@ } break; case 2: - // ./ANTLRv3.g:301:9: + // ANTLRv3.g:301:9: { /* AST REWRITE * elements : ARG_ACTION, RULE_REF @@ -10618,14 +10618,14 @@ retval.tree = root_0; // 301:9: -> ^( RULE_REF ( ARG_ACTION )? ) { - // ./ANTLRv3.g:301:12: ^( RULE_REF ( ARG_ACTION )? ) + // ANTLRv3.g:301:12: ^( RULE_REF ( ARG_ACTION )? ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_RULE_REF == NULL ? NULL : stream_RULE_REF->nextNode(stream_RULE_REF) , root_1)); - // ./ANTLRv3.g:301:23: ( ARG_ACTION )? + // ANTLRv3.g:301:23: ( ARG_ACTION )? { if ( (stream_ARG_ACTION != NULL && stream_ARG_ACTION->hasNext(stream_ARG_ACTION)) ) { @@ -10697,7 +10697,7 @@ /** * $ANTLR start notSet - * ./ANTLRv3.g:305:1: notSet : '~' ( notTerminal ( elementOptions )? -> ^( '~' notTerminal ( elementOptions )? ) | block ( elementOptions )? -> ^( '~' block ( elementOptions )? ) ) ; + * ANTLRv3.g:305:1: notSet : '~' ( notTerminal ( elementOptions )? -> ^( '~' notTerminal ( elementOptions )? ) | block ( elementOptions )? -> ^( '~' block ( elementOptions )? ) ) ; */ static ANTLRv3Parser_notSet_return notSet(pANTLRv3Parser ctx) @@ -10759,8 +10759,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:306:2: ( '~' ( notTerminal ( elementOptions )? -> ^( '~' notTerminal ( elementOptions )? ) | block ( elementOptions )? -> ^( '~' block ( elementOptions )? ) ) ) - // ./ANTLRv3.g:306:4: '~' ( notTerminal ( elementOptions )? -> ^( '~' notTerminal ( elementOptions )? ) | block ( elementOptions )? -> ^( '~' block ( elementOptions )? ) ) + // ANTLRv3.g:306:2: ( '~' ( notTerminal ( elementOptions )? -> ^( '~' notTerminal ( elementOptions )? ) | block ( elementOptions )? -> ^( '~' block ( elementOptions )? ) ) ) + // ANTLRv3.g:306:4: '~' ( notTerminal ( elementOptions )? -> ^( '~' notTerminal ( elementOptions )? ) | block ( elementOptions )? -> ^( '~' block ( elementOptions )? ) ) { char_literal112 = (pANTLR3_COMMON_TOKEN) MATCHT(96, &FOLLOW_96_in_notSet1944); if (HASEXCEPTION()) @@ -10775,7 +10775,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_96; stream_96->add(stream_96, char_literal112, NULL); } - // ./ANTLRv3.g:307:3: ( notTerminal ( elementOptions )? -> ^( '~' notTerminal ( elementOptions )? ) | block ( elementOptions )? -> ^( '~' block ( elementOptions )? ) ) + // ANTLRv3.g:307:3: ( notTerminal ( elementOptions )? -> ^( '~' notTerminal ( elementOptions )? ) | block ( elementOptions )? -> ^( '~' block ( elementOptions )? ) ) { int alt57=2; switch ( LA(1) ) @@ -10787,7 +10787,7 @@ alt57=1; } break; - case 73: + case 74: { alt57=2; } @@ -10814,7 +10814,7 @@ switch (alt57) { case 1: - // ./ANTLRv3.g:307:5: notTerminal ( elementOptions )? + // ANTLRv3.g:307:5: notTerminal ( elementOptions )? { FOLLOWPUSH(FOLLOW_notTerminal_in_notSet1950); notTerminal113=notTerminal(ctx); @@ -10831,7 +10831,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_notTerminal; stream_notTerminal->add(stream_notTerminal, notTerminal113.tree, NULL); } - // ./ANTLRv3.g:307:17: ( elementOptions )? + // ANTLRv3.g:307:17: ( elementOptions )? { int alt55=2; switch ( LA(1) ) @@ -10846,7 +10846,7 @@ switch (alt55) { case 1: - // ./ANTLRv3.g:307:17: elementOptions + // ANTLRv3.g:307:17: elementOptions { FOLLOWPUSH(FOLLOW_elementOptions_in_notSet1952); elementOptions114=elementOptions(ctx); @@ -10870,7 +10870,7 @@ } /* AST REWRITE - * elements : notTerminal, elementOptions, 96 + * elements : 96, elementOptions, notTerminal * token labels : * rule labels : retval * token list labels : @@ -10887,7 +10887,7 @@ retval.tree = root_0; // 307:33: -> ^( '~' notTerminal ( elementOptions )? ) { - // ./ANTLRv3.g:307:36: ^( '~' notTerminal ( elementOptions )? ) + // ANTLRv3.g:307:36: ^( '~' notTerminal ( elementOptions )? ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -10896,7 +10896,7 @@ ADAPTOR->addChild(ADAPTOR, root_1, stream_notTerminal == NULL ? NULL : stream_notTerminal->nextTree(stream_notTerminal)); - // ./ANTLRv3.g:307:54: ( elementOptions )? + // ANTLRv3.g:307:54: ( elementOptions )? { if ( (stream_elementOptions != NULL && stream_elementOptions->hasNext(stream_elementOptions)) ) { @@ -10921,7 +10921,7 @@ } break; case 2: - // ./ANTLRv3.g:308:5: block ( elementOptions )? + // ANTLRv3.g:308:5: block ( elementOptions )? { FOLLOWPUSH(FOLLOW_block_in_notSet1970); block115=block(ctx); @@ -10938,7 +10938,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_block; stream_block->add(stream_block, block115.tree, NULL); } - // ./ANTLRv3.g:308:11: ( elementOptions )? + // ANTLRv3.g:308:11: ( elementOptions )? { int alt56=2; switch ( LA(1) ) @@ -10953,7 +10953,7 @@ switch (alt56) { case 1: - // ./ANTLRv3.g:308:11: elementOptions + // ANTLRv3.g:308:11: elementOptions { FOLLOWPUSH(FOLLOW_elementOptions_in_notSet1972); elementOptions116=elementOptions(ctx); @@ -10977,7 +10977,7 @@ } /* AST REWRITE - * elements : 96, elementOptions, block + * elements : block, 96, elementOptions * token labels : * rule labels : retval * token list labels : @@ -10994,7 +10994,7 @@ retval.tree = root_0; // 308:28: -> ^( '~' block ( elementOptions )? ) { - // ./ANTLRv3.g:308:31: ^( '~' block ( elementOptions )? ) + // ANTLRv3.g:308:31: ^( '~' block ( elementOptions )? ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -11003,7 +11003,7 @@ ADAPTOR->addChild(ADAPTOR, root_1, stream_block == NULL ? NULL : stream_block->nextTree(stream_block)); - // ./ANTLRv3.g:308:43: ( elementOptions )? + // ANTLRv3.g:308:43: ( elementOptions )? { if ( (stream_elementOptions != NULL && stream_elementOptions->hasNext(stream_elementOptions)) ) { @@ -11068,7 +11068,7 @@ /** * $ANTLR start notTerminal - * ./ANTLRv3.g:312:1: notTerminal : ( CHAR_LITERAL | TOKEN_REF | STRING_LITERAL ); + * ANTLRv3.g:312:1: notTerminal : ( CHAR_LITERAL | TOKEN_REF | STRING_LITERAL ); */ static ANTLRv3Parser_notTerminal_return notTerminal(pANTLRv3Parser ctx) @@ -11097,8 +11097,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:313:2: ( CHAR_LITERAL | TOKEN_REF | STRING_LITERAL ) - // ./ANTLRv3.g: + // ANTLRv3.g:313:2: ( CHAR_LITERAL | TOKEN_REF | STRING_LITERAL ) + // ANTLRv3.g: { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -11165,7 +11165,7 @@ /** * $ANTLR start elementOptions - * ./ANTLRv3.g:318:1: elementOptions : ( '<' qid '>' -> ^( OPTIONS qid ) | '<' option ( ';' option )* '>' -> ^( OPTIONS ( option )+ ) ); + * ANTLRv3.g:318:1: elementOptions : ( '<' qid '>' -> ^( OPTIONS qid ) | '<' option ( ';' option )* '>' -> ^( OPTIONS ( option )+ ) ); */ static ANTLRv3Parser_elementOptions_return elementOptions(pANTLRv3Parser ctx) @@ -11241,7 +11241,7 @@ { { - // ./ANTLRv3.g:319:2: ( '<' qid '>' -> ^( OPTIONS qid ) | '<' option ( ';' option )* '>' -> ^( OPTIONS ( option )+ ) ) + // ANTLRv3.g:319:2: ( '<' qid '>' -> ^( OPTIONS qid ) | '<' option ( ';' option )* '>' -> ^( OPTIONS ( option )+ ) ) ANTLR3_UINT32 alt59; @@ -11258,7 +11258,7 @@ { switch ( LA(3) ) { - case 78: + case DOT_SYM: case 84: { alt59=1; @@ -11333,7 +11333,7 @@ switch (alt59) { case 1: - // ./ANTLRv3.g:319:4: '<' qid '>' + // ANTLRv3.g:319:4: '<' qid '>' { char_literal118 = (pANTLR3_COMMON_TOKEN) MATCHT(82, &FOLLOW_82_in_elementOptions2024); if (HASEXCEPTION()) @@ -11394,7 +11394,7 @@ retval.tree = root_0; // 319:21: -> ^( OPTIONS qid ) { - // ./ANTLRv3.g:319:24: ^( OPTIONS qid ) + // ANTLRv3.g:319:24: ^( OPTIONS qid ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -11417,7 +11417,7 @@ } break; case 2: - // ./ANTLRv3.g:320:4: '<' option ( ';' option )* '>' + // ANTLRv3.g:320:4: '<' option ( ';' option )* '>' { char_literal121 = (pANTLR3_COMMON_TOKEN) MATCHT(82, &FOLLOW_82_in_elementOptions2046); if (HASEXCEPTION()) @@ -11447,7 +11447,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_option; stream_option->add(stream_option, option122.tree, NULL); } - // ./ANTLRv3.g:320:15: ( ';' option )* + // ANTLRv3.g:320:15: ( ';' option )* for (;;) { @@ -11465,7 +11465,7 @@ switch (alt58) { case 1: - // ./ANTLRv3.g:320:16: ';' option + // ANTLRv3.g:320:16: ';' option { char_literal123 = (pANTLR3_COMMON_TOKEN) MATCHT(81, &FOLLOW_81_in_elementOptions2051); if (HASEXCEPTION()) @@ -11537,7 +11537,7 @@ retval.tree = root_0; // 320:33: -> ^( OPTIONS ( option )+ ) { - // ./ANTLRv3.g:320:36: ^( OPTIONS ( option )+ ) + // ANTLRv3.g:320:36: ^( OPTIONS ( option )+ ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -11611,7 +11611,7 @@ /** * $ANTLR start elementOption - * ./ANTLRv3.g:323:1: elementOption : id '=' optionValue -> ^( '=' id optionValue ) ; + * ANTLRv3.g:323:1: elementOption : id '=' optionValue -> ^( '=' id optionValue ) ; */ static ANTLRv3Parser_elementOption_return elementOption(pANTLRv3Parser ctx) @@ -11658,8 +11658,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:324:2: ( id '=' optionValue -> ^( '=' id optionValue ) ) - // ./ANTLRv3.g:324:4: id '=' optionValue + // ANTLRv3.g:324:2: ( id '=' optionValue -> ^( '=' id optionValue ) ) + // ANTLRv3.g:324:4: id '=' optionValue { FOLLOWPUSH(FOLLOW_id_in_elementOption2077); id126=id(ctx); @@ -11705,7 +11705,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_optionValue; stream_optionValue->add(stream_optionValue, optionValue128.tree, NULL); } /* AST REWRITE - * elements : id, LABEL_ASSIGN_V3TOK, optionValue + * elements : id, optionValue, LABEL_ASSIGN_V3TOK * token labels : * rule labels : retval * token list labels : @@ -11722,7 +11722,7 @@ retval.tree = root_0; // 324:23: -> ^( '=' id optionValue ) { - // ./ANTLRv3.g:324:26: ^( '=' id optionValue ) + // ANTLRv3.g:324:26: ^( '=' id optionValue ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -11780,7 +11780,7 @@ /** * $ANTLR start treeSpec - * ./ANTLRv3.g:327:1: treeSpec : '^(' element ( element )+ ')' -> ^( TREE_BEGIN_V3TOK ( element )+ ) ; + * ANTLRv3.g:327:1: treeSpec : '^(' element ( element )+ ')' -> ^( TREE_BEGIN_V3TOK ( element )+ ) ; */ static ANTLRv3Parser_treeSpec_return treeSpec(pANTLRv3Parser ctx) @@ -11803,7 +11803,7 @@ pANTLR3_BASE_TREE string_literal129_tree; pANTLR3_BASE_TREE char_literal132_tree; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_TREE_BEGIN_V3TOK; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_74; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_75; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_element; /* Initialize rule variables */ @@ -11823,16 +11823,16 @@ stream_TREE_BEGIN_V3TOK = NULL; #define CREATE_stream_TREE_BEGIN_V3TOK if (stream_TREE_BEGIN_V3TOK == NULL) {stream_TREE_BEGIN_V3TOK = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token TREE_BEGIN_V3TOK"); } - stream_74 = NULL; - #define CREATE_stream_74 if (stream_74 == NULL) {stream_74 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 74"); } + stream_75 = NULL; + #define CREATE_stream_75 if (stream_75 == NULL) {stream_75 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 75"); } stream_element = NULL; #define CREATE_stream_element if (stream_element == NULL) {stream_element = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule element"); } retval.tree = NULL; { - // ./ANTLRv3.g:328:2: ( '^(' element ( element )+ ')' -> ^( TREE_BEGIN_V3TOK ( element )+ ) ) - // ./ANTLRv3.g:328:4: '^(' element ( element )+ ')' + // ANTLRv3.g:328:2: ( '^(' element ( element )+ ')' -> ^( TREE_BEGIN_V3TOK ( element )+ ) ) + // ANTLRv3.g:328:4: '^(' element ( element )+ ')' { string_literal129 = (pANTLR3_COMMON_TOKEN) MATCHT(TREE_BEGIN_V3TOK, &FOLLOW_TREE_BEGIN_V3TOK_in_treeSpec2103); if (HASEXCEPTION()) @@ -11862,7 +11862,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_element; stream_element->add(stream_element, element130.tree, NULL); } - // ./ANTLRv3.g:328:17: ( element )+ + // ANTLRv3.g:328:17: ( element )+ { int cnt60=0; @@ -11873,13 +11873,13 @@ { case ACTION: case CHAR_LITERAL: + case DOT_SYM: case RULE_REF: case SEMPRED_V3TOK: case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: - case 78: + case 74: case 96: { alt60=1; @@ -11891,7 +11891,7 @@ switch (alt60) { case 1: - // ./ANTLRv3.g:328:19: element + // ANTLRv3.g:328:19: element { FOLLOWPUSH(FOLLOW_element_in_treeSpec2109); element131=element(ctx); @@ -11937,7 +11937,7 @@ loop60: ; /* Jump to here if this rule does not match */ } - char_literal132 = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_treeSpec2114); + char_literal132 = (pANTLR3_COMMON_TOKEN) MATCHT(75, &FOLLOW_75_in_treeSpec2114); if (HASEXCEPTION()) { goto ruletreeSpecEx; @@ -11947,7 +11947,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, char_literal132, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_75; stream_75->add(stream_75, char_literal132, NULL); } /* AST REWRITE @@ -11968,7 +11968,7 @@ retval.tree = root_0; // 328:34: -> ^( TREE_BEGIN_V3TOK ( element )+ ) { - // ./ANTLRv3.g:328:37: ^( TREE_BEGIN_V3TOK ( element )+ ) + // ANTLRv3.g:328:37: ^( TREE_BEGIN_V3TOK ( element )+ ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -12020,7 +12020,7 @@ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); if (stream_TREE_BEGIN_V3TOK != NULL) stream_TREE_BEGIN_V3TOK->free(stream_TREE_BEGIN_V3TOK); - if (stream_74 != NULL) stream_74->free(stream_74); + if (stream_75 != NULL) stream_75->free(stream_75); if (stream_element != NULL) stream_element->free(stream_element); } @@ -12037,7 +12037,7 @@ /** * $ANTLR start range - * ./ANTLRv3.g:331:1: range : c1= CHAR_LITERAL RANGE_V3TOK c2= CHAR_LITERAL ( elementOptions )? -> ^( CHAR_RANGE_V3TOK[$c1,\"..\"] $c1 $c2 ( elementOptions )? ) ; + * ANTLRv3.g:331:1: range : c1= CHAR_LITERAL RANGE_V3TOK c2= CHAR_LITERAL ( elementOptions )? -> ^( CHAR_RANGE_V3TOK[$c1,\"..\"] $c1 $c2 ( elementOptions )? ) ; */ static ANTLRv3Parser_range_return range(pANTLRv3Parser ctx) @@ -12086,8 +12086,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:332:2: (c1= CHAR_LITERAL RANGE_V3TOK c2= CHAR_LITERAL ( elementOptions )? -> ^( CHAR_RANGE_V3TOK[$c1,\"..\"] $c1 $c2 ( elementOptions )? ) ) - // ./ANTLRv3.g:332:4: c1= CHAR_LITERAL RANGE_V3TOK c2= CHAR_LITERAL ( elementOptions )? + // ANTLRv3.g:332:2: (c1= CHAR_LITERAL RANGE_V3TOK c2= CHAR_LITERAL ( elementOptions )? -> ^( CHAR_RANGE_V3TOK[$c1,\"..\"] $c1 $c2 ( elementOptions )? ) ) + // ANTLRv3.g:332:4: c1= CHAR_LITERAL RANGE_V3TOK c2= CHAR_LITERAL ( elementOptions )? { c1 = (pANTLR3_COMMON_TOKEN) MATCHT(CHAR_LITERAL, &FOLLOW_CHAR_LITERAL_in_range2137); if (HASEXCEPTION()) @@ -12128,7 +12128,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_CHAR_LITERAL; stream_CHAR_LITERAL->add(stream_CHAR_LITERAL, c2, NULL); } - // ./ANTLRv3.g:332:48: ( elementOptions )? + // ANTLRv3.g:332:48: ( elementOptions )? { int alt61=2; switch ( LA(1) ) @@ -12143,7 +12143,7 @@ switch (alt61) { case 1: - // ./ANTLRv3.g:332:48: elementOptions + // ANTLRv3.g:332:48: elementOptions { FOLLOWPUSH(FOLLOW_elementOptions_in_range2145); elementOptions134=elementOptions(ctx); @@ -12167,7 +12167,7 @@ } /* AST REWRITE - * elements : c1, c2, elementOptions + * elements : elementOptions, c2, c1 * token labels : c1, c2 * rule labels : retval * token list labels : @@ -12188,7 +12188,7 @@ retval.tree = root_0; // 333:3: -> ^( CHAR_RANGE_V3TOK[$c1,\"..\"] $c1 $c2 ( elementOptions )? ) { - // ./ANTLRv3.g:333:6: ^( CHAR_RANGE_V3TOK[$c1,\"..\"] $c1 $c2 ( elementOptions )? ) + // ANTLRv3.g:333:6: ^( CHAR_RANGE_V3TOK[$c1,\"..\"] $c1 $c2 ( elementOptions )? ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -12205,7 +12205,7 @@ ADAPTOR->addChild(ADAPTOR, root_1, stream_c2 == NULL ? NULL : stream_c2->nextNode(stream_c2)); - // ./ANTLRv3.g:333:43: ( elementOptions )? + // ANTLRv3.g:333:43: ( elementOptions )? { if ( (stream_elementOptions != NULL && stream_elementOptions->hasNext(stream_elementOptions)) ) { @@ -12265,7 +12265,7 @@ /** * $ANTLR start terminal - * ./ANTLRv3.g:336:1: terminal : ( CHAR_LITERAL ( elementOptions )? -> ^( CHAR_LITERAL ( elementOptions )? ) | TOKEN_REF ( ARG_ACTION )? ( elementOptions )? -> ^( TOKEN_REF ( ARG_ACTION )? ( elementOptions )? ) | STRING_LITERAL ( elementOptions )? -> ^( STRING_LITERAL ( elementOptions )? ) | '.' ( elementOptions )? -> ^( '.' ( elementOptions )? ) ) ( ROOT_V3TOK -> ^( ROOT_V3TOK $terminal) | BANG_V3TOK -> ^( BANG_V3TOK $terminal) )? ; + * ANTLRv3.g:336:1: terminal : ( CHAR_LITERAL ( elementOptions )? -> ^( CHAR_LITERAL ( elementOptions )? ) | TOKEN_REF ( ARG_ACTION )? ( elementOptions )? -> ^( TOKEN_REF ( ARG_ACTION )? ( elementOptions )? ) | STRING_LITERAL ( elementOptions )? -> ^( STRING_LITERAL ( elementOptions )? ) | DOT_SYM ( elementOptions )? -> ^( DOT_SYM ( elementOptions )? ) ) ( ROOT_V3TOK -> ^( ROOT_V3TOK $terminal) | BANG_V3TOK -> ^( BANG_V3TOK $terminal) )? ; */ static ANTLRv3Parser_terminal_return terminal(pANTLRv3Parser ctx) @@ -12279,7 +12279,7 @@ pANTLR3_COMMON_TOKEN TOKEN_REF137; pANTLR3_COMMON_TOKEN ARG_ACTION138; pANTLR3_COMMON_TOKEN STRING_LITERAL140; - pANTLR3_COMMON_TOKEN char_literal142; + pANTLR3_COMMON_TOKEN DOT_SYM142; pANTLR3_COMMON_TOKEN ROOT_V3TOK144; pANTLR3_COMMON_TOKEN BANG_V3TOK145; ANTLRv3Parser_elementOptions_return elementOptions136; @@ -12302,11 +12302,11 @@ pANTLR3_BASE_TREE TOKEN_REF137_tree; pANTLR3_BASE_TREE ARG_ACTION138_tree; pANTLR3_BASE_TREE STRING_LITERAL140_tree; - pANTLR3_BASE_TREE char_literal142_tree; + pANTLR3_BASE_TREE DOT_SYM142_tree; pANTLR3_BASE_TREE ROOT_V3TOK144_tree; pANTLR3_BASE_TREE BANG_V3TOK145_tree; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_ROOT_V3TOK; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_78; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_DOT_SYM; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_STRING_LITERAL; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_BANG_V3TOK; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_CHAR_LITERAL; @@ -12322,7 +12322,7 @@ TOKEN_REF137 = NULL; ARG_ACTION138 = NULL; STRING_LITERAL140 = NULL; - char_literal142 = NULL; + DOT_SYM142 = NULL; ROOT_V3TOK144 = NULL; BANG_V3TOK145 = NULL; elementOptions136.tree = NULL; @@ -12339,14 +12339,14 @@ TOKEN_REF137_tree = NULL; ARG_ACTION138_tree = NULL; STRING_LITERAL140_tree = NULL; - char_literal142_tree = NULL; + DOT_SYM142_tree = NULL; ROOT_V3TOK144_tree = NULL; BANG_V3TOK145_tree = NULL; stream_ROOT_V3TOK = NULL; #define CREATE_stream_ROOT_V3TOK if (stream_ROOT_V3TOK == NULL) {stream_ROOT_V3TOK = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token ROOT_V3TOK"); } - stream_78 = NULL; - #define CREATE_stream_78 if (stream_78 == NULL) {stream_78 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 78"); } + stream_DOT_SYM = NULL; + #define CREATE_stream_DOT_SYM if (stream_DOT_SYM == NULL) {stream_DOT_SYM = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token DOT_SYM"); } stream_STRING_LITERAL = NULL; #define CREATE_stream_STRING_LITERAL if (stream_STRING_LITERAL == NULL) {stream_STRING_LITERAL = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token STRING_LITERAL"); } stream_BANG_V3TOK = NULL; @@ -12363,10 +12363,10 @@ retval.tree = NULL; { - // ./ANTLRv3.g:336:9: ( ( CHAR_LITERAL ( elementOptions )? -> ^( CHAR_LITERAL ( elementOptions )? ) | TOKEN_REF ( ARG_ACTION )? ( elementOptions )? -> ^( TOKEN_REF ( ARG_ACTION )? ( elementOptions )? ) | STRING_LITERAL ( elementOptions )? -> ^( STRING_LITERAL ( elementOptions )? ) | '.' ( elementOptions )? -> ^( '.' ( elementOptions )? ) ) ( ROOT_V3TOK -> ^( ROOT_V3TOK $terminal) | BANG_V3TOK -> ^( BANG_V3TOK $terminal) )? ) - // ./ANTLRv3.g:337:2: ( CHAR_LITERAL ( elementOptions )? -> ^( CHAR_LITERAL ( elementOptions )? ) | TOKEN_REF ( ARG_ACTION )? ( elementOptions )? -> ^( TOKEN_REF ( ARG_ACTION )? ( elementOptions )? ) | STRING_LITERAL ( elementOptions )? -> ^( STRING_LITERAL ( elementOptions )? ) | '.' ( elementOptions )? -> ^( '.' ( elementOptions )? ) ) ( ROOT_V3TOK -> ^( ROOT_V3TOK $terminal) | BANG_V3TOK -> ^( BANG_V3TOK $terminal) )? + // ANTLRv3.g:336:9: ( ( CHAR_LITERAL ( elementOptions )? -> ^( CHAR_LITERAL ( elementOptions )? ) | TOKEN_REF ( ARG_ACTION )? ( elementOptions )? -> ^( TOKEN_REF ( ARG_ACTION )? ( elementOptions )? ) | STRING_LITERAL ( elementOptions )? -> ^( STRING_LITERAL ( elementOptions )? ) | DOT_SYM ( elementOptions )? -> ^( DOT_SYM ( elementOptions )? ) ) ( ROOT_V3TOK -> ^( ROOT_V3TOK $terminal) | BANG_V3TOK -> ^( BANG_V3TOK $terminal) )? ) + // ANTLRv3.g:337:2: ( CHAR_LITERAL ( elementOptions )? -> ^( CHAR_LITERAL ( elementOptions )? ) | TOKEN_REF ( ARG_ACTION )? ( elementOptions )? -> ^( TOKEN_REF ( ARG_ACTION )? ( elementOptions )? ) | STRING_LITERAL ( elementOptions )? -> ^( STRING_LITERAL ( elementOptions )? ) | DOT_SYM ( elementOptions )? -> ^( DOT_SYM ( elementOptions )? ) ) ( ROOT_V3TOK -> ^( ROOT_V3TOK $terminal) | BANG_V3TOK -> ^( BANG_V3TOK $terminal) )? { - // ./ANTLRv3.g:337:2: ( CHAR_LITERAL ( elementOptions )? -> ^( CHAR_LITERAL ( elementOptions )? ) | TOKEN_REF ( ARG_ACTION )? ( elementOptions )? -> ^( TOKEN_REF ( ARG_ACTION )? ( elementOptions )? ) | STRING_LITERAL ( elementOptions )? -> ^( STRING_LITERAL ( elementOptions )? ) | '.' ( elementOptions )? -> ^( '.' ( elementOptions )? ) ) + // ANTLRv3.g:337:2: ( CHAR_LITERAL ( elementOptions )? -> ^( CHAR_LITERAL ( elementOptions )? ) | TOKEN_REF ( ARG_ACTION )? ( elementOptions )? -> ^( TOKEN_REF ( ARG_ACTION )? ( elementOptions )? ) | STRING_LITERAL ( elementOptions )? -> ^( STRING_LITERAL ( elementOptions )? ) | DOT_SYM ( elementOptions )? -> ^( DOT_SYM ( elementOptions )? ) ) { int alt67=4; switch ( LA(1) ) @@ -12386,7 +12386,7 @@ alt67=3; } break; - case 78: + case DOT_SYM: { alt67=4; } @@ -12413,7 +12413,7 @@ switch (alt67) { case 1: - // ./ANTLRv3.g:338:3: CHAR_LITERAL ( elementOptions )? + // ANTLRv3.g:338:3: CHAR_LITERAL ( elementOptions )? { CHAR_LITERAL135 = (pANTLR3_COMMON_TOKEN) MATCHT(CHAR_LITERAL, &FOLLOW_CHAR_LITERAL_in_terminal2178); if (HASEXCEPTION()) @@ -12428,7 +12428,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_CHAR_LITERAL; stream_CHAR_LITERAL->add(stream_CHAR_LITERAL, CHAR_LITERAL135, NULL); } - // ./ANTLRv3.g:338:16: ( elementOptions )? + // ANTLRv3.g:338:16: ( elementOptions )? { int alt62=2; switch ( LA(1) ) @@ -12443,7 +12443,7 @@ switch (alt62) { case 1: - // ./ANTLRv3.g:338:16: elementOptions + // ANTLRv3.g:338:16: elementOptions { FOLLOWPUSH(FOLLOW_elementOptions_in_terminal2180); elementOptions136=elementOptions(ctx); @@ -12467,7 +12467,7 @@ } /* AST REWRITE - * elements : CHAR_LITERAL, elementOptions + * elements : elementOptions, CHAR_LITERAL * token labels : * rule labels : retval * token list labels : @@ -12484,14 +12484,14 @@ retval.tree = root_0; // 338:38: -> ^( CHAR_LITERAL ( elementOptions )? ) { - // ./ANTLRv3.g:338:41: ^( CHAR_LITERAL ( elementOptions )? ) + // ANTLRv3.g:338:41: ^( CHAR_LITERAL ( elementOptions )? ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_CHAR_LITERAL == NULL ? NULL : stream_CHAR_LITERAL->nextNode(stream_CHAR_LITERAL) , root_1)); - // ./ANTLRv3.g:338:56: ( elementOptions )? + // ANTLRv3.g:338:56: ( elementOptions )? { if ( (stream_elementOptions != NULL && stream_elementOptions->hasNext(stream_elementOptions)) ) { @@ -12516,7 +12516,7 @@ } break; case 2: - // ./ANTLRv3.g:340:5: TOKEN_REF ( ARG_ACTION )? ( elementOptions )? + // ANTLRv3.g:340:5: TOKEN_REF ( ARG_ACTION )? ( elementOptions )? { TOKEN_REF137 = (pANTLR3_COMMON_TOKEN) MATCHT(TOKEN_REF, &FOLLOW_TOKEN_REF_in_terminal2209); if (HASEXCEPTION()) @@ -12531,7 +12531,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_TOKEN_REF; stream_TOKEN_REF->add(stream_TOKEN_REF, TOKEN_REF137, NULL); } - // ./ANTLRv3.g:340:15: ( ARG_ACTION )? + // ANTLRv3.g:340:15: ( ARG_ACTION )? { int alt63=2; switch ( LA(1) ) @@ -12546,7 +12546,7 @@ switch (alt63) { case 1: - // ./ANTLRv3.g:340:15: ARG_ACTION + // ANTLRv3.g:340:15: ARG_ACTION { ARG_ACTION138 = (pANTLR3_COMMON_TOKEN) MATCHT(ARG_ACTION, &FOLLOW_ARG_ACTION_in_terminal2211); if (HASEXCEPTION()) @@ -12567,7 +12567,7 @@ } } - // ./ANTLRv3.g:340:27: ( elementOptions )? + // ANTLRv3.g:340:27: ( elementOptions )? { int alt64=2; switch ( LA(1) ) @@ -12582,7 +12582,7 @@ switch (alt64) { case 1: - // ./ANTLRv3.g:340:27: elementOptions + // ANTLRv3.g:340:27: elementOptions { FOLLOWPUSH(FOLLOW_elementOptions_in_terminal2214); elementOptions139=elementOptions(ctx); @@ -12606,7 +12606,7 @@ } /* AST REWRITE - * elements : ARG_ACTION, TOKEN_REF, elementOptions + * elements : TOKEN_REF, elementOptions, ARG_ACTION * token labels : * rule labels : retval * token list labels : @@ -12623,14 +12623,14 @@ retval.tree = root_0; // 340:43: -> ^( TOKEN_REF ( ARG_ACTION )? ( elementOptions )? ) { - // ./ANTLRv3.g:340:46: ^( TOKEN_REF ( ARG_ACTION )? ( elementOptions )? ) + // ANTLRv3.g:340:46: ^( TOKEN_REF ( ARG_ACTION )? ( elementOptions )? ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_TOKEN_REF == NULL ? NULL : stream_TOKEN_REF->nextNode(stream_TOKEN_REF) , root_1)); - // ./ANTLRv3.g:340:58: ( ARG_ACTION )? + // ANTLRv3.g:340:58: ( ARG_ACTION )? { if ( (stream_ARG_ACTION != NULL && stream_ARG_ACTION->hasNext(stream_ARG_ACTION)) ) { @@ -12643,7 +12643,7 @@ } - // ./ANTLRv3.g:340:70: ( elementOptions )? + // ANTLRv3.g:340:70: ( elementOptions )? { if ( (stream_elementOptions != NULL && stream_elementOptions->hasNext(stream_elementOptions)) ) { @@ -12668,7 +12668,7 @@ } break; case 3: - // ./ANTLRv3.g:341:5: STRING_LITERAL ( elementOptions )? + // ANTLRv3.g:341:5: STRING_LITERAL ( elementOptions )? { STRING_LITERAL140 = (pANTLR3_COMMON_TOKEN) MATCHT(STRING_LITERAL, &FOLLOW_STRING_LITERAL_in_terminal2233); if (HASEXCEPTION()) @@ -12683,7 +12683,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_STRING_LITERAL; stream_STRING_LITERAL->add(stream_STRING_LITERAL, STRING_LITERAL140, NULL); } - // ./ANTLRv3.g:341:20: ( elementOptions )? + // ANTLRv3.g:341:20: ( elementOptions )? { int alt65=2; switch ( LA(1) ) @@ -12698,7 +12698,7 @@ switch (alt65) { case 1: - // ./ANTLRv3.g:341:20: elementOptions + // ANTLRv3.g:341:20: elementOptions { FOLLOWPUSH(FOLLOW_elementOptions_in_terminal2235); elementOptions141=elementOptions(ctx); @@ -12739,14 +12739,14 @@ retval.tree = root_0; // 341:39: -> ^( STRING_LITERAL ( elementOptions )? ) { - // ./ANTLRv3.g:341:42: ^( STRING_LITERAL ( elementOptions )? ) + // ANTLRv3.g:341:42: ^( STRING_LITERAL ( elementOptions )? ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_STRING_LITERAL == NULL ? NULL : stream_STRING_LITERAL->nextNode(stream_STRING_LITERAL) , root_1)); - // ./ANTLRv3.g:341:59: ( elementOptions )? + // ANTLRv3.g:341:59: ( elementOptions )? { if ( (stream_elementOptions != NULL && stream_elementOptions->hasNext(stream_elementOptions)) ) { @@ -12771,9 +12771,9 @@ } break; case 4: - // ./ANTLRv3.g:342:5: '.' ( elementOptions )? + // ANTLRv3.g:342:5: DOT_SYM ( elementOptions )? { - char_literal142 = (pANTLR3_COMMON_TOKEN) MATCHT(78, &FOLLOW_78_in_terminal2254); + DOT_SYM142 = (pANTLR3_COMMON_TOKEN) MATCHT(DOT_SYM, &FOLLOW_DOT_SYM_in_terminal2254); if (HASEXCEPTION()) { goto ruleterminalEx; @@ -12783,10 +12783,10 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_78; stream_78->add(stream_78, char_literal142, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_DOT_SYM; stream_DOT_SYM->add(stream_DOT_SYM, DOT_SYM142, NULL); } - // ./ANTLRv3.g:342:9: ( elementOptions )? + // ANTLRv3.g:342:13: ( elementOptions )? { int alt66=2; switch ( LA(1) ) @@ -12801,7 +12801,7 @@ switch (alt66) { case 1: - // ./ANTLRv3.g:342:9: elementOptions + // ANTLRv3.g:342:13: elementOptions { FOLLOWPUSH(FOLLOW_elementOptions_in_terminal2256); elementOptions143=elementOptions(ctx); @@ -12825,7 +12825,7 @@ } /* AST REWRITE - * elements : elementOptions, 78 + * elements : elementOptions, DOT_SYM * token labels : * rule labels : retval * token list labels : @@ -12840,16 +12840,16 @@ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); retval.tree = root_0; - // 342:32: -> ^( '.' ( elementOptions )? ) + // 342:36: -> ^( DOT_SYM ( elementOptions )? ) { - // ./ANTLRv3.g:342:35: ^( '.' ( elementOptions )? ) + // ANTLRv3.g:342:39: ^( DOT_SYM ( elementOptions )? ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, - stream_78 == NULL ? NULL : stream_78->nextNode(stream_78) + stream_DOT_SYM == NULL ? NULL : stream_DOT_SYM->nextNode(stream_DOT_SYM) , root_1)); - // ./ANTLRv3.g:342:41: ( elementOptions )? + // ANTLRv3.g:342:49: ( elementOptions )? { if ( (stream_elementOptions != NULL && stream_elementOptions->hasNext(stream_elementOptions)) ) { @@ -12877,7 +12877,7 @@ } } - // ./ANTLRv3.g:344:2: ( ROOT_V3TOK -> ^( ROOT_V3TOK $terminal) | BANG_V3TOK -> ^( BANG_V3TOK $terminal) )? + // ANTLRv3.g:344:2: ( ROOT_V3TOK -> ^( ROOT_V3TOK $terminal) | BANG_V3TOK -> ^( BANG_V3TOK $terminal) )? { int alt68=3; switch ( LA(1) ) @@ -12897,7 +12897,7 @@ switch (alt68) { case 1: - // ./ANTLRv3.g:345:3: ROOT_V3TOK + // ANTLRv3.g:345:3: ROOT_V3TOK { ROOT_V3TOK144 = (pANTLR3_COMMON_TOKEN) MATCHT(ROOT_V3TOK, &FOLLOW_ROOT_V3TOK_in_terminal2283); if (HASEXCEPTION()) @@ -12930,7 +12930,7 @@ retval.tree = root_0; // 345:14: -> ^( ROOT_V3TOK $terminal) { - // ./ANTLRv3.g:345:17: ^( ROOT_V3TOK $terminal) + // ANTLRv3.g:345:17: ^( ROOT_V3TOK $terminal) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -12953,7 +12953,7 @@ } break; case 2: - // ./ANTLRv3.g:346:5: BANG_V3TOK + // ANTLRv3.g:346:5: BANG_V3TOK { BANG_V3TOK145 = (pANTLR3_COMMON_TOKEN) MATCHT(BANG_V3TOK, &FOLLOW_BANG_V3TOK_in_terminal2298); if (HASEXCEPTION()) @@ -12986,7 +12986,7 @@ retval.tree = root_0; // 346:16: -> ^( BANG_V3TOK $terminal) { - // ./ANTLRv3.g:346:19: ^( BANG_V3TOK $terminal) + // ANTLRv3.g:346:19: ^( BANG_V3TOK $terminal) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -13031,7 +13031,7 @@ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); if (stream_ROOT_V3TOK != NULL) stream_ROOT_V3TOK->free(stream_ROOT_V3TOK); - if (stream_78 != NULL) stream_78->free(stream_78); + if (stream_DOT_SYM != NULL) stream_DOT_SYM->free(stream_DOT_SYM); if (stream_STRING_LITERAL != NULL) stream_STRING_LITERAL->free(stream_STRING_LITERAL); if (stream_BANG_V3TOK != NULL) stream_BANG_V3TOK->free(stream_BANG_V3TOK); if (stream_CHAR_LITERAL != NULL) stream_CHAR_LITERAL->free(stream_CHAR_LITERAL); @@ -13053,7 +13053,7 @@ /** * $ANTLR start ebnf - * ./ANTLRv3.g:351:1: ebnf : block (op= '?' -> ^( OPTIONAL_V3TOK[op] block ) |op= '*' -> ^( CLOSURE_V3TOK[op] block ) |op= '+' -> ^( POSITIVE_CLOSURE_V3TOK[op] block ) | '=>' -> { gtype == COMBINED_GRAMMAR_V3TOK && isupper($rule::name->charAt($rule::name, 0)) }? ^( SYNPRED_V3TOK[\"=>\"] block ) -> SYN_SEMPRED_V3TOK | -> block ) ( ROOT_V3TOK -> ^( ROOT_V3TOK $ebnf) | BANG_V3TOK -> ^( BANG_V3TOK $ebnf) )? ; + * ANTLRv3.g:351:1: ebnf : block (op= '?' -> ^( OPTIONAL_V3TOK[op] block ) |op= '*' -> ^( CLOSURE_V3TOK[op] block ) |op= '+' -> ^( POSITIVE_CLOSURE_V3TOK[op] block ) | '=>' -> { gtype == COMBINED_GRAMMAR_V3TOK && isupper($rule::name->charAt($rule::name, 0)) }? ^( SYNPRED_V3TOK[\"=>\"] block ) -> SYN_SEMPRED_V3TOK | -> block ) ( ROOT_V3TOK -> ^( ROOT_V3TOK $ebnf) | BANG_V3TOK -> ^( BANG_V3TOK $ebnf) )? ; */ static ANTLRv3Parser_ebnf_return ebnf(pANTLRv3Parser ctx) @@ -13076,9 +13076,9 @@ pANTLR3_BASE_TREE ROOT_V3TOK148_tree; pANTLR3_BASE_TREE BANG_V3TOK149_tree; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_ROOT_V3TOK; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_77; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_BANG_V3TOK; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_83; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_75; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_76; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_85; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_block; @@ -13105,12 +13105,12 @@ stream_ROOT_V3TOK = NULL; #define CREATE_stream_ROOT_V3TOK if (stream_ROOT_V3TOK == NULL) {stream_ROOT_V3TOK = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token ROOT_V3TOK"); } + stream_77 = NULL; + #define CREATE_stream_77 if (stream_77 == NULL) {stream_77 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 77"); } stream_BANG_V3TOK = NULL; #define CREATE_stream_BANG_V3TOK if (stream_BANG_V3TOK == NULL) {stream_BANG_V3TOK = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token BANG_V3TOK"); } stream_83 = NULL; #define CREATE_stream_83 if (stream_83 == NULL) {stream_83 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 83"); } - stream_75 = NULL; - #define CREATE_stream_75 if (stream_75 == NULL) {stream_75 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 75"); } stream_76 = NULL; #define CREATE_stream_76 if (stream_76 == NULL) {stream_76 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 76"); } stream_85 = NULL; @@ -13121,8 +13121,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:359:2: ( block (op= '?' -> ^( OPTIONAL_V3TOK[op] block ) |op= '*' -> ^( CLOSURE_V3TOK[op] block ) |op= '+' -> ^( POSITIVE_CLOSURE_V3TOK[op] block ) | '=>' -> { gtype == COMBINED_GRAMMAR_V3TOK && isupper($rule::name->charAt($rule::name, 0)) }? ^( SYNPRED_V3TOK[\"=>\"] block ) -> SYN_SEMPRED_V3TOK | -> block ) ( ROOT_V3TOK -> ^( ROOT_V3TOK $ebnf) | BANG_V3TOK -> ^( BANG_V3TOK $ebnf) )? ) - // ./ANTLRv3.g:360:2: block (op= '?' -> ^( OPTIONAL_V3TOK[op] block ) |op= '*' -> ^( CLOSURE_V3TOK[op] block ) |op= '+' -> ^( POSITIVE_CLOSURE_V3TOK[op] block ) | '=>' -> { gtype == COMBINED_GRAMMAR_V3TOK && isupper($rule::name->charAt($rule::name, 0)) }? ^( SYNPRED_V3TOK[\"=>\"] block ) -> SYN_SEMPRED_V3TOK | -> block ) ( ROOT_V3TOK -> ^( ROOT_V3TOK $ebnf) | BANG_V3TOK -> ^( BANG_V3TOK $ebnf) )? + // ANTLRv3.g:359:2: ( block (op= '?' -> ^( OPTIONAL_V3TOK[op] block ) |op= '*' -> ^( CLOSURE_V3TOK[op] block ) |op= '+' -> ^( POSITIVE_CLOSURE_V3TOK[op] block ) | '=>' -> { gtype == COMBINED_GRAMMAR_V3TOK && isupper($rule::name->charAt($rule::name, 0)) }? ^( SYNPRED_V3TOK[\"=>\"] block ) -> SYN_SEMPRED_V3TOK | -> block ) ( ROOT_V3TOK -> ^( ROOT_V3TOK $ebnf) | BANG_V3TOK -> ^( BANG_V3TOK $ebnf) )? ) + // ANTLRv3.g:360:2: block (op= '?' -> ^( OPTIONAL_V3TOK[op] block ) |op= '*' -> ^( CLOSURE_V3TOK[op] block ) |op= '+' -> ^( POSITIVE_CLOSURE_V3TOK[op] block ) | '=>' -> { gtype == COMBINED_GRAMMAR_V3TOK && isupper($rule::name->charAt($rule::name, 0)) }? ^( SYNPRED_V3TOK[\"=>\"] block ) -> SYN_SEMPRED_V3TOK | -> block ) ( ROOT_V3TOK -> ^( ROOT_V3TOK $ebnf) | BANG_V3TOK -> ^( BANG_V3TOK $ebnf) )? { FOLLOWPUSH(FOLLOW_block_in_ebnf2332); block146=block(ctx); @@ -13139,7 +13139,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_block; stream_block->add(stream_block, block146.tree, NULL); } - // ./ANTLRv3.g:361:2: (op= '?' -> ^( OPTIONAL_V3TOK[op] block ) |op= '*' -> ^( CLOSURE_V3TOK[op] block ) |op= '+' -> ^( POSITIVE_CLOSURE_V3TOK[op] block ) | '=>' -> { gtype == COMBINED_GRAMMAR_V3TOK && isupper($rule::name->charAt($rule::name, 0)) }? ^( SYNPRED_V3TOK[\"=>\"] block ) -> SYN_SEMPRED_V3TOK | -> block ) + // ANTLRv3.g:361:2: (op= '?' -> ^( OPTIONAL_V3TOK[op] block ) |op= '*' -> ^( CLOSURE_V3TOK[op] block ) |op= '+' -> ^( POSITIVE_CLOSURE_V3TOK[op] block ) | '=>' -> { gtype == COMBINED_GRAMMAR_V3TOK && isupper($rule::name->charAt($rule::name, 0)) }? ^( SYNPRED_V3TOK[\"=>\"] block ) -> SYN_SEMPRED_V3TOK | -> block ) { int alt69=5; switch ( LA(1) ) @@ -13149,12 +13149,12 @@ alt69=1; } break; - case 75: + case 76: { alt69=2; } break; - case 76: + case 77: { alt69=3; } @@ -13168,6 +13168,7 @@ case ACTION: case BANG_V3TOK: case CHAR_LITERAL: + case DOT_SYM: case REWRITE_V3TOK: case ROOT_V3TOK: case RULE_REF: @@ -13175,9 +13176,8 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 73: case 74: - case 78: + case 75: case 81: case 94: case 96: @@ -13207,7 +13207,7 @@ switch (alt69) { case 1: - // ./ANTLRv3.g:362:3: op= '?' + // ANTLRv3.g:362:3: op= '?' { op = (pANTLR3_COMMON_TOKEN) MATCHT(85, &FOLLOW_85_in_ebnf2341); if (HASEXCEPTION()) @@ -13240,7 +13240,7 @@ retval.tree = root_0; // 362:10: -> ^( OPTIONAL_V3TOK[op] block ) { - // ./ANTLRv3.g:362:13: ^( OPTIONAL_V3TOK[op] block ) + // ANTLRv3.g:362:13: ^( OPTIONAL_V3TOK[op] block ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -13269,9 +13269,9 @@ } break; case 2: - // ./ANTLRv3.g:363:5: op= '*' + // ANTLRv3.g:363:5: op= '*' { - op = (pANTLR3_COMMON_TOKEN) MATCHT(75, &FOLLOW_75_in_ebnf2358); + op = (pANTLR3_COMMON_TOKEN) MATCHT(76, &FOLLOW_76_in_ebnf2358); if (HASEXCEPTION()) { goto ruleebnfEx; @@ -13281,7 +13281,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_75; stream_75->add(stream_75, op, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_76; stream_76->add(stream_76, op, NULL); } /* AST REWRITE @@ -13302,7 +13302,7 @@ retval.tree = root_0; // 363:12: -> ^( CLOSURE_V3TOK[op] block ) { - // ./ANTLRv3.g:363:15: ^( CLOSURE_V3TOK[op] block ) + // ANTLRv3.g:363:15: ^( CLOSURE_V3TOK[op] block ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -13331,9 +13331,9 @@ } break; case 3: - // ./ANTLRv3.g:364:5: op= '+' + // ANTLRv3.g:364:5: op= '+' { - op = (pANTLR3_COMMON_TOKEN) MATCHT(76, &FOLLOW_76_in_ebnf2375); + op = (pANTLR3_COMMON_TOKEN) MATCHT(77, &FOLLOW_77_in_ebnf2375); if (HASEXCEPTION()) { goto ruleebnfEx; @@ -13343,7 +13343,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_76; stream_76->add(stream_76, op, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_77; stream_77->add(stream_77, op, NULL); } /* AST REWRITE @@ -13364,7 +13364,7 @@ retval.tree = root_0; // 364:12: -> ^( POSITIVE_CLOSURE_V3TOK[op] block ) { - // ./ANTLRv3.g:364:15: ^( POSITIVE_CLOSURE_V3TOK[op] block ) + // ANTLRv3.g:364:15: ^( POSITIVE_CLOSURE_V3TOK[op] block ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -13393,7 +13393,7 @@ } break; case 4: - // ./ANTLRv3.g:365:7: '=>' + // ANTLRv3.g:365:7: '=>' { string_literal147 = (pANTLR3_COMMON_TOKEN) MATCHT(83, &FOLLOW_83_in_ebnf2392); if (HASEXCEPTION()) @@ -13427,7 +13427,7 @@ // 366:6: -> { gtype == COMBINED_GRAMMAR_V3TOK && isupper($rule::name->charAt($rule::name, 0)) }? ^( SYNPRED_V3TOK[\"=>\"] block ) if ( gtype == COMBINED_GRAMMAR_V3TOK && isupper((SCOPE_TOP(rule))->name->charAt((SCOPE_TOP(rule))->name, 0)) ) { - // ./ANTLRv3.g:368:9: ^( SYNPRED_V3TOK[\"=>\"] block ) + // ANTLRv3.g:368:9: ^( SYNPRED_V3TOK[\"=>\"] block ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -13464,7 +13464,7 @@ } break; case 5: - // ./ANTLRv3.g:370:11: + // ANTLRv3.g:370:11: { /* AST REWRITE * elements : block @@ -13500,7 +13500,7 @@ } } - // ./ANTLRv3.g:372:2: ( ROOT_V3TOK -> ^( ROOT_V3TOK $ebnf) | BANG_V3TOK -> ^( BANG_V3TOK $ebnf) )? + // ANTLRv3.g:372:2: ( ROOT_V3TOK -> ^( ROOT_V3TOK $ebnf) | BANG_V3TOK -> ^( BANG_V3TOK $ebnf) )? { int alt70=3; switch ( LA(1) ) @@ -13520,7 +13520,7 @@ switch (alt70) { case 1: - // ./ANTLRv3.g:373:3: ROOT_V3TOK + // ANTLRv3.g:373:3: ROOT_V3TOK { ROOT_V3TOK148 = (pANTLR3_COMMON_TOKEN) MATCHT(ROOT_V3TOK, &FOLLOW_ROOT_V3TOK_in_ebnf2459); if (HASEXCEPTION()) @@ -13553,7 +13553,7 @@ retval.tree = root_0; // 373:14: -> ^( ROOT_V3TOK $ebnf) { - // ./ANTLRv3.g:373:17: ^( ROOT_V3TOK $ebnf) + // ANTLRv3.g:373:17: ^( ROOT_V3TOK $ebnf) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -13576,7 +13576,7 @@ } break; case 2: - // ./ANTLRv3.g:374:5: BANG_V3TOK + // ANTLRv3.g:374:5: BANG_V3TOK { BANG_V3TOK149 = (pANTLR3_COMMON_TOKEN) MATCHT(BANG_V3TOK, &FOLLOW_BANG_V3TOK_in_ebnf2474); if (HASEXCEPTION()) @@ -13592,7 +13592,7 @@ /* AST REWRITE - * elements : ebnf, BANG_V3TOK + * elements : BANG_V3TOK, ebnf * token labels : * rule labels : retval * token list labels : @@ -13609,7 +13609,7 @@ retval.tree = root_0; // 374:16: -> ^( BANG_V3TOK $ebnf) { - // ./ANTLRv3.g:374:19: ^( BANG_V3TOK $ebnf) + // ANTLRv3.g:374:19: ^( BANG_V3TOK $ebnf) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -13654,9 +13654,9 @@ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); if (stream_ROOT_V3TOK != NULL) stream_ROOT_V3TOK->free(stream_ROOT_V3TOK); + if (stream_77 != NULL) stream_77->free(stream_77); if (stream_BANG_V3TOK != NULL) stream_BANG_V3TOK->free(stream_BANG_V3TOK); if (stream_83 != NULL) stream_83->free(stream_83); - if (stream_75 != NULL) stream_75->free(stream_75); if (stream_76 != NULL) stream_76->free(stream_76); if (stream_85 != NULL) stream_85->free(stream_85); if (stream_block != NULL) stream_block->free(stream_block); @@ -13687,7 +13687,7 @@ /** * $ANTLR start ebnfSuffix - * ./ANTLRv3.g:378:1: ebnfSuffix : ( '?' -> OPTIONAL_V3TOK[op] | '*' -> CLOSURE_V3TOK[op] | '+' -> POSITIVE_CLOSURE_V3TOK[op] ); + * ANTLRv3.g:378:1: ebnfSuffix : ( '?' -> OPTIONAL_V3TOK[op] | '*' -> CLOSURE_V3TOK[op] | '+' -> POSITIVE_CLOSURE_V3TOK[op] ); */ static ANTLRv3Parser_ebnfSuffix_return ebnfSuffix(pANTLRv3Parser ctx) @@ -13704,7 +13704,7 @@ pANTLR3_BASE_TREE char_literal150_tree; pANTLR3_BASE_TREE char_literal151_tree; pANTLR3_BASE_TREE char_literal152_tree; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_75; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_77; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_76; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_85; @@ -13726,8 +13726,8 @@ char_literal151_tree = NULL; char_literal152_tree = NULL; - stream_75 = NULL; - #define CREATE_stream_75 if (stream_75 == NULL) {stream_75 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 75"); } + stream_77 = NULL; + #define CREATE_stream_77 if (stream_77 == NULL) {stream_77 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 77"); } stream_76 = NULL; #define CREATE_stream_76 if (stream_76 == NULL) {stream_76 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 76"); } stream_85 = NULL; @@ -13737,7 +13737,7 @@ { { - // ./ANTLRv3.g:382:2: ( '?' -> OPTIONAL_V3TOK[op] | '*' -> CLOSURE_V3TOK[op] | '+' -> POSITIVE_CLOSURE_V3TOK[op] ) + // ANTLRv3.g:382:2: ( '?' -> OPTIONAL_V3TOK[op] | '*' -> CLOSURE_V3TOK[op] | '+' -> POSITIVE_CLOSURE_V3TOK[op] ) ANTLR3_UINT32 alt71; @@ -13750,12 +13750,12 @@ alt71=1; } break; - case 75: + case 76: { alt71=2; } break; - case 76: + case 77: { alt71=3; } @@ -13782,7 +13782,7 @@ switch (alt71) { case 1: - // ./ANTLRv3.g:382:4: '?' + // ANTLRv3.g:382:4: '?' { char_literal150 = (pANTLR3_COMMON_TOKEN) MATCHT(85, &FOLLOW_85_in_ebnfSuffix2502); if (HASEXCEPTION()) @@ -13836,9 +13836,9 @@ } break; case 2: - // ./ANTLRv3.g:383:6: '*' + // ANTLRv3.g:383:6: '*' { - char_literal151 = (pANTLR3_COMMON_TOKEN) MATCHT(75, &FOLLOW_75_in_ebnfSuffix2514); + char_literal151 = (pANTLR3_COMMON_TOKEN) MATCHT(76, &FOLLOW_76_in_ebnfSuffix2514); if (HASEXCEPTION()) { goto ruleebnfSuffixEx; @@ -13848,7 +13848,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_75; stream_75->add(stream_75, char_literal151, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_76; stream_76->add(stream_76, char_literal151, NULL); } /* AST REWRITE @@ -13890,9 +13890,9 @@ } break; case 3: - // ./ANTLRv3.g:384:7: '+' + // ANTLRv3.g:384:7: '+' { - char_literal152 = (pANTLR3_COMMON_TOKEN) MATCHT(76, &FOLLOW_76_in_ebnfSuffix2527); + char_literal152 = (pANTLR3_COMMON_TOKEN) MATCHT(77, &FOLLOW_77_in_ebnfSuffix2527); if (HASEXCEPTION()) { goto ruleebnfSuffixEx; @@ -13902,7 +13902,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_76; stream_76->add(stream_76, char_literal152, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_77; stream_77->add(stream_77, char_literal152, NULL); } /* AST REWRITE @@ -13962,7 +13962,7 @@ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); - if (stream_75 != NULL) stream_75->free(stream_75); + if (stream_77 != NULL) stream_77->free(stream_77); if (stream_76 != NULL) stream_76->free(stream_76); if (stream_85 != NULL) stream_85->free(stream_85); } @@ -13980,7 +13980,7 @@ /** * $ANTLR start rewrite - * ./ANTLRv3.g:391:1: rewrite : ( (rew+= '->' preds+= SEMPRED_V3TOK predicated+= rewrite_alternative )* rew2= '->' last= rewrite_alternative -> ( ^( $rew $preds $predicated) )* ^( $rew2 $last) |); + * ANTLRv3.g:391:1: rewrite : ( (rew+= '->' preds+= SEMPRED_V3TOK predicated+= rewrite_alternative )* rew2= '->' last= rewrite_alternative -> ( ^( $rew $preds $predicated) )* ^( $rew2 $last) |); */ static ANTLRv3Parser_rewrite_return rewrite(pANTLRv3Parser ctx) @@ -14042,7 +14042,7 @@ { { - // ./ANTLRv3.g:392:2: ( (rew+= '->' preds+= SEMPRED_V3TOK predicated+= rewrite_alternative )* rew2= '->' last= rewrite_alternative -> ( ^( $rew $preds $predicated) )* ^( $rew2 $last) |) + // ANTLRv3.g:392:2: ( (rew+= '->' preds+= SEMPRED_V3TOK predicated+= rewrite_alternative )* rew2= '->' last= rewrite_alternative -> ( ^( $rew $preds $predicated) )* ^( $rew2 $last) |) ANTLR3_UINT32 alt73; @@ -14056,7 +14056,7 @@ } break; case EOF: - case 74: + case 75: case 81: case 94: { @@ -14085,9 +14085,9 @@ switch (alt73) { case 1: - // ./ANTLRv3.g:392:4: (rew+= '->' preds+= SEMPRED_V3TOK predicated+= rewrite_alternative )* rew2= '->' last= rewrite_alternative + // ANTLRv3.g:392:4: (rew+= '->' preds+= SEMPRED_V3TOK predicated+= rewrite_alternative )* rew2= '->' last= rewrite_alternative { - // ./ANTLRv3.g:392:4: (rew+= '->' preds+= SEMPRED_V3TOK predicated+= rewrite_alternative )* + // ANTLRv3.g:392:4: (rew+= '->' preds+= SEMPRED_V3TOK predicated+= rewrite_alternative )* for (;;) { @@ -14114,7 +14114,7 @@ switch (alt72) { case 1: - // ./ANTLRv3.g:392:5: rew+= '->' preds+= SEMPRED_V3TOK predicated+= rewrite_alternative + // ANTLRv3.g:392:5: rew+= '->' preds+= SEMPRED_V3TOK predicated+= rewrite_alternative { rew = (pANTLR3_COMMON_TOKEN) MATCHT(REWRITE_V3TOK, &FOLLOW_REWRITE_V3TOK_in_rewrite2551); if (HASEXCEPTION()) @@ -14214,7 +14214,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_rewrite_alternative; stream_rewrite_alternative->add(stream_rewrite_alternative, last.tree, NULL); } /* AST REWRITE - * elements : preds, predicated, rew2, rew, last + * elements : rew2, preds, last, rew, predicated * token labels : rew2 * rule labels : retval, last * token list labels : rew, preds @@ -14239,11 +14239,11 @@ retval.tree = root_0; // 394:9: -> ( ^( $rew $preds $predicated) )* ^( $rew2 $last) { - // ./ANTLRv3.g:394:12: ( ^( $rew $preds $predicated) )* + // ANTLRv3.g:394:12: ( ^( $rew $preds $predicated) )* { - while ( (stream_preds != NULL && stream_preds->hasNext(stream_preds)) || (stream_predicated != NULL && stream_predicated->hasNext(stream_predicated)) || (stream_rew != NULL && stream_rew->hasNext(stream_rew)) ) + while ( (stream_preds != NULL && stream_preds->hasNext(stream_preds)) || (stream_rew != NULL && stream_rew->hasNext(stream_rew)) || (stream_predicated != NULL && stream_predicated->hasNext(stream_predicated)) ) { - // ./ANTLRv3.g:394:12: ^( $rew $preds $predicated) + // ANTLRv3.g:394:12: ^( $rew $preds $predicated) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRootToken(ADAPTOR, stream_rew == NULL ? NULL : stream_rew->nextToken(stream_rew), root_1)); @@ -14257,12 +14257,12 @@ } if (stream_preds != NULL) stream_preds->reset(stream_preds); - if (stream_predicated != NULL) stream_predicated->reset(stream_predicated); if (stream_rew != NULL) stream_rew->reset(stream_rew); + if (stream_predicated != NULL) stream_predicated->reset(stream_predicated); } - // ./ANTLRv3.g:394:40: ^( $rew2 $last) + // ANTLRv3.g:394:40: ^( $rew2 $last) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRootToken(ADAPTOR, stream_rew2 == NULL ? NULL : stream_rew2->nextToken(stream_rew2), root_1)); @@ -14287,7 +14287,7 @@ } break; case 2: - // ./ANTLRv3.g:396:2: + // ANTLRv3.g:396:2: { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -14331,7 +14331,7 @@ /** * $ANTLR start rewrite_alternative - * ./ANTLRv3.g:398:1: rewrite_alternative options {backtrack=true; } : ( rewrite_template | rewrite_tree_alternative | -> ^( ALT_V3TOK[\"ALT\"] EPSILON_V3TOK[\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) ); + * ANTLRv3.g:398:1: rewrite_alternative options {backtrack=true; } : ( rewrite_template | rewrite_tree_alternative | -> ^( ALT_V3TOK[\"ALT\"] EPSILON_V3TOK[\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) ); */ static ANTLRv3Parser_rewrite_alternative_return rewrite_alternative(pANTLRv3Parser ctx) @@ -14367,7 +14367,7 @@ { { - // ./ANTLRv3.g:400:2: ( rewrite_template | rewrite_tree_alternative | -> ^( ALT_V3TOK[\"ALT\"] EPSILON_V3TOK[\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) ) + // ANTLRv3.g:400:2: ( rewrite_template | rewrite_tree_alternative | -> ^( ALT_V3TOK[\"ALT\"] EPSILON_V3TOK[\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) ) ANTLR3_UINT32 alt74; @@ -14379,7 +14379,7 @@ { switch ( LA(2) ) { - case 73: + case 74: { switch ( LA(3) ) { @@ -14399,11 +14399,11 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: case 74: case 75: case 76: + case 77: case 85: { alt74=2; @@ -14430,7 +14430,7 @@ } break; - case 74: + case 75: { alt74=1; } @@ -14439,8 +14439,8 @@ case CHAR_LITERAL: case STRING_LITERAL: case TREE_BEGIN_V3TOK: - case 72: case 73: + case 74: { alt74=2; } @@ -14460,11 +14460,11 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: case 74: case 75: case 76: + case 77: case 85: { alt74=2; @@ -14521,10 +14521,10 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: - case 74: + case 73: case 75: case 76: + case 77: case 81: case 85: case 94: @@ -14553,7 +14553,7 @@ } break; - case 73: + case 74: { switch ( LA(2) ) { @@ -14561,17 +14561,17 @@ { switch ( LA(3) ) { - case 74: + case 75: { switch ( LA(4) ) { - case 73: + case 74: { alt74=1; } break; - case 75: case 76: + case 77: case 85: { alt74=2; @@ -14604,10 +14604,10 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: - case 75: + case 74: case 76: + case 77: case 85: { alt74=2; @@ -14639,8 +14639,8 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: + case 74: { alt74=2; } @@ -14703,7 +14703,7 @@ case CHAR_LITERAL: case STRING_LITERAL: case TREE_BEGIN_V3TOK: - case 72: + case 73: { alt74=2; } @@ -14712,7 +14712,7 @@ { switch ( LA(2) ) { - case 73: + case 74: { switch ( LA(3) ) { @@ -14732,11 +14732,11 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: case 74: case 75: case 76: + case 77: case 85: { alt74=2; @@ -14763,7 +14763,7 @@ } break; - case 74: + case 75: { alt74=1; } @@ -14772,8 +14772,8 @@ case CHAR_LITERAL: case STRING_LITERAL: case TREE_BEGIN_V3TOK: - case 72: case 73: + case 74: { alt74=2; } @@ -14793,11 +14793,11 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: case 74: case 75: case 76: + case 77: case 85: { alt74=2; @@ -14853,10 +14853,10 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: - case 74: + case 73: case 75: case 76: + case 77: case 81: case 85: case 94: @@ -14887,7 +14887,7 @@ break; case EOF: case REWRITE_V3TOK: - case 74: + case 75: case 81: case 94: { @@ -14916,7 +14916,7 @@ switch (alt74) { case 1: - // ./ANTLRv3.g:400:4: rewrite_template + // ANTLRv3.g:400:4: rewrite_template { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -14939,7 +14939,7 @@ } break; case 2: - // ./ANTLRv3.g:401:4: rewrite_tree_alternative + // ANTLRv3.g:401:4: rewrite_tree_alternative { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -14962,7 +14962,7 @@ } break; case 3: - // ./ANTLRv3.g:402:29: + // ANTLRv3.g:402:29: { /* AST REWRITE * elements : @@ -14982,7 +14982,7 @@ retval.tree = root_0; // 402:29: -> ^( ALT_V3TOK[\"ALT\"] EPSILON_V3TOK[\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) { - // ./ANTLRv3.g:402:32: ^( ALT_V3TOK[\"ALT\"] EPSILON_V3TOK[\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) + // ANTLRv3.g:402:32: ^( ALT_V3TOK[\"ALT\"] EPSILON_V3TOK[\"EPSILON\"] EOA_V3TOK[\"EOA\"] ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -15062,7 +15062,7 @@ /** * $ANTLR start rewrite_tree_block - * ./ANTLRv3.g:405:1: rewrite_tree_block : lp= '(' rewrite_tree_alternative ')' -> ^( BLOCK_V3TOK[$lp,\"BLOCK\"] rewrite_tree_alternative EOB_V3TOK[$lp,\"EOB\"] ) ; + * ANTLRv3.g:405:1: rewrite_tree_block : lp= '(' rewrite_tree_alternative ')' -> ^( BLOCK_V3TOK[$lp,\"BLOCK\"] rewrite_tree_alternative EOB_V3TOK[$lp,\"EOB\"] ) ; */ static ANTLRv3Parser_rewrite_tree_block_return rewrite_tree_block(pANTLRv3Parser ctx) @@ -15080,8 +15080,8 @@ pANTLR3_BASE_TREE lp_tree; pANTLR3_BASE_TREE char_literal156_tree; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_73; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_74; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_75; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_rewrite_tree_alternative; /* Initialize rule variables */ @@ -15097,20 +15097,20 @@ lp_tree = NULL; char_literal156_tree = NULL; - stream_73 = NULL; - #define CREATE_stream_73 if (stream_73 == NULL) {stream_73 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 73"); } stream_74 = NULL; #define CREATE_stream_74 if (stream_74 == NULL) {stream_74 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 74"); } + stream_75 = NULL; + #define CREATE_stream_75 if (stream_75 == NULL) {stream_75 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 75"); } stream_rewrite_tree_alternative = NULL; #define CREATE_stream_rewrite_tree_alternative if (stream_rewrite_tree_alternative == NULL) {stream_rewrite_tree_alternative = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule rewrite_tree_alternative"); } retval.tree = NULL; { - // ./ANTLRv3.g:406:5: (lp= '(' rewrite_tree_alternative ')' -> ^( BLOCK_V3TOK[$lp,\"BLOCK\"] rewrite_tree_alternative EOB_V3TOK[$lp,\"EOB\"] ) ) - // ./ANTLRv3.g:406:9: lp= '(' rewrite_tree_alternative ')' + // ANTLRv3.g:406:5: (lp= '(' rewrite_tree_alternative ')' -> ^( BLOCK_V3TOK[$lp,\"BLOCK\"] rewrite_tree_alternative EOB_V3TOK[$lp,\"EOB\"] ) ) + // ANTLRv3.g:406:9: lp= '(' rewrite_tree_alternative ')' { - lp = (pANTLR3_COMMON_TOKEN) MATCHT(73, &FOLLOW_73_in_rewrite_tree_block2669); + lp = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_rewrite_tree_block2669); if (HASEXCEPTION()) { goto rulerewrite_tree_blockEx; @@ -15120,7 +15120,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_73; stream_73->add(stream_73, lp, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, lp, NULL); } FOLLOWPUSH(FOLLOW_rewrite_tree_alternative_in_rewrite_tree_block2671); @@ -15138,7 +15138,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_rewrite_tree_alternative; stream_rewrite_tree_alternative->add(stream_rewrite_tree_alternative, rewrite_tree_alternative155.tree, NULL); } - char_literal156 = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_rewrite_tree_block2673); + char_literal156 = (pANTLR3_COMMON_TOKEN) MATCHT(75, &FOLLOW_75_in_rewrite_tree_block2673); if (HASEXCEPTION()) { goto rulerewrite_tree_blockEx; @@ -15148,7 +15148,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, char_literal156, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_75; stream_75->add(stream_75, char_literal156, NULL); } /* AST REWRITE @@ -15169,7 +15169,7 @@ retval.tree = root_0; // 407:6: -> ^( BLOCK_V3TOK[$lp,\"BLOCK\"] rewrite_tree_alternative EOB_V3TOK[$lp,\"EOB\"] ) { - // ./ANTLRv3.g:407:9: ^( BLOCK_V3TOK[$lp,\"BLOCK\"] rewrite_tree_alternative EOB_V3TOK[$lp,\"EOB\"] ) + // ANTLRv3.g:407:9: ^( BLOCK_V3TOK[$lp,\"BLOCK\"] rewrite_tree_alternative EOB_V3TOK[$lp,\"EOB\"] ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -15223,8 +15223,8 @@ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); - if (stream_73 != NULL) stream_73->free(stream_73); if (stream_74 != NULL) stream_74->free(stream_74); + if (stream_75 != NULL) stream_75->free(stream_75); if (stream_rewrite_tree_alternative != NULL) stream_rewrite_tree_alternative->free(stream_rewrite_tree_alternative); } @@ -15241,7 +15241,7 @@ /** * $ANTLR start rewrite_tree_alternative - * ./ANTLRv3.g:410:1: rewrite_tree_alternative : ( rewrite_tree_element )+ -> ^( ALT_V3TOK[\"ALT\"] ( rewrite_tree_element )+ EOA_V3TOK[\"EOA\"] ) ; + * ANTLRv3.g:410:1: rewrite_tree_alternative : ( rewrite_tree_element )+ -> ^( ALT_V3TOK[\"ALT\"] ( rewrite_tree_element )+ EOA_V3TOK[\"EOA\"] ) ; */ static ANTLRv3Parser_rewrite_tree_alternative_return rewrite_tree_alternative(pANTLRv3Parser ctx) @@ -15272,10 +15272,10 @@ retval.tree = NULL; { - // ./ANTLRv3.g:411:5: ( ( rewrite_tree_element )+ -> ^( ALT_V3TOK[\"ALT\"] ( rewrite_tree_element )+ EOA_V3TOK[\"EOA\"] ) ) - // ./ANTLRv3.g:411:7: ( rewrite_tree_element )+ + // ANTLRv3.g:411:5: ( ( rewrite_tree_element )+ -> ^( ALT_V3TOK[\"ALT\"] ( rewrite_tree_element )+ EOA_V3TOK[\"EOA\"] ) ) + // ANTLRv3.g:411:7: ( rewrite_tree_element )+ { - // ./ANTLRv3.g:411:7: ( rewrite_tree_element )+ + // ANTLRv3.g:411:7: ( rewrite_tree_element )+ { int cnt75=0; @@ -15290,8 +15290,8 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: + case 74: { alt75=1; } @@ -15302,7 +15302,7 @@ switch (alt75) { case 1: - // ./ANTLRv3.g:411:7: rewrite_tree_element + // ANTLRv3.g:411:7: rewrite_tree_element { FOLLOWPUSH(FOLLOW_rewrite_tree_element_in_rewrite_tree_alternative2707); rewrite_tree_element157=rewrite_tree_element(ctx); @@ -15366,7 +15366,7 @@ retval.tree = root_0; // 411:29: -> ^( ALT_V3TOK[\"ALT\"] ( rewrite_tree_element )+ EOA_V3TOK[\"EOA\"] ) { - // ./ANTLRv3.g:411:32: ^( ALT_V3TOK[\"ALT\"] ( rewrite_tree_element )+ EOA_V3TOK[\"EOA\"] ) + // ANTLRv3.g:411:32: ^( ALT_V3TOK[\"ALT\"] ( rewrite_tree_element )+ EOA_V3TOK[\"EOA\"] ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -15449,7 +15449,7 @@ /** * $ANTLR start rewrite_tree_element - * ./ANTLRv3.g:414:1: rewrite_tree_element : ( rewrite_tree_atom | rewrite_tree_atom ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree_atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | rewrite_tree ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> rewrite_tree ) | rewrite_tree_ebnf ); + * ANTLRv3.g:414:1: rewrite_tree_element : ( rewrite_tree_atom | rewrite_tree_atom ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree_atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | rewrite_tree ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> rewrite_tree ) | rewrite_tree_ebnf ); */ static ANTLRv3Parser_rewrite_tree_element_return rewrite_tree_element(pANTLRv3Parser ctx) @@ -15517,7 +15517,7 @@ { { - // ./ANTLRv3.g:415:2: ( rewrite_tree_atom | rewrite_tree_atom ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree_atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | rewrite_tree ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> rewrite_tree ) | rewrite_tree_ebnf ) + // ANTLRv3.g:415:2: ( rewrite_tree_atom | rewrite_tree_atom ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree_atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | rewrite_tree ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> rewrite_tree ) | rewrite_tree_ebnf ) ANTLR3_UINT32 alt77; @@ -15537,17 +15537,17 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: case 74: + case 75: case 81: case 94: { alt77=1; } break; - case 75: case 76: + case 77: case 85: { alt77=2; @@ -15590,17 +15590,17 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: case 74: + case 75: case 81: case 94: { alt77=1; } break; - case 75: case 76: + case 77: case 85: { alt77=2; @@ -15635,17 +15635,17 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: case 74: + case 75: case 81: case 94: { alt77=1; } break; - case 75: case 76: + case 77: case 85: { alt77=2; @@ -15684,17 +15684,17 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: case 74: + case 75: case 81: case 94: { alt77=1; } break; - case 75: case 76: + case 77: case 85: { alt77=2; @@ -15733,17 +15733,17 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: case 74: + case 75: case 81: case 94: { alt77=1; } break; - case 75: case 76: + case 77: case 85: { alt77=2; @@ -15770,7 +15770,7 @@ } break; - case 72: + case 73: { switch ( LA(2) ) { @@ -15787,17 +15787,17 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: case 74: + case 75: case 81: case 94: { alt77=1; } break; - case 75: case 76: + case 77: case 85: { alt77=2; @@ -15857,17 +15857,17 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: case 74: + case 75: case 81: case 94: { alt77=1; } break; - case 75: case 76: + case 77: case 85: { alt77=2; @@ -15899,7 +15899,7 @@ alt77=3; } break; - case 73: + case 74: { alt77=4; } @@ -15926,7 +15926,7 @@ switch (alt77) { case 1: - // ./ANTLRv3.g:415:4: rewrite_tree_atom + // ANTLRv3.g:415:4: rewrite_tree_atom { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -15949,7 +15949,7 @@ } break; case 2: - // ./ANTLRv3.g:416:4: rewrite_tree_atom ebnfSuffix + // ANTLRv3.g:416:4: rewrite_tree_atom ebnfSuffix { FOLLOWPUSH(FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2740); rewrite_tree_atom159=rewrite_tree_atom(ctx); @@ -15999,12 +15999,12 @@ retval.tree = root_0; // 417:3: -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree_atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) { - // ./ANTLRv3.g:417:6: ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree_atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) + // ANTLRv3.g:417:6: ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree_atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_ebnfSuffix == NULL ? NULL : stream_ebnfSuffix->nextNode(stream_ebnfSuffix), root_1)); - // ./ANTLRv3.g:417:20: ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree_atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) + // ANTLRv3.g:417:20: ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree_atom EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) { pANTLR3_BASE_TREE root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -16017,7 +16017,7 @@ , root_2)); - // ./ANTLRv3.g:417:43: ^( ALT_V3TOK[\"ALT\"] rewrite_tree_atom EOA_V3TOK[\"EOA\"] ) + // ANTLRv3.g:417:43: ^( ALT_V3TOK[\"ALT\"] rewrite_tree_atom EOA_V3TOK[\"EOA\"] ) { pANTLR3_BASE_TREE root_3 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_3 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -16072,7 +16072,7 @@ } break; case 3: - // ./ANTLRv3.g:418:6: rewrite_tree ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> rewrite_tree ) + // ANTLRv3.g:418:6: rewrite_tree ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> rewrite_tree ) { FOLLOWPUSH(FOLLOW_rewrite_tree_in_rewrite_tree_element2776); rewrite_tree161=rewrite_tree(ctx); @@ -16089,13 +16089,13 @@ if ( BACKTRACKING==0 ) { CREATE_stream_rewrite_tree; stream_rewrite_tree->add(stream_rewrite_tree, rewrite_tree161.tree, NULL); } - // ./ANTLRv3.g:419:3: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> rewrite_tree ) + // ANTLRv3.g:419:3: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) | -> rewrite_tree ) { int alt76=2; switch ( LA(1) ) { - case 75: case 76: + case 77: case 85: { alt76=1; @@ -16109,9 +16109,9 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: case 74: + case 75: case 81: case 94: { @@ -16140,7 +16140,7 @@ switch (alt76) { case 1: - // ./ANTLRv3.g:419:5: ebnfSuffix + // ANTLRv3.g:419:5: ebnfSuffix { FOLLOWPUSH(FOLLOW_ebnfSuffix_in_rewrite_tree_element2782); ebnfSuffix162=ebnfSuffix(ctx); @@ -16175,12 +16175,12 @@ retval.tree = root_0; // 420:4: -> ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) { - // ./ANTLRv3.g:420:7: ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) + // ANTLRv3.g:420:7: ^( ebnfSuffix ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_ebnfSuffix == NULL ? NULL : stream_ebnfSuffix->nextNode(stream_ebnfSuffix), root_1)); - // ./ANTLRv3.g:420:20: ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) + // ANTLRv3.g:420:20: ^( BLOCK_V3TOK[\"BLOCK\"] ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) EOB_V3TOK[\"EOB\"] ) { pANTLR3_BASE_TREE root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -16193,7 +16193,7 @@ , root_2)); - // ./ANTLRv3.g:420:43: ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) + // ANTLRv3.g:420:43: ^( ALT_V3TOK[\"ALT\"] rewrite_tree EOA_V3TOK[\"EOA\"] ) { pANTLR3_BASE_TREE root_3 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_3 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -16248,7 +16248,7 @@ } break; case 2: - // ./ANTLRv3.g:421:5: + // ANTLRv3.g:421:5: { /* AST REWRITE * elements : rewrite_tree @@ -16287,7 +16287,7 @@ } break; case 4: - // ./ANTLRv3.g:423:6: rewrite_tree_ebnf + // ANTLRv3.g:423:6: rewrite_tree_ebnf { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -16346,7 +16346,7 @@ /** * $ANTLR start rewrite_tree_atom - * ./ANTLRv3.g:426:1: rewrite_tree_atom : ( CHAR_LITERAL | TOKEN_REF ( ARG_ACTION )? -> ^( TOKEN_REF ( ARG_ACTION )? ) | RULE_REF | STRING_LITERAL |d= '$' id -> LABEL_V3TOK[$d,$id.text] | ACTION ); + * ANTLRv3.g:426:1: rewrite_tree_atom : ( CHAR_LITERAL | TOKEN_REF ( ARG_ACTION )? -> ^( TOKEN_REF ( ARG_ACTION )? ) | RULE_REF | STRING_LITERAL |d= '$' id -> LABEL_V3TOK[$d,$id.text] | ACTION ); */ static ANTLRv3Parser_rewrite_tree_atom_return rewrite_tree_atom(pANTLRv3Parser ctx) @@ -16374,7 +16374,7 @@ pANTLR3_BASE_TREE RULE_REF167_tree; pANTLR3_BASE_TREE STRING_LITERAL168_tree; pANTLR3_BASE_TREE ACTION170_tree; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_72; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_73; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_TOKEN_REF; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_ARG_ACTION; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_id; @@ -16402,8 +16402,8 @@ STRING_LITERAL168_tree = NULL; ACTION170_tree = NULL; - stream_72 = NULL; - #define CREATE_stream_72 if (stream_72 == NULL) {stream_72 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 72"); } + stream_73 = NULL; + #define CREATE_stream_73 if (stream_73 == NULL) {stream_73 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 73"); } stream_TOKEN_REF = NULL; #define CREATE_stream_TOKEN_REF if (stream_TOKEN_REF == NULL) {stream_TOKEN_REF = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token TOKEN_REF"); } stream_ARG_ACTION = NULL; @@ -16415,7 +16415,7 @@ { { - // ./ANTLRv3.g:427:5: ( CHAR_LITERAL | TOKEN_REF ( ARG_ACTION )? -> ^( TOKEN_REF ( ARG_ACTION )? ) | RULE_REF | STRING_LITERAL |d= '$' id -> LABEL_V3TOK[$d,$id.text] | ACTION ) + // ANTLRv3.g:427:5: ( CHAR_LITERAL | TOKEN_REF ( ARG_ACTION )? -> ^( TOKEN_REF ( ARG_ACTION )? ) | RULE_REF | STRING_LITERAL |d= '$' id -> LABEL_V3TOK[$d,$id.text] | ACTION ) ANTLR3_UINT32 alt79; @@ -16443,7 +16443,7 @@ alt79=4; } break; - case 72: + case 73: { alt79=5; } @@ -16475,7 +16475,7 @@ switch (alt79) { case 1: - // ./ANTLRv3.g:427:9: CHAR_LITERAL + // ANTLRv3.g:427:9: CHAR_LITERAL { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -16498,7 +16498,7 @@ } break; case 2: - // ./ANTLRv3.g:428:6: TOKEN_REF ( ARG_ACTION )? + // ANTLRv3.g:428:6: TOKEN_REF ( ARG_ACTION )? { TOKEN_REF165 = (pANTLR3_COMMON_TOKEN) MATCHT(TOKEN_REF, &FOLLOW_TOKEN_REF_in_rewrite_tree_atom2851); if (HASEXCEPTION()) @@ -16513,7 +16513,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_TOKEN_REF; stream_TOKEN_REF->add(stream_TOKEN_REF, TOKEN_REF165, NULL); } - // ./ANTLRv3.g:428:16: ( ARG_ACTION )? + // ANTLRv3.g:428:16: ( ARG_ACTION )? { int alt78=2; switch ( LA(1) ) @@ -16528,7 +16528,7 @@ switch (alt78) { case 1: - // ./ANTLRv3.g:428:16: ARG_ACTION + // ANTLRv3.g:428:16: ARG_ACTION { ARG_ACTION166 = (pANTLR3_COMMON_TOKEN) MATCHT(ARG_ACTION, &FOLLOW_ARG_ACTION_in_rewrite_tree_atom2853); if (HASEXCEPTION()) @@ -16550,7 +16550,7 @@ } /* AST REWRITE - * elements : ARG_ACTION, TOKEN_REF + * elements : TOKEN_REF, ARG_ACTION * token labels : * rule labels : retval * token list labels : @@ -16567,14 +16567,14 @@ retval.tree = root_0; // 428:28: -> ^( TOKEN_REF ( ARG_ACTION )? ) { - // ./ANTLRv3.g:428:31: ^( TOKEN_REF ( ARG_ACTION )? ) + // ANTLRv3.g:428:31: ^( TOKEN_REF ( ARG_ACTION )? ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_TOKEN_REF == NULL ? NULL : stream_TOKEN_REF->nextNode(stream_TOKEN_REF) , root_1)); - // ./ANTLRv3.g:428:43: ( ARG_ACTION )? + // ANTLRv3.g:428:43: ( ARG_ACTION )? { if ( (stream_ARG_ACTION != NULL && stream_ARG_ACTION->hasNext(stream_ARG_ACTION)) ) { @@ -16601,7 +16601,7 @@ } break; case 3: - // ./ANTLRv3.g:429:9: RULE_REF + // ANTLRv3.g:429:9: RULE_REF { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -16624,7 +16624,7 @@ } break; case 4: - // ./ANTLRv3.g:430:6: STRING_LITERAL + // ANTLRv3.g:430:6: STRING_LITERAL { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -16647,9 +16647,9 @@ } break; case 5: - // ./ANTLRv3.g:431:6: d= '$' id + // ANTLRv3.g:431:6: d= '$' id { - d = (pANTLR3_COMMON_TOKEN) MATCHT(72, &FOLLOW_72_in_rewrite_tree_atom2890); + d = (pANTLR3_COMMON_TOKEN) MATCHT(73, &FOLLOW_73_in_rewrite_tree_atom2890); if (HASEXCEPTION()) { goto rulerewrite_tree_atomEx; @@ -16659,7 +16659,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_72; stream_72->add(stream_72, d, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_73; stream_73->add(stream_73, d, NULL); } FOLLOWPUSH(FOLLOW_id_in_rewrite_tree_atom2892); @@ -16720,7 +16720,7 @@ } break; case 6: - // ./ANTLRv3.g:432:4: ACTION + // ANTLRv3.g:432:4: ACTION { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -16761,7 +16761,7 @@ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); - if (stream_72 != NULL) stream_72->free(stream_72); + if (stream_73 != NULL) stream_73->free(stream_73); if (stream_TOKEN_REF != NULL) stream_TOKEN_REF->free(stream_TOKEN_REF); if (stream_ARG_ACTION != NULL) stream_ARG_ACTION->free(stream_ARG_ACTION); if (stream_id != NULL) stream_id->free(stream_id); @@ -16780,7 +16780,7 @@ /** * $ANTLR start rewrite_tree_ebnf - * ./ANTLRv3.g:435:1: rewrite_tree_ebnf : rewrite_tree_block ebnfSuffix -> ^( ebnfSuffix rewrite_tree_block ) ; + * ANTLRv3.g:435:1: rewrite_tree_ebnf : rewrite_tree_block ebnfSuffix -> ^( ebnfSuffix rewrite_tree_block ) ; */ static ANTLRv3Parser_rewrite_tree_ebnf_return rewrite_tree_ebnf(pANTLRv3Parser ctx) @@ -16823,8 +16823,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:444:2: ( rewrite_tree_block ebnfSuffix -> ^( ebnfSuffix rewrite_tree_block ) ) - // ./ANTLRv3.g:444:4: rewrite_tree_block ebnfSuffix + // ANTLRv3.g:444:2: ( rewrite_tree_block ebnfSuffix -> ^( ebnfSuffix rewrite_tree_block ) ) + // ANTLRv3.g:444:4: rewrite_tree_block ebnfSuffix { FOLLOWPUSH(FOLLOW_rewrite_tree_block_in_rewrite_tree_ebnf2924); rewrite_tree_block171=rewrite_tree_block(ctx); @@ -16857,7 +16857,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_ebnfSuffix; stream_ebnfSuffix->add(stream_ebnfSuffix, ebnfSuffix172.tree, NULL); } /* AST REWRITE - * elements : ebnfSuffix, rewrite_tree_block + * elements : rewrite_tree_block, ebnfSuffix * token labels : * rule labels : retval * token list labels : @@ -16874,7 +16874,7 @@ retval.tree = root_0; // 444:34: -> ^( ebnfSuffix rewrite_tree_block ) { - // ./ANTLRv3.g:444:37: ^( ebnfSuffix rewrite_tree_block ) + // ANTLRv3.g:444:37: ^( ebnfSuffix rewrite_tree_block ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_ebnfSuffix == NULL ? NULL : stream_ebnfSuffix->nextNode(stream_ebnfSuffix), root_1)); @@ -16939,7 +16939,7 @@ /** * $ANTLR start rewrite_tree - * ./ANTLRv3.g:447:1: rewrite_tree : '^(' rewrite_tree_atom ( rewrite_tree_element )* ')' -> ^( TREE_BEGIN_V3TOK rewrite_tree_atom ( rewrite_tree_element )* ) ; + * ANTLRv3.g:447:1: rewrite_tree : '^(' rewrite_tree_atom ( rewrite_tree_element )* ')' -> ^( TREE_BEGIN_V3TOK rewrite_tree_atom ( rewrite_tree_element )* ) ; */ static ANTLRv3Parser_rewrite_tree_return rewrite_tree(pANTLRv3Parser ctx) @@ -16962,7 +16962,7 @@ pANTLR3_BASE_TREE string_literal173_tree; pANTLR3_BASE_TREE char_literal176_tree; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_TREE_BEGIN_V3TOK; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_74; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_75; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_rewrite_tree_element; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_rewrite_tree_atom; /* Initialize rule variables @@ -16983,8 +16983,8 @@ stream_TREE_BEGIN_V3TOK = NULL; #define CREATE_stream_TREE_BEGIN_V3TOK if (stream_TREE_BEGIN_V3TOK == NULL) {stream_TREE_BEGIN_V3TOK = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token TREE_BEGIN_V3TOK"); } - stream_74 = NULL; - #define CREATE_stream_74 if (stream_74 == NULL) {stream_74 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 74"); } + stream_75 = NULL; + #define CREATE_stream_75 if (stream_75 == NULL) {stream_75 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 75"); } stream_rewrite_tree_element = NULL; #define CREATE_stream_rewrite_tree_element if (stream_rewrite_tree_element == NULL) {stream_rewrite_tree_element = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule rewrite_tree_element"); } stream_rewrite_tree_atom = NULL; @@ -16993,8 +16993,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:448:2: ( '^(' rewrite_tree_atom ( rewrite_tree_element )* ')' -> ^( TREE_BEGIN_V3TOK rewrite_tree_atom ( rewrite_tree_element )* ) ) - // ./ANTLRv3.g:448:4: '^(' rewrite_tree_atom ( rewrite_tree_element )* ')' + // ANTLRv3.g:448:2: ( '^(' rewrite_tree_atom ( rewrite_tree_element )* ')' -> ^( TREE_BEGIN_V3TOK rewrite_tree_atom ( rewrite_tree_element )* ) ) + // ANTLRv3.g:448:4: '^(' rewrite_tree_atom ( rewrite_tree_element )* ')' { string_literal173 = (pANTLR3_COMMON_TOKEN) MATCHT(TREE_BEGIN_V3TOK, &FOLLOW_TREE_BEGIN_V3TOK_in_rewrite_tree2946); if (HASEXCEPTION()) @@ -17024,7 +17024,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_rewrite_tree_atom; stream_rewrite_tree_atom->add(stream_rewrite_tree_atom, rewrite_tree_atom174.tree, NULL); } - // ./ANTLRv3.g:448:27: ( rewrite_tree_element )* + // ANTLRv3.g:448:27: ( rewrite_tree_element )* for (;;) { @@ -17037,8 +17037,8 @@ case STRING_LITERAL: case TOKEN_REF: case TREE_BEGIN_V3TOK: - case 72: case 73: + case 74: { alt80=1; } @@ -17049,7 +17049,7 @@ switch (alt80) { case 1: - // ./ANTLRv3.g:448:27: rewrite_tree_element + // ANTLRv3.g:448:27: rewrite_tree_element { FOLLOWPUSH(FOLLOW_rewrite_tree_element_in_rewrite_tree2950); rewrite_tree_element175=rewrite_tree_element(ctx); @@ -17077,7 +17077,7 @@ loop80: ; /* Jump out to here if this rule does not match */ - char_literal176 = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_rewrite_tree2953); + char_literal176 = (pANTLR3_COMMON_TOKEN) MATCHT(75, &FOLLOW_75_in_rewrite_tree2953); if (HASEXCEPTION()) { goto rulerewrite_treeEx; @@ -17087,11 +17087,11 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, char_literal176, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_75; stream_75->add(stream_75, char_literal176, NULL); } /* AST REWRITE - * elements : rewrite_tree_element, rewrite_tree_atom + * elements : rewrite_tree_atom, rewrite_tree_element * token labels : * rule labels : retval * token list labels : @@ -17108,7 +17108,7 @@ retval.tree = root_0; // 449:3: -> ^( TREE_BEGIN_V3TOK rewrite_tree_atom ( rewrite_tree_element )* ) { - // ./ANTLRv3.g:449:6: ^( TREE_BEGIN_V3TOK rewrite_tree_atom ( rewrite_tree_element )* ) + // ANTLRv3.g:449:6: ^( TREE_BEGIN_V3TOK rewrite_tree_atom ( rewrite_tree_element )* ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -17117,7 +17117,7 @@ ADAPTOR->addChild(ADAPTOR, root_1, stream_rewrite_tree_atom == NULL ? NULL : stream_rewrite_tree_atom->nextTree(stream_rewrite_tree_atom)); - // ./ANTLRv3.g:449:43: ( rewrite_tree_element )* + // ANTLRv3.g:449:43: ( rewrite_tree_element )* { while ( (stream_rewrite_tree_element != NULL && stream_rewrite_tree_element->hasNext(stream_rewrite_tree_element)) ) { @@ -17158,7 +17158,7 @@ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); if (stream_TREE_BEGIN_V3TOK != NULL) stream_TREE_BEGIN_V3TOK->free(stream_TREE_BEGIN_V3TOK); - if (stream_74 != NULL) stream_74->free(stream_74); + if (stream_75 != NULL) stream_75->free(stream_75); if (stream_rewrite_tree_element != NULL) stream_rewrite_tree_element->free(stream_rewrite_tree_element); if (stream_rewrite_tree_atom != NULL) stream_rewrite_tree_atom->free(stream_rewrite_tree_atom); } @@ -17176,7 +17176,7 @@ /** * $ANTLR start rewrite_template - * ./ANTLRv3.g:463:1: rewrite_template : ( id lp= '(' rewrite_template_args ')' (str= DOUBLE_QUOTE_STRING_LITERAL |str= DOUBLE_ANGLE_STRING_LITERAL ) -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args $str) | rewrite_template_ref | rewrite_indirect_template_head | ACTION ); + * ANTLRv3.g:463:1: rewrite_template : ( id lp= '(' rewrite_template_args ')' (str= DOUBLE_QUOTE_STRING_LITERAL |str= DOUBLE_ANGLE_STRING_LITERAL ) -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args $str) | rewrite_template_ref | rewrite_indirect_template_head | ACTION ); */ static ANTLRv3Parser_rewrite_template_return rewrite_template(pANTLRv3Parser ctx) @@ -17212,8 +17212,8 @@ pANTLR3_BASE_TREE ACTION182_tree; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_DOUBLE_QUOTE_STRING_LITERAL; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_DOUBLE_ANGLE_STRING_LITERAL; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_73; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_74; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_75; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_id; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_rewrite_template_args; /* Initialize rule variables @@ -17244,10 +17244,10 @@ #define CREATE_stream_DOUBLE_QUOTE_STRING_LITERAL if (stream_DOUBLE_QUOTE_STRING_LITERAL == NULL) {stream_DOUBLE_QUOTE_STRING_LITERAL = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token DOUBLE_QUOTE_STRING_LITERAL"); } stream_DOUBLE_ANGLE_STRING_LITERAL = NULL; #define CREATE_stream_DOUBLE_ANGLE_STRING_LITERAL if (stream_DOUBLE_ANGLE_STRING_LITERAL == NULL) {stream_DOUBLE_ANGLE_STRING_LITERAL = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token DOUBLE_ANGLE_STRING_LITERAL"); } - stream_73 = NULL; - #define CREATE_stream_73 if (stream_73 == NULL) {stream_73 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 73"); } stream_74 = NULL; #define CREATE_stream_74 if (stream_74 == NULL) {stream_74 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 74"); } + stream_75 = NULL; + #define CREATE_stream_75 if (stream_75 == NULL) {stream_75 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 75"); } stream_id = NULL; #define CREATE_stream_id if (stream_id == NULL) {stream_id = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule id"); } stream_rewrite_template_args = NULL; @@ -17257,7 +17257,7 @@ { { - // ./ANTLRv3.g:464:2: ( id lp= '(' rewrite_template_args ')' (str= DOUBLE_QUOTE_STRING_LITERAL |str= DOUBLE_ANGLE_STRING_LITERAL ) -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args $str) | rewrite_template_ref | rewrite_indirect_template_head | ACTION ) + // ANTLRv3.g:464:2: ( id lp= '(' rewrite_template_args ')' (str= DOUBLE_QUOTE_STRING_LITERAL |str= DOUBLE_ANGLE_STRING_LITERAL ) -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args $str) | rewrite_template_ref | rewrite_indirect_template_head | ACTION ) ANTLR3_UINT32 alt82; @@ -17276,7 +17276,7 @@ switch (alt82) { case 1: - // ./ANTLRv3.g:465:3: id lp= '(' rewrite_template_args ')' (str= DOUBLE_QUOTE_STRING_LITERAL |str= DOUBLE_ANGLE_STRING_LITERAL ) + // ANTLRv3.g:465:3: id lp= '(' rewrite_template_args ')' (str= DOUBLE_QUOTE_STRING_LITERAL |str= DOUBLE_ANGLE_STRING_LITERAL ) { FOLLOWPUSH(FOLLOW_id_in_rewrite_template2985); id177=id(ctx); @@ -17293,7 +17293,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_id; stream_id->add(stream_id, id177.tree, NULL); } - lp = (pANTLR3_COMMON_TOKEN) MATCHT(73, &FOLLOW_73_in_rewrite_template2989); + lp = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_rewrite_template2989); if (HASEXCEPTION()) { goto rulerewrite_templateEx; @@ -17303,7 +17303,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_73; stream_73->add(stream_73, lp, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, lp, NULL); } FOLLOWPUSH(FOLLOW_rewrite_template_args_in_rewrite_template2991); @@ -17321,7 +17321,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_rewrite_template_args; stream_rewrite_template_args->add(stream_rewrite_template_args, rewrite_template_args178.tree, NULL); } - char_literal179 = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_rewrite_template2993); + char_literal179 = (pANTLR3_COMMON_TOKEN) MATCHT(75, &FOLLOW_75_in_rewrite_template2993); if (HASEXCEPTION()) { goto rulerewrite_templateEx; @@ -17331,10 +17331,10 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, char_literal179, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_75; stream_75->add(stream_75, char_literal179, NULL); } - // ./ANTLRv3.g:466:3: (str= DOUBLE_QUOTE_STRING_LITERAL |str= DOUBLE_ANGLE_STRING_LITERAL ) + // ANTLRv3.g:466:3: (str= DOUBLE_QUOTE_STRING_LITERAL |str= DOUBLE_ANGLE_STRING_LITERAL ) { int alt81=2; switch ( LA(1) ) @@ -17371,7 +17371,7 @@ switch (alt81) { case 1: - // ./ANTLRv3.g:466:5: str= DOUBLE_QUOTE_STRING_LITERAL + // ANTLRv3.g:466:5: str= DOUBLE_QUOTE_STRING_LITERAL { str = (pANTLR3_COMMON_TOKEN) MATCHT(DOUBLE_QUOTE_STRING_LITERAL, &FOLLOW_DOUBLE_QUOTE_STRING_LITERAL_in_rewrite_template3001); if (HASEXCEPTION()) @@ -17389,7 +17389,7 @@ } break; case 2: - // ./ANTLRv3.g:466:39: str= DOUBLE_ANGLE_STRING_LITERAL + // ANTLRv3.g:466:39: str= DOUBLE_ANGLE_STRING_LITERAL { str = (pANTLR3_COMMON_TOKEN) MATCHT(DOUBLE_ANGLE_STRING_LITERAL, &FOLLOW_DOUBLE_ANGLE_STRING_LITERAL_in_rewrite_template3007); if (HASEXCEPTION()) @@ -17411,7 +17411,7 @@ } /* AST REWRITE - * elements : str, rewrite_template_args, id + * elements : id, rewrite_template_args, str * token labels : str * rule labels : retval * token list labels : @@ -17430,7 +17430,7 @@ retval.tree = root_0; // 467:3: -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args $str) { - // ./ANTLRv3.g:467:6: ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args $str) + // ANTLRv3.g:467:6: ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args $str) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -17464,7 +17464,7 @@ } break; case 2: - // ./ANTLRv3.g:470:3: rewrite_template_ref + // ANTLRv3.g:470:3: rewrite_template_ref { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -17487,7 +17487,7 @@ } break; case 3: - // ./ANTLRv3.g:473:3: rewrite_indirect_template_head + // ANTLRv3.g:473:3: rewrite_indirect_template_head { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -17510,7 +17510,7 @@ } break; case 4: - // ./ANTLRv3.g:476:3: ACTION + // ANTLRv3.g:476:3: ACTION { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -17553,8 +17553,8 @@ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); if (stream_DOUBLE_QUOTE_STRING_LITERAL != NULL) stream_DOUBLE_QUOTE_STRING_LITERAL->free(stream_DOUBLE_QUOTE_STRING_LITERAL); if (stream_DOUBLE_ANGLE_STRING_LITERAL != NULL) stream_DOUBLE_ANGLE_STRING_LITERAL->free(stream_DOUBLE_ANGLE_STRING_LITERAL); - if (stream_73 != NULL) stream_73->free(stream_73); if (stream_74 != NULL) stream_74->free(stream_74); + if (stream_75 != NULL) stream_75->free(stream_75); if (stream_id != NULL) stream_id->free(stream_id); if (stream_rewrite_template_args != NULL) stream_rewrite_template_args->free(stream_rewrite_template_args); } @@ -17572,7 +17572,7 @@ /** * $ANTLR start rewrite_template_ref - * ./ANTLRv3.g:480:1: rewrite_template_ref : id lp= '(' rewrite_template_args ')' -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args ) ; + * ANTLRv3.g:480:1: rewrite_template_ref : id lp= '(' rewrite_template_args ')' -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args ) ; */ static ANTLRv3Parser_rewrite_template_ref_return rewrite_template_ref(pANTLRv3Parser ctx) @@ -17594,8 +17594,8 @@ pANTLR3_BASE_TREE lp_tree; pANTLR3_BASE_TREE char_literal185_tree; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_73; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_74; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_75; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_id; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_rewrite_template_args; /* Initialize rule variables @@ -17614,10 +17614,10 @@ lp_tree = NULL; char_literal185_tree = NULL; - stream_73 = NULL; - #define CREATE_stream_73 if (stream_73 == NULL) {stream_73 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 73"); } stream_74 = NULL; #define CREATE_stream_74 if (stream_74 == NULL) {stream_74 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 74"); } + stream_75 = NULL; + #define CREATE_stream_75 if (stream_75 == NULL) {stream_75 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 75"); } stream_id = NULL; #define CREATE_stream_id if (stream_id == NULL) {stream_id = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule id"); } stream_rewrite_template_args = NULL; @@ -17626,8 +17626,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:481:2: ( id lp= '(' rewrite_template_args ')' -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args ) ) - // ./ANTLRv3.g:481:4: id lp= '(' rewrite_template_args ')' + // ANTLRv3.g:481:2: ( id lp= '(' rewrite_template_args ')' -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args ) ) + // ANTLRv3.g:481:4: id lp= '(' rewrite_template_args ')' { FOLLOWPUSH(FOLLOW_id_in_rewrite_template_ref3065); id183=id(ctx); @@ -17644,7 +17644,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_id; stream_id->add(stream_id, id183.tree, NULL); } - lp = (pANTLR3_COMMON_TOKEN) MATCHT(73, &FOLLOW_73_in_rewrite_template_ref3069); + lp = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_rewrite_template_ref3069); if (HASEXCEPTION()) { goto rulerewrite_template_refEx; @@ -17654,7 +17654,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_73; stream_73->add(stream_73, lp, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, lp, NULL); } FOLLOWPUSH(FOLLOW_rewrite_template_args_in_rewrite_template_ref3071); @@ -17672,7 +17672,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_rewrite_template_args; stream_rewrite_template_args->add(stream_rewrite_template_args, rewrite_template_args184.tree, NULL); } - char_literal185 = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_rewrite_template_ref3073); + char_literal185 = (pANTLR3_COMMON_TOKEN) MATCHT(75, &FOLLOW_75_in_rewrite_template_ref3073); if (HASEXCEPTION()) { goto rulerewrite_template_refEx; @@ -17682,7 +17682,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, char_literal185, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_75; stream_75->add(stream_75, char_literal185, NULL); } /* AST REWRITE @@ -17703,7 +17703,7 @@ retval.tree = root_0; // 482:3: -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args ) { - // ./ANTLRv3.g:482:6: ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args ) + // ANTLRv3.g:482:6: ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] id rewrite_template_args ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -17749,8 +17749,8 @@ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); - if (stream_73 != NULL) stream_73->free(stream_73); if (stream_74 != NULL) stream_74->free(stream_74); + if (stream_75 != NULL) stream_75->free(stream_75); if (stream_id != NULL) stream_id->free(stream_id); if (stream_rewrite_template_args != NULL) stream_rewrite_template_args->free(stream_rewrite_template_args); } @@ -17768,7 +17768,7 @@ /** * $ANTLR start rewrite_indirect_template_head - * ./ANTLRv3.g:486:1: rewrite_indirect_template_head : lp= '(' ACTION ')' '(' rewrite_template_args ')' -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] ACTION rewrite_template_args ) ; + * ANTLRv3.g:486:1: rewrite_indirect_template_head : lp= '(' ACTION ')' '(' rewrite_template_args ')' -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] ACTION rewrite_template_args ) ; */ static ANTLRv3Parser_rewrite_indirect_template_head_return rewrite_indirect_template_head(pANTLRv3Parser ctx) @@ -17793,8 +17793,8 @@ pANTLR3_BASE_TREE char_literal188_tree; pANTLR3_BASE_TREE char_literal190_tree; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_ACTION; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_73; pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_74; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_75; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_rewrite_template_args; /* Initialize rule variables */ @@ -17818,20 +17818,20 @@ stream_ACTION = NULL; #define CREATE_stream_ACTION if (stream_ACTION == NULL) {stream_ACTION = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token ACTION"); } - stream_73 = NULL; - #define CREATE_stream_73 if (stream_73 == NULL) {stream_73 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 73"); } stream_74 = NULL; #define CREATE_stream_74 if (stream_74 == NULL) {stream_74 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 74"); } + stream_75 = NULL; + #define CREATE_stream_75 if (stream_75 == NULL) {stream_75 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 75"); } stream_rewrite_template_args = NULL; #define CREATE_stream_rewrite_template_args if (stream_rewrite_template_args == NULL) {stream_rewrite_template_args = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule rewrite_template_args"); } retval.tree = NULL; { - // ./ANTLRv3.g:487:2: (lp= '(' ACTION ')' '(' rewrite_template_args ')' -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] ACTION rewrite_template_args ) ) - // ./ANTLRv3.g:487:4: lp= '(' ACTION ')' '(' rewrite_template_args ')' + // ANTLRv3.g:487:2: (lp= '(' ACTION ')' '(' rewrite_template_args ')' -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] ACTION rewrite_template_args ) ) + // ANTLRv3.g:487:4: lp= '(' ACTION ')' '(' rewrite_template_args ')' { - lp = (pANTLR3_COMMON_TOKEN) MATCHT(73, &FOLLOW_73_in_rewrite_indirect_template_head3101); + lp = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_rewrite_indirect_template_head3101); if (HASEXCEPTION()) { goto rulerewrite_indirect_template_headEx; @@ -17841,7 +17841,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_73; stream_73->add(stream_73, lp, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, lp, NULL); } ACTION186 = (pANTLR3_COMMON_TOKEN) MATCHT(ACTION, &FOLLOW_ACTION_in_rewrite_indirect_template_head3103); @@ -17857,7 +17857,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_ACTION; stream_ACTION->add(stream_ACTION, ACTION186, NULL); } - char_literal187 = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_rewrite_indirect_template_head3105); + char_literal187 = (pANTLR3_COMMON_TOKEN) MATCHT(75, &FOLLOW_75_in_rewrite_indirect_template_head3105); if (HASEXCEPTION()) { goto rulerewrite_indirect_template_headEx; @@ -17867,10 +17867,10 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, char_literal187, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_75; stream_75->add(stream_75, char_literal187, NULL); } - char_literal188 = (pANTLR3_COMMON_TOKEN) MATCHT(73, &FOLLOW_73_in_rewrite_indirect_template_head3107); + char_literal188 = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_rewrite_indirect_template_head3107); if (HASEXCEPTION()) { goto rulerewrite_indirect_template_headEx; @@ -17880,7 +17880,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_73; stream_73->add(stream_73, char_literal188, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, char_literal188, NULL); } FOLLOWPUSH(FOLLOW_rewrite_template_args_in_rewrite_indirect_template_head3109); @@ -17898,7 +17898,7 @@ if ( BACKTRACKING==0 ) { CREATE_stream_rewrite_template_args; stream_rewrite_template_args->add(stream_rewrite_template_args, rewrite_template_args189.tree, NULL); } - char_literal190 = (pANTLR3_COMMON_TOKEN) MATCHT(74, &FOLLOW_74_in_rewrite_indirect_template_head3111); + char_literal190 = (pANTLR3_COMMON_TOKEN) MATCHT(75, &FOLLOW_75_in_rewrite_indirect_template_head3111); if (HASEXCEPTION()) { goto rulerewrite_indirect_template_headEx; @@ -17908,7 +17908,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_74; stream_74->add(stream_74, char_literal190, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_75; stream_75->add(stream_75, char_literal190, NULL); } /* AST REWRITE @@ -17929,7 +17929,7 @@ retval.tree = root_0; // 488:3: -> ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] ACTION rewrite_template_args ) { - // ./ANTLRv3.g:488:6: ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] ACTION rewrite_template_args ) + // ANTLRv3.g:488:6: ^( TEMPLATE_V3TOK[$lp,\"TEMPLATE\"] ACTION rewrite_template_args ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -17978,8 +17978,8 @@ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); if (stream_ACTION != NULL) stream_ACTION->free(stream_ACTION); - if (stream_73 != NULL) stream_73->free(stream_73); if (stream_74 != NULL) stream_74->free(stream_74); + if (stream_75 != NULL) stream_75->free(stream_75); if (stream_rewrite_template_args != NULL) stream_rewrite_template_args->free(stream_rewrite_template_args); } @@ -17996,7 +17996,7 @@ /** * $ANTLR start rewrite_template_args - * ./ANTLRv3.g:491:1: rewrite_template_args : ( rewrite_template_arg ( ',' rewrite_template_arg )* -> ^( ARGLIST_V3TOK ( rewrite_template_arg )+ ) | -> ARGLIST_V3TOK ); + * ANTLRv3.g:491:1: rewrite_template_args : ( rewrite_template_arg ( ',' rewrite_template_arg )* -> ^( ARGLIST_V3TOK ( rewrite_template_arg )+ ) | -> ARGLIST_V3TOK ); */ static ANTLRv3Parser_rewrite_template_args_return rewrite_template_args(pANTLRv3Parser ctx) @@ -18016,7 +18016,7 @@ #define RETURN_TYPE_rewrite_template_arg193 ANTLRv3Parser_rewrite_template_arg_return pANTLR3_BASE_TREE char_literal192_tree; - pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_77; + pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_78; pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_rewrite_template_arg; /* Initialize rule variables */ @@ -18032,8 +18032,8 @@ char_literal192_tree = NULL; - stream_77 = NULL; - #define CREATE_stream_77 if (stream_77 == NULL) {stream_77 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 77"); } + stream_78 = NULL; + #define CREATE_stream_78 if (stream_78 == NULL) {stream_78 = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token 78"); } stream_rewrite_template_arg = NULL; #define CREATE_stream_rewrite_template_arg if (stream_rewrite_template_arg == NULL) {stream_rewrite_template_arg = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule rewrite_template_arg"); } @@ -18041,7 +18041,7 @@ { { - // ./ANTLRv3.g:492:2: ( rewrite_template_arg ( ',' rewrite_template_arg )* -> ^( ARGLIST_V3TOK ( rewrite_template_arg )+ ) | -> ARGLIST_V3TOK ) + // ANTLRv3.g:492:2: ( rewrite_template_arg ( ',' rewrite_template_arg )* -> ^( ARGLIST_V3TOK ( rewrite_template_arg )+ ) | -> ARGLIST_V3TOK ) ANTLR3_UINT32 alt84; @@ -18055,7 +18055,7 @@ alt84=1; } break; - case 74: + case 75: { alt84=2; } @@ -18082,7 +18082,7 @@ switch (alt84) { case 1: - // ./ANTLRv3.g:492:4: rewrite_template_arg ( ',' rewrite_template_arg )* + // ANTLRv3.g:492:4: rewrite_template_arg ( ',' rewrite_template_arg )* { FOLLOWPUSH(FOLLOW_rewrite_template_arg_in_rewrite_template_args3135); rewrite_template_arg191=rewrite_template_arg(ctx); @@ -18099,14 +18099,14 @@ if ( BACKTRACKING==0 ) { CREATE_stream_rewrite_template_arg; stream_rewrite_template_arg->add(stream_rewrite_template_arg, rewrite_template_arg191.tree, NULL); } - // ./ANTLRv3.g:492:25: ( ',' rewrite_template_arg )* + // ANTLRv3.g:492:25: ( ',' rewrite_template_arg )* for (;;) { int alt83=2; switch ( LA(1) ) { - case 77: + case 78: { alt83=1; } @@ -18117,9 +18117,9 @@ switch (alt83) { case 1: - // ./ANTLRv3.g:492:26: ',' rewrite_template_arg + // ANTLRv3.g:492:26: ',' rewrite_template_arg { - char_literal192 = (pANTLR3_COMMON_TOKEN) MATCHT(77, &FOLLOW_77_in_rewrite_template_args3138); + char_literal192 = (pANTLR3_COMMON_TOKEN) MATCHT(78, &FOLLOW_78_in_rewrite_template_args3138); if (HASEXCEPTION()) { goto rulerewrite_template_argsEx; @@ -18129,7 +18129,7 @@ return retval; } - if ( BACKTRACKING==0 ) { CREATE_stream_77; stream_77->add(stream_77, char_literal192, NULL); } + if ( BACKTRACKING==0 ) { CREATE_stream_78; stream_78->add(stream_78, char_literal192, NULL); } FOLLOWPUSH(FOLLOW_rewrite_template_arg_in_rewrite_template_args3140); @@ -18176,7 +18176,7 @@ retval.tree = root_0; // 493:3: -> ^( ARGLIST_V3TOK ( rewrite_template_arg )+ ) { - // ./ANTLRv3.g:493:6: ^( ARGLIST_V3TOK ( rewrite_template_arg )+ ) + // ANTLRv3.g:493:6: ^( ARGLIST_V3TOK ( rewrite_template_arg )+ ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -18212,7 +18212,7 @@ } break; case 2: - // ./ANTLRv3.g:494:4: + // ANTLRv3.g:494:4: { /* AST REWRITE * elements : @@ -18265,7 +18265,7 @@ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); - if (stream_77 != NULL) stream_77->free(stream_77); + if (stream_78 != NULL) stream_78->free(stream_78); if (stream_rewrite_template_arg != NULL) stream_rewrite_template_arg->free(stream_rewrite_template_arg); } @@ -18282,7 +18282,7 @@ /** * $ANTLR start rewrite_template_arg - * ./ANTLRv3.g:497:1: rewrite_template_arg : id '=' ACTION -> ^( ARG_V3TOK[$id.start] id ACTION ) ; + * ANTLRv3.g:497:1: rewrite_template_arg : id '=' ACTION -> ^( ARG_V3TOK[$id.start] id ACTION ) ; */ static ANTLRv3Parser_rewrite_template_arg_return rewrite_template_arg(pANTLRv3Parser ctx) @@ -18327,8 +18327,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:498:2: ( id '=' ACTION -> ^( ARG_V3TOK[$id.start] id ACTION ) ) - // ./ANTLRv3.g:498:6: id '=' ACTION + // ANTLRv3.g:498:2: ( id '=' ACTION -> ^( ARG_V3TOK[$id.start] id ACTION ) ) + // ANTLRv3.g:498:6: id '=' ACTION { FOLLOWPUSH(FOLLOW_id_in_rewrite_template_arg3173); id194=id(ctx); @@ -18372,7 +18372,7 @@ /* AST REWRITE - * elements : id, ACTION + * elements : ACTION, id * token labels : * rule labels : retval * token list labels : @@ -18389,7 +18389,7 @@ retval.tree = root_0; // 498:20: -> ^( ARG_V3TOK[$id.start] id ACTION ) { - // ./ANTLRv3.g:498:23: ^( ARG_V3TOK[$id.start] id ACTION ) + // ANTLRv3.g:498:23: ^( ARG_V3TOK[$id.start] id ACTION ) { pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, @@ -18455,7 +18455,7 @@ /** * $ANTLR start qid - * ./ANTLRv3.g:501:1: qid : id ( '.' id )* ; + * ANTLRv3.g:501:1: qid : id ( DOT_SYM id )* ; */ static ANTLRv3Parser_qid_return qid(pANTLRv3Parser ctx) @@ -18465,7 +18465,7 @@ pANTLR3_BASE_TREE root_0; - pANTLR3_COMMON_TOKEN char_literal198; + pANTLR3_COMMON_TOKEN DOT_SYM198; ANTLRv3Parser_id_return id197; #undef RETURN_TYPE_id197 #define RETURN_TYPE_id197 ANTLRv3Parser_id_return @@ -18474,28 +18474,28 @@ #undef RETURN_TYPE_id199 #define RETURN_TYPE_id199 ANTLRv3Parser_id_return - pANTLR3_BASE_TREE char_literal198_tree; + pANTLR3_BASE_TREE DOT_SYM198_tree; /* Initialize rule variables */ root_0 = NULL; - char_literal198 = NULL; + DOT_SYM198 = NULL; id197.tree = NULL; id199.tree = NULL; retval.start = LT(1); retval.stop = retval.start; - char_literal198_tree = NULL; + DOT_SYM198_tree = NULL; retval.tree = NULL; { - // ./ANTLRv3.g:501:5: ( id ( '.' id )* ) - // ./ANTLRv3.g:501:7: id ( '.' id )* + // ANTLRv3.g:501:5: ( id ( DOT_SYM id )* ) + // ANTLRv3.g:501:7: id ( DOT_SYM id )* { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -18515,14 +18515,14 @@ if ( BACKTRACKING==0 ) ADAPTOR->addChild(ADAPTOR, root_0, id197.tree); - // ./ANTLRv3.g:501:10: ( '.' id )* + // ANTLRv3.g:501:10: ( DOT_SYM id )* for (;;) { int alt85=2; switch ( LA(1) ) { - case 78: + case DOT_SYM: { alt85=1; } @@ -18533,9 +18533,9 @@ switch (alt85) { case 1: - // ./ANTLRv3.g:501:11: '.' id + // ANTLRv3.g:501:11: DOT_SYM id { - char_literal198 = (pANTLR3_COMMON_TOKEN) MATCHT(78, &FOLLOW_78_in_qid3201); + DOT_SYM198 = (pANTLR3_COMMON_TOKEN) MATCHT(DOT_SYM, &FOLLOW_DOT_SYM_in_qid3201); if (HASEXCEPTION()) { goto ruleqidEx; @@ -18546,8 +18546,8 @@ } if ( BACKTRACKING==0 ) { - char_literal198_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, char_literal198)); - ADAPTOR->addChild(ADAPTOR, root_0, char_literal198_tree); + DOT_SYM198_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, DOT_SYM198)); + ADAPTOR->addChild(ADAPTOR, root_0, DOT_SYM198_tree); } FOLLOWPUSH(FOLLOW_id_in_qid3203); @@ -18609,7 +18609,7 @@ /** * $ANTLR start id - * ./ANTLRv3.g:503:1: id : ( TOKEN_REF | RULE_REF ); + * ANTLRv3.g:503:1: id : ( TOKEN_REF | RULE_REF ); */ static ANTLRv3Parser_id_return id(pANTLRv3Parser ctx) @@ -18638,8 +18638,8 @@ retval.tree = NULL; { - // ./ANTLRv3.g:503:4: ( TOKEN_REF | RULE_REF ) - // ./ANTLRv3.g: + // ANTLRv3.g:503:4: ( TOKEN_REF | RULE_REF ) + // ANTLRv3.g: { root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); @@ -18715,8 +18715,8 @@ // $ANTLR start synpred100_ANTLRv3 static void synpred100_ANTLRv3_fragment(pANTLRv3Parser ctx ) { - // ./ANTLRv3.g:400:4: ( rewrite_template ) - // ./ANTLRv3.g:400:4: rewrite_template + // ANTLRv3.g:400:4: ( rewrite_template ) + // ANTLRv3.g:400:4: rewrite_template { FOLLOWPUSH(FOLLOW_rewrite_template_in_synpred100_ANTLRv32622); rewrite_template(ctx); @@ -18745,8 +18745,8 @@ // $ANTLR start synpred101_ANTLRv3 static void synpred101_ANTLRv3_fragment(pANTLRv3Parser ctx ) { - // ./ANTLRv3.g:401:4: ( rewrite_tree_alternative ) - // ./ANTLRv3.g:401:4: rewrite_tree_alternative + // ANTLRv3.g:401:4: ( rewrite_tree_alternative ) + // ANTLRv3.g:401:4: rewrite_tree_alternative { FOLLOWPUSH(FOLLOW_rewrite_tree_alternative_in_synpred101_ANTLRv32627); rewrite_tree_alternative(ctx); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Parser.h mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Parser.h --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Parser.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/grammar-parser/ANTLRv3Parser.h 2016-10-14 12:12:04.000000000 +0000 @@ -1,8 +1,8 @@ /** \file * This C header file was generated by $ANTLR version 3.4 * - * - From the grammar source file : ./ANTLRv3.g - * - On : 2014-09-24 15:09:46 + * - From the grammar source file : ANTLRv3.g + * - On : 2016-01-26 14:40:45 * - for the parser : ANTLRv3ParserParser * * Editing it, at least manually, is not wise. @@ -1100,7 +1100,6 @@ #undef Tokens #endif #define EOF -1 -#define T__72 72 #define T__73 73 #define T__74 74 #define T__75 75 @@ -1143,56 +1142,57 @@ #define CLOSURE_V3TOK 19 #define COMBINED_GRAMMAR_V3TOK 20 #define DOC_COMMENT_V3TOK 21 -#define DOUBLE_ANGLE_STRING_LITERAL 22 -#define DOUBLE_QUOTE_STRING_LITERAL 23 -#define EOA_V3TOK 24 -#define EOB_V3TOK 25 -#define EOR_V3TOK 26 -#define EPSILON_V3TOK 27 -#define ESC 28 -#define FINALLY_SYM 29 -#define FRAGMENT_V3TOK 30 -#define GATED_SEMPRED_V3TOK 31 -#define ID_V3TOK 32 -#define INT 33 -#define LABEL_ASSIGN_V3TOK 34 -#define LABEL_V3TOK 35 -#define LEXER_GRAMMAR_V3TOK 36 -#define LEXER_V3TOK 37 -#define LIST_LABEL_ASSIGN_V3TOK 38 -#define LITERAL_CHAR 39 -#define ML_COMMENT 40 -#define NESTED_ACTION 41 -#define NESTED_ARG_ACTION 42 -#define OPTIONAL_V3TOK 43 -#define OPTIONS 44 -#define OPTIONS_SYM 45 -#define PARSER_GRAMMAR_V3TOK 46 -#define PARSER_V3TOK 47 -#define POSITIVE_CLOSURE_V3TOK 48 -#define RANGE_V3TOK 49 -#define RET_V3TOK 50 -#define REWRITE_V3TOK 51 -#define ROOT_V3TOK 52 -#define RULE_REF 53 -#define RULE_V3TOK 54 -#define SCOPE_V3TOK 55 -#define SEMPRED_V3TOK 56 -#define SL_COMMENT 57 -#define SRC 58 -#define SRC_SYM 59 -#define STRING_LITERAL 60 -#define SYNPRED_V3TOK 61 -#define SYN_SEMPRED_V3TOK 62 -#define TEMPLATE_V3TOK 63 -#define TOKENS 64 -#define TOKENS_SYM 65 -#define TOKEN_REF 66 -#define TREE_BEGIN_V3TOK 67 -#define TREE_GRAMMAR_V3TOK 68 -#define WS 69 -#define WS_LOOP 70 -#define XDIGIT 71 +#define DOT_SYM 22 +#define DOUBLE_ANGLE_STRING_LITERAL 23 +#define DOUBLE_QUOTE_STRING_LITERAL 24 +#define EOA_V3TOK 25 +#define EOB_V3TOK 26 +#define EOR_V3TOK 27 +#define EPSILON_V3TOK 28 +#define ESC 29 +#define FINALLY_SYM 30 +#define FRAGMENT_V3TOK 31 +#define GATED_SEMPRED_V3TOK 32 +#define ID_V3TOK 33 +#define INT 34 +#define LABEL_ASSIGN_V3TOK 35 +#define LABEL_V3TOK 36 +#define LEXER_GRAMMAR_V3TOK 37 +#define LEXER_V3TOK 38 +#define LIST_LABEL_ASSIGN_V3TOK 39 +#define LITERAL_CHAR 40 +#define ML_COMMENT 41 +#define NESTED_ACTION 42 +#define NESTED_ARG_ACTION 43 +#define OPTIONAL_V3TOK 44 +#define OPTIONS 45 +#define OPTIONS_SYM 46 +#define PARSER_GRAMMAR_V3TOK 47 +#define PARSER_V3TOK 48 +#define POSITIVE_CLOSURE_V3TOK 49 +#define RANGE_V3TOK 50 +#define RET_V3TOK 51 +#define REWRITE_V3TOK 52 +#define ROOT_V3TOK 53 +#define RULE_REF 54 +#define RULE_V3TOK 55 +#define SCOPE_V3TOK 56 +#define SEMPRED_V3TOK 57 +#define SL_COMMENT 58 +#define SRC 59 +#define SRC_SYM 60 +#define STRING_LITERAL 61 +#define SYNPRED_V3TOK 62 +#define SYN_SEMPRED_V3TOK 63 +#define TEMPLATE_V3TOK 64 +#define TOKENS 65 +#define TOKENS_SYM 66 +#define TOKEN_REF 67 +#define TREE_BEGIN_V3TOK 68 +#define TREE_GRAMMAR_V3TOK 69 +#define WS 70 +#define WS_LOOP 71 +#define XDIGIT 72 #ifdef EOF #undef EOF #define EOF ANTLR3_TOKEN_EOF diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_be.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_be.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_be.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_be.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,9 +17,10 @@ * 02110-1301 USA */ +#include "sqlide_generics_private.h" + #include "recordset_be.h" #include "recordset_data_storage.h" -#include "sqlide_generics_private.h" #include "grtpp.h" #include "cppdbc.h" #include "grtui/binary_data_editor.h" @@ -184,9 +185,9 @@ CATCH_AND_DISPATCH_EXCEPTION(rethrow, "Reset recordset") } - data_edited(); - //refresh_ui(); This is the wrong place for a GUI refresh. Reset is called from many places, including the c-tor. - + // Don't use refresh() to send update requests for the UI. It's regularly called from a background thread. + // Instead the caller should schedule refresh calls (and coalesce them). + return res; } @@ -279,7 +280,7 @@ if (_grtm->in_main_thread()) data_edited_signal(); else - log_debug2("data_edited called from thread\n"); + log_error("data_edited called from thread\n"); } @@ -1895,8 +1896,8 @@ void Recordset::save_to_file(const bec::NodeId &node, ColumnId column) { mforms::FileChooser chooser(mforms::SaveFile); - chooser.set_title("Save Field Value"); + chooser.set_extensions("Text files (*.txt)|*.txt|All Files (*.*)|*.*", "txt"); if (chooser.run_modal()) { diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_cdbc_storage.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_cdbc_storage.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_cdbc_storage.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_cdbc_storage.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,9 +17,10 @@ * 02110-1301 USA */ +#include "sqlide_generics_private.h" + #include "recordset_cdbc_storage.h" #include "recordset_be.h" -#include "sqlide_generics_private.h" #include "sqlide_generics.h" #include "grtsqlparser/sql_facade.h" #include "base/string_utilities.h" @@ -49,21 +50,6 @@ { } - -sql::Dbc_connection_handler::ConnectionRef Recordset_cdbc_storage::dbms_conn_ref() -{ - if (!_dbms_conn || !_dbms_conn->ref.get_ptr()) - throw std::runtime_error("No connection to DBMS"); - return _dbms_conn->ref; -} - -sql::Dbc_connection_handler::ConnectionRef Recordset_cdbc_storage::aux_dbms_conn_ref() -{ - if (!_aux_dbms_conn || !_aux_dbms_conn->ref.get_ptr()) - throw std::runtime_error("No connection to DBMS"); - return _aux_dbms_conn->ref; -} - class FetchVar : public boost::static_visitor { public: @@ -123,50 +109,52 @@ size_t Recordset_cdbc_storage::determine_pkey_columns(Recordset::Column_names &column_names, Recordset::Column_types &column_types, Recordset::Column_types &real_column_types) { // a connection other than the user connection must be used for fetching metadata, otherwise we change the state of the connection - sql::Dbc_connection_handler::ConnectionRef aux_dbms_conn_ref= this->aux_dbms_conn_ref(); - - sql::DatabaseMetaData *conn_meta(aux_dbms_conn_ref->getMetaData()); - try + sql::Dbc_connection_handler::Ref conn; + base::RecMutexLock lock(_getAuxConnection(conn, true)); //we can't perform full connection check, hence we use the simple one { - // XXX this can be slow because of the I_S queries, depending on the server - std::auto_ptr rs(conn_meta->getBestRowIdentifier("", _schema_name, _table_name, 0, 0)); - size_t rowid_col_count= rs->rowsCount(); - if (rowid_col_count > 0) + sql::DatabaseMetaData *conn_meta(conn->ref->getMetaData()); + try { - _pkey_columns.reserve(rowid_col_count); - while (rs->next()) + // XXX this can be slow because of the I_S queries, depending on the server + std::auto_ptr rs(conn_meta->getBestRowIdentifier("", _schema_name, _table_name, 0, 0)); + size_t rowid_col_count= rs->rowsCount(); + if (rowid_col_count > 0) { - Recordset::Column_names::const_iterator i= - std::find(column_names.begin(), column_names.end(), rs->getString("COLUMN_NAME")); - if (i != column_names.end()) + _pkey_columns.reserve(rowid_col_count); + while (rs->next()) { - ColumnId col= std::distance((Recordset::Column_names::const_iterator)column_names.begin(), i); - column_names.push_back(column_names[col]); - column_types.push_back(column_types[col]); - real_column_types.push_back(real_column_types[col]); - _pkey_columns.push_back(col); // copy original value of pk field(s) + Recordset::Column_names::const_iterator i= + std::find(column_names.begin(), column_names.end(), rs->getString("COLUMN_NAME")); + if (i != column_names.end()) + { + ColumnId col= std::distance((Recordset::Column_names::const_iterator)column_names.begin(), i); + column_names.push_back(column_names[col]); + column_types.push_back(column_types[col]); + real_column_types.push_back(real_column_types[col]); + _pkey_columns.push_back(col); // copy original value of pk field(s) + } + else + rowid_col_count--; } - else - rowid_col_count--; - } - if (rowid_col_count != rs->rowsCount()) + if (rowid_col_count != rs->rowsCount()) + { + _readonly = true; + _readonly_reason = "To edit table data, the SELECT statement must include the primary key column(s)."; + } + } + else { _readonly = true; - _readonly_reason = "To edit table data, the SELECT statement must include the primary key column(s)."; + _readonly_reason = "The table has no unique row identifier (primary key or a NOT NULL unique index)"; } + return rowid_col_count; } - else + catch (sql::SQLException &exc) { _readonly = true; - _readonly_reason = "The table has no unique row identifier (primary key or a NOT NULL unique index)"; + _readonly_reason = base::strfmt("Could not determine a unique row identifier (%s)", exc.what()); } - return rowid_col_count; - } - catch (sql::SQLException &exc) - { - _readonly = true; - _readonly_reason = base::strfmt("Could not determine a unique row identifier (%s)", exc.what()); } return 0; } @@ -175,87 +163,88 @@ size_t Recordset_cdbc_storage::determine_pkey_columns_alt(Recordset::Column_names &column_names, Recordset::Column_types &column_types, Recordset::Column_types &real_column_types) { // a connection other than the user connection must be used for fetching metadata, otherwise we change the state of the connection - sql::Dbc_connection_handler::ConnectionRef aux_dbms_conn_ref= this->aux_dbms_conn_ref(); - - std::auto_ptr stmt(aux_dbms_conn_ref->createStatement()); - std::string q = base::sqlstring("SHOW INDEX FROM !.!", 0) << _schema_name << _table_name; - try - { - std::auto_ptr rs(stmt->executeQuery(q)); - std::list primary_columns; - std::list unique_notnull_columns, columns; - - bool found_not_null = false; - std::string prev_key; - while (rs->next()) + sql::Dbc_connection_handler::Ref conn; + base::RecMutexLock lock(_getAuxConnection(conn, true)); //we can't perform full connection check, hence we use the simple one + { + std::auto_ptr stmt(conn->ref->createStatement()); + std::string q = base::sqlstring("SHOW INDEX FROM !.!", 0) << _schema_name << _table_name; + try { - std::string column = rs->getString("Column_name"); - std::string null = rs->getString("Null"); - std::string key = rs->getString("Key_name"); + std::auto_ptr rs(stmt->executeQuery(q)); + std::list primary_columns; + std::list unique_notnull_columns, columns; - if (key == "PRIMARY") - { - primary_columns.push_back(column); - } - else + bool found_not_null = false; + std::string prev_key; + while (rs->next()) { - // at least one of the columns must be NOT NULL in a UNIQUE key - if (prev_key != key) + std::string column = rs->getString("Column_name"); + std::string null = rs->getString("Null"); + std::string key = rs->getString("Key_name"); + + if (key == "PRIMARY") { - prev_key = key; - if (found_not_null && unique_notnull_columns.empty()) - unique_notnull_columns = columns; - found_not_null = false; - columns.clear(); + primary_columns.push_back(column); + } + else + { + // at least one of the columns must be NOT NULL in a UNIQUE key + if (prev_key != key) + { + prev_key = key; + if (found_not_null && unique_notnull_columns.empty()) + unique_notnull_columns = columns; + found_not_null = false; + columns.clear(); + } + columns.push_back(column); + if (null == "") + found_not_null = true; } - columns.push_back(column); - if (null == "") - found_not_null = true; } - } - if (found_not_null && unique_notnull_columns.empty() && !columns.empty()) - unique_notnull_columns = columns; + if (found_not_null && unique_notnull_columns.empty() && !columns.empty()) + unique_notnull_columns = columns; - if (!primary_columns.empty()) - columns = primary_columns; - else - columns = unique_notnull_columns; + if (!primary_columns.empty()) + columns = primary_columns; + else + columns = unique_notnull_columns; - if (!columns.empty()) - { - size_t rowid_col_count= columns.size(); - // now check whether the query contains all the columns in the keys - for (std::list::const_iterator column = columns.begin(); column != columns.end(); ++column) + if (!columns.empty()) { - Recordset::Column_names::const_iterator i = std::find(column_names.begin(), column_names.end(), *column); - - if (i != column_names.end()) + size_t rowid_col_count= columns.size(); + // now check whether the query contains all the columns in the keys + for (std::list::const_iterator column = columns.begin(); column != columns.end(); ++column) { - ColumnId col= std::distance((Recordset::Column_names::const_iterator)column_names.begin(), i); - column_names.push_back(column_names[col]); - column_types.push_back(column_types[col]); - real_column_types.push_back(real_column_types[col]); - _pkey_columns.push_back(col); // copy original value of pk field(s) + Recordset::Column_names::const_iterator i = std::find(column_names.begin(), column_names.end(), *column); + + if (i != column_names.end()) + { + ColumnId col= std::distance((Recordset::Column_names::const_iterator)column_names.begin(), i); + column_names.push_back(column_names[col]); + column_types.push_back(column_types[col]); + real_column_types.push_back(real_column_types[col]); + _pkey_columns.push_back(col); // copy original value of pk field(s) + } + else + rowid_col_count--; } - else - rowid_col_count--; - } - if (rowid_col_count != columns.size()) - { - _readonly = true; - _readonly_reason = "To edit table data, the SELECT statement must include the primary key column(s)."; + if (rowid_col_count != columns.size()) + { + _readonly = true; + _readonly_reason = "To edit table data, the SELECT statement must include the primary key column(s)."; + } + return rowid_col_count; } - return rowid_col_count; } - } - catch (sql::SQLException &exc) - { - _readonly = true; - _readonly_reason = base::strfmt("Could not determine a unique row identifier (%s)", exc.what()); - return 0; - } - + catch (sql::SQLException &exc) + { + _readonly = true; + _readonly_reason = base::strfmt("Could not determine a unique row identifier (%s)", exc.what()); + return 0; + } + } _readonly = true; _readonly_reason = "The table has no unique row identifier (primary key or a NOT NULL unique index)"; @@ -265,8 +254,8 @@ void Recordset_cdbc_storage::do_unserialize(Recordset *recordset, sqlite::connection *data_swap_db) { - sql::Dbc_connection_handler::ConnectionRef dbms_conn_ref= this->dbms_conn_ref(); - sql::Connection *dbms_conn= dbms_conn_ref.get(); + sql::Dbc_connection_handler::Ref conn; + base::RecMutexLock lock(_getUserConnection(conn, true)); //we can't perform full connection check, hence we use the simple one Recordset_sql_storage::do_unserialize(recordset, data_swap_db); @@ -291,7 +280,7 @@ { if (!_reloadable) throw std::runtime_error("Recordset can't be reloaded, original statement must be reexecuted instead"); - stmt.reset(dbms_conn->createStatement()); + stmt.reset(conn->ref->createStatement()); //if (!_schema_name.empty()) //! default schema is to be set for connector // stmt->execute(strfmt("use `%s`", _schema_name.c_str())); //stmt->setFetchSize(100); //! setFetchSize is not implemented. param value to be customized. @@ -486,7 +475,7 @@ row_values[editable_col_count+n]= row_values[_pkey_columns[n]]; add_data_swap_record(insert_commands, row_values); - if (_dbms_conn->is_stop_query_requested) + if (conn->is_stop_query_requested) throw std::runtime_error(_("Query execution has been stopped, the connection to the DB server was not restarted, any open transaction remains open")); } @@ -501,7 +490,9 @@ void Recordset_cdbc_storage::do_fetch_blob_value(Recordset *recordset, sqlite::connection *data_swap_db, RowId rowid, ColumnId column, sqlite::variant_t &blob_value) { - sql::Dbc_connection_handler::ConnectionRef dbms_conn= dbms_conn_ref(); + + sql::Dbc_connection_handler::Ref conn; + base::RecMutexLock lock(_getUserConnection(conn, true)); //we can't perform full connection check, hence we use the simple one Recordset::Column_names &column_names= get_column_names(recordset); Recordset::Column_types &column_types= get_column_types(recordset); @@ -525,7 +516,7 @@ if (!_reloadable) throw std::runtime_error("Recordset can't be reloaded, original statement must be reexecuted instead"); - boost::shared_ptr stmt(dbms_conn->createStatement()); + boost::shared_ptr stmt(conn->ref->createStatement()); stmt->execute(sql_query); boost::shared_ptr rs(stmt->getResultSet()); @@ -568,7 +559,8 @@ void Recordset_cdbc_storage::run_sql_script(const Sql_script &sql_script, bool skip_transaction) { - sql::Dbc_connection_handler::ConnectionRef dbms_conn= dbms_conn_ref(); + sql::Dbc_connection_handler::Ref conn; + base::RecMutexLock lock(_getUserConnection(conn, true)); //we can't perform full connection check, hence we use the simple one float progress_state= 0.f; float progress_state_inc= sql_script.statements.empty() ? 1.f : 1.f / sql_script.statements.size(); @@ -582,7 +574,7 @@ { try { - stmt.reset(dbms_conn->prepareStatement(sql)); + stmt.reset(conn->ref->prepareStatement(sql)); std::list > blob_streams; if (sql_script.statements_bindings.end() != sql_bindings) { @@ -621,7 +613,7 @@ if (err_count) { if (!skip_transaction) - dbms_conn->rollback(); + conn->ref->rollback(); msg= strfmt("%i error(s) saving changes to table %s", err_count, full_table_name().c_str()); on_sql_script_run_statistics((processed_statement_count - err_count), err_count); throw std::runtime_error(msg.c_str()); @@ -629,7 +621,7 @@ else { if (!skip_transaction) - dbms_conn->commit(); + conn->ref->commit(); on_sql_script_run_statistics((processed_statement_count - err_count), err_count); } } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_cdbc_storage.h mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_cdbc_storage.h --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_cdbc_storage.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_cdbc_storage.h 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,16 +17,12 @@ * 02110-1301 USA */ - -#ifndef _RECORDSET_CDBC_STORAGE_BE_H_ -#define _RECORDSET_CDBC_STORAGE_BE_H_ - +#pragma once #include "wbpublic_public_interface.h" #include "sqlide/recordset_sql_storage.h" #include "cppdbc.h" - class WBPUBLICBACKEND_PUBLIC_FUNC Recordset_cdbc_storage : public Recordset_sql_storage { public: @@ -58,14 +54,9 @@ public: std::string decorated_sql_query(); // adds limit clause if defined by options - // list of columns that are PK or unique not null (equivalent to getBestRowIdentifier()) provided - // by the caller, so that we don't need to call getBestRowIdentifier() ourselves - //std::vector known_pkey_columns; public: - void dbms_conn(const sql::Dbc_connection_handler::Ref &val) { _dbms_conn= val; } - sql::Dbc_connection_handler::Ref dbms_conn() { return _dbms_conn; } - void aux_dbms_conn(const sql::Dbc_connection_handler::Ref &val) { _aux_dbms_conn= val; } - sql::Dbc_connection_handler::Ref aux_dbms_conn() { return _aux_dbms_conn; } + void setAuxConnectionGetter(boost::function getConnection) { _getAuxConnection = getConnection; }; + void setUserConnectionGetter(boost::function getConnection) { _getUserConnection = getConnection; }; void dbc_resultset(boost::shared_ptr& value) { _dbc_resultset= value; } void dbc_statement(boost::shared_ptr& value) { _dbc_statement= value; } @@ -74,14 +65,13 @@ void set_gather_field_info(bool flag) { _gather_field_info = flag; } std::vector &field_info() { return _field_info; } -protected: - sql::Dbc_connection_handler::ConnectionRef dbms_conn_ref(); - sql::Dbc_connection_handler::ConnectionRef aux_dbms_conn_ref(); + private: - sql::Dbc_connection_handler::Ref _dbms_conn; - sql::Dbc_connection_handler::Ref _aux_dbms_conn; boost::shared_ptr _dbc_resultset; // for 1-time unserialization boost::shared_ptr _dbc_statement; // for 1-time unserialization + boost::function _getAuxConnection; + boost::function _getUserConnection; + std::vector _field_info; bool _reloadable; // whether can be reloaded using stored sql query bool _gather_field_info; @@ -89,6 +79,3 @@ size_t determine_pkey_columns(Recordset::Column_names &column_names, Recordset::Column_types &column_types, Recordset::Column_types &real_column_types); size_t determine_pkey_columns_alt(Recordset::Column_names &column_names, Recordset::Column_types &column_types, Recordset::Column_types &real_column_types); }; - - -#endif /* _RECORDSET_CDBC_STORAGE_BE_H_ */ diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_data_storage.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_data_storage.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_data_storage.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_data_storage.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,8 +17,9 @@ * 02110-1301 USA */ -#include "recordset_data_storage.h" #include "sqlide_generics_private.h" + +#include "recordset_data_storage.h" #include "base/string_utilities.h" #include "base/boost_smart_ptr_helpers.h" #include diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_sqlite_storage.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_sqlite_storage.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_sqlite_storage.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_sqlite_storage.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,9 +17,10 @@ * 02110-1301 USA */ +#include "sqlide_generics_private.h" + #include "recordset_sqlite_storage.h" #include "recordset_be.h" -#include "sqlide_generics_private.h" #include "grtsqlparser/sql_facade.h" #include "base/string_utilities.h" #include diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_sql_storage.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_sql_storage.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_sql_storage.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_sql_storage.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,13 +17,14 @@ * 02110-1301 USA */ +#include + #include "recordset_sql_storage.h" #include "recordset_be.h" #include "grtsqlparser/sql_facade.h" #include "base/string_utilities.h" #include "base/sqlstring.h" #include "base/boost_smart_ptr_helpers.h" -#include #include #include #include diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_table_inserts_storage.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_table_inserts_storage.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_table_inserts_storage.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_table_inserts_storage.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,12 +17,13 @@ * 02110-1301 USA */ +#include +#include + #include "recordset_table_inserts_storage.h" #include "recordset_be.h" #include "base/string_utilities.h" -#include -#include #include #include #include diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_text_storage.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_text_storage.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/recordset_text_storage.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/recordset_text_storage.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -17,6 +17,8 @@ * 02110-1301 USA */ +#include + #include "recordset_text_storage.h" #include "recordset_be.h" #include "base/string_utilities.h" @@ -24,7 +26,6 @@ #include "base/file_utilities.h" #include "base/config_file.h" -#include #include #include #include diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/sql_editor_be_autocomplete.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/sql_editor_be_autocomplete.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/sql_editor_be_autocomplete.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/sql_editor_be_autocomplete.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +/* + * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -59,6 +59,7 @@ bool is_terminal; bool is_required; // false for * and ? operators, otherwise true. bool multiple; // true for + and * operators, otherwise false. + bool any; // Set for . as grammar node (which matches any lexer token). uint32_t token_ref; // In case of a terminal the id of the token. std::string rule_ref; // In case of a non-terminal the name of the rule. @@ -67,6 +68,7 @@ is_terminal = true; is_required = true; multiple = false; + any = false; token_ref = INVALID_TOKEN; } }; @@ -95,7 +97,20 @@ }; -typedef std::vector RuleAlternatives; // A list of alternatives for a given rule. +// A list of alternatives for a given rule. +struct RuleAlternatives { + bool optimized; + + // We either have a list of grammar sequences or (in the optimized case) a set of tokens + // which form alternatives in a given block. + std::vector sequence; + std::set set; + + RuleAlternatives() + { + optimized = true; + } +}; //-------------------------------------------------------------------------------------------------- @@ -107,7 +122,7 @@ // Rules that must not be examined further when collecting candidates. std::set special_rules; // Rules with a special meaning (e.g. "table_ref"). - std::set ignored_rules; // Rules we don't provide completion with (e.g. "literal"). + std::set ignored_rules; // Rules we don't provide completion with (e.g. "label"). std::set ignored_tokens; // Tokens we don't want to show up (e.g. operators). //------------------------------------------------------------------------------------------------ @@ -127,6 +142,7 @@ special_rules.insert("table_ref_no_db"); special_rules.insert("column_ref"); + special_rules.insert("column_internal_ref"); special_rules.insert("column_ref_with_wildcard"); special_rules.insert("table_wild"); @@ -137,18 +153,30 @@ special_rules.insert("trigger_ref"); special_rules.insert("view_ref"); special_rules.insert("procedure_ref"); - special_rules.insert("logfile_group_ref"); special_rules.insert("tablespace_ref"); special_rules.insert("engine_ref"); + special_rules.insert("collation_name"); + special_rules.insert("charset_name"); + special_rules.insert("event_ref"); special_rules.insert("user_variable"); special_rules.insert("system_variable"); ignored_rules.clear(); - ignored_rules.insert("literal"); + ignored_rules.insert("label"); // Includes certain keywords which would show up. + ignored_rules.insert("label_identifier"); // ditto ignored_rules.insert("text_or_identifier"); ignored_rules.insert("identifier"); + ignored_rules.insert("pure_identifier"); + ignored_rules.insert("string_literal"); + ignored_rules.insert("qualified_identifier"); + ignored_rules.insert("dot_identifier"); + ignored_rules.insert("num_literal"); + ignored_rules.insert("ulong_number"); + ignored_rules.insert("real_ulong_number"); + ignored_rules.insert("ulonglong_number"); + ignored_rules.insert("real_ulonglong_number"); // We have to use strings for the ignored tokens, instead of their #defines because we would have // to include MySQLParser.h, which conflicts with ANTLRv3Parser.h. @@ -197,9 +225,19 @@ ignored_tokens.insert("ESCAPE_OPERATOR"); ignored_tokens.insert("CONCAT_PIPES_SYMBOL"); ignored_tokens.insert("AT_TEXT_SUFFIX"); + ignored_tokens.insert("BACK_TICK_QUOTED_ID"); ignored_tokens.insert("SINGLE_QUOTED_TEXT"); ignored_tokens.insert("DOUBLE_QUOTED_TEXT"); ignored_tokens.insert("NCHAR_TEXT"); + ignored_tokens.insert("UNDERSCORE_CHARSET"); + ignored_tokens.insert("IDENTIFIER"); + ignored_tokens.insert("INT_NUMBER"); + ignored_tokens.insert("LONG_NUMBER"); + ignored_tokens.insert("ULONGLONG_NUMBER"); + ignored_tokens.insert("DECIMAL_NUMBER"); + ignored_tokens.insert("BIN_NUMBER"); + ignored_tokens.insert("HEX_NUMBER"); + ignored_tokens.insert("DOT_IDENTIFIER"); // Load token map first. std::string tokenFileName = base::strip_extension(name) + ".tokens"; @@ -244,7 +282,7 @@ log_error("Found grammar errors. No code completion data available.\n"); else { - //std::string dump = dumpTree(tree, parser->pParser->rec->state, ""); + //std::string dump = MySQLRecognitionBase::dumpTree(parser->pParser->rec->state->tokenNames, tree); //std::cout << dump; // Walk the AST and put all the rules into our data structures. @@ -381,7 +419,8 @@ pANTLR3_BASE_TREE child = (pANTLR3_BASE_TREE)alt->getChild(alt, index); switch (child->getType(child)) { - case GATED_SEMPRED_V3TOK: + case GATED_SEMPRED_V3TOK: // A gated semantic predicate. + case SEMPRED_V3TOK: // A normal semantic predicate. { // See if we can extract version info or SQL mode condition from that. ++index; @@ -394,9 +433,8 @@ break; } - case SEMPRED_V3TOK: // A normal semantic predicate. case SYN_SEMPRED_V3TOK: // A syntactic predicate converted to a semantic predicate. - // Not needed for our work, so we can ignore it. + // Not needed for our work, so we can ignore it. ++index; break; @@ -441,13 +479,18 @@ { optimized = true; child = (pANTLR3_BASE_TREE)child_alt->getChild(child_alt, 0); - switch (child->getType(child)) + ANTLR3_UINT32 childType = child->getType(child); + switch (childType) { + case CHAR_LITERAL: + case STRING_LITERAL: case TOKEN_REF: { node.is_terminal = true; pANTLR3_STRING token_text = child->getText(child); std::string name = (char*)token_text->chars; + if (childType == CHAR_LITERAL || childType == STRING_LITERAL) + name = base::unquote(name); node.token_ref = token_map[name]; break; } @@ -483,11 +526,15 @@ break; } + case CHAR_LITERAL: + case STRING_LITERAL: case TOKEN_REF: { node.is_terminal = true; pANTLR3_STRING token_text = child->getText(child); std::string name = (char*)token_text->chars; + if (type == CHAR_LITERAL || type == STRING_LITERAL) + name = base::unquote(name); node.token_ref = token_map[name]; break; } @@ -512,6 +559,52 @@ break; } + case DOT_SYM: // Match any token, except EOF. + node.is_terminal = true; + node.any = true; + node.token_ref = DOT_SYMBOL; // Just a dummy (one of the ignore tokens), so it doesn't appear in the list. + break; + + case LABEL_ASSIGN_V3TOK: + { + // A variable assignment, instead of a token or rule reference. + // The reference is the second part of the assignment. + pANTLR3_BASE_TREE token = (pANTLR3_BASE_TREE)child->getChild(child, 1); + node.is_terminal = true; + + switch (token->getType(token)) + { + case DOT_SYM: + node.any = true; + node.token_ref = DOT_SYMBOL; + break; + + case CHAR_LITERAL: + case STRING_LITERAL: + case TOKEN_REF: + { + std::string tokenText = (char*)token->getText(token)->chars; + if (type == CHAR_LITERAL || type == STRING_LITERAL) + tokenText = base::unquote(tokenText); + node.token_ref = token_map[tokenText]; + break; + } + + default: + std::stringstream message; + message << "Unhandled type: " << type << " in label assignment: " << name; + throw std::runtime_error(message.str()); + } + + break; + } + + case SEMPRED_V3TOK: + // A validating semantic predicate - ignore. + // Might be necessary to handle one day, when we use such a predicate to + // control parts with dynamic conditions. + continue; + default: { std::stringstream message; @@ -536,16 +629,58 @@ RuleAlternatives alternatives; - // One less child in the loop as the list is always ended by a EOB node. - for (ANTLR3_UINT32 index = 0; index < block->getChildCount(block) - 1; index++) + // Check if we can create an optimized alternatives variant which simply uses a set, so we can + // test a match with a single operation. + // To make this work the block must consist solely of single terminal token alternatives without + // any predicate. + for (ANTLR3_UINT32 index = 0; index < block->getChildCount(block) - 1; ++index) { pANTLR3_BASE_TREE alt = (pANTLR3_BASE_TREE)block->getChild(block, index); - if (alt->getType(alt) == ALT_V3TOK) // There can be REWRITE nodes (which we don't need). + + // 2 nodes at most: the single terminal + EOA. Gated semantic predicates are child nodes of that + // alt node too, so they automatically get checked here too. + if (alt->getType(alt) == ALT_V3TOK && alt->getChildCount(alt) > 2) + { + alternatives.optimized = false; + break; + } + + // Check also the type of the first node. We only accept terminals (no rule ref or closures). + pANTLR3_BASE_TREE child = (pANTLR3_BASE_TREE)alt->getChild(alt, 0); + if (child->getType(child) != TOKEN_REF) + { + alternatives.optimized = false; + break; + } + } + + if (alternatives.optimized) + { + for (ANTLR3_UINT32 index = 0; index < block->getChildCount(block) - 1; ++index) { - std::stringstream alt_name; - alt_name << name << "_alt" << index; - GrammarSequence sequence = traverse_alternative(alt, alt_name.str()); - alternatives.push_back(sequence); + pANTLR3_BASE_TREE alt = (pANTLR3_BASE_TREE)block->getChild(block, index); + if (alt->getType(alt) == ALT_V3TOK) + { + pANTLR3_BASE_TREE child = (pANTLR3_BASE_TREE)alt->getChild(alt, 0); + pANTLR3_STRING token_text = child->getText(child); + alternatives.set.insert(token_map[(char*)token_text->chars]); + } + } + + } + else + { + // One less child in the loop as the list is always ended by a EOB node. + for (ANTLR3_UINT32 index = 0; index < block->getChildCount(block) - 1; index++) + { + pANTLR3_BASE_TREE alt = (pANTLR3_BASE_TREE)block->getChild(block, index); + if (alt->getType(alt) == ALT_V3TOK) // There can be REWRITE nodes (which we don't need). + { + std::stringstream alt_name; + alt_name << name << "_alt" << index; + GrammarSequence sequence = traverse_alternative(alt, alt_name.str()); + alternatives.sequence.push_back(sequence); + } } } rules[name] = alternatives; @@ -597,7 +732,7 @@ std::deque walk_stack; // The rules as they are being matched or collected from. // It's a deque instead of a stack as we need to iterate over it. - enum RunState { RunStateMatching, RunStateCollectionPending, RunStateCollectionDone } run_state; + enum RunState { RunStateMatching, RunStateCollectionPending } run_state; boost::shared_ptr scanner; std::set completion_candidates; @@ -605,7 +740,14 @@ size_t caret_line; size_t caret_offset; - std::vector references; // As in FROM, UPDATE etc. + // A hierarchical view of all table references in the code, updated constantly during the match process. + // Organized as stack to be able to easily remove sets of references when changing nesting level. + std::deque< std::vector > referencesStack; + + // A flat list of possible references. Kinda snapshot of the references stack at the point when collection + // begins (the stack is cleaned up while bubbling up, after the collection process). + // Additionally, it gets also all references after the caret. + std::vector references; //------------------------------------------------------------------------------------------------ @@ -619,22 +761,22 @@ * Actual candidates are stored in the completion_candidates member set. * */ - bool collect_candiates(boost::shared_ptr aScanner) + bool collectCandidates(boost::shared_ptr aScanner) { scanner = aScanner; // Has all the data necessary for scanning already. server_version = scanner->get_server_version(); sql_mode = scanner->get_sql_mode_flags(); run_state = RunStateMatching; - completion_candidates.clear(); if (scanner->token_channel() != 0) scanner->next(true); + referencesStack.push_back(std::vector()); // For the root level of table references. bool matched = match_rule("query"); // Post processing some entries. - if (completion_candidates.find("NOT2_SYMBOL") != completion_candidates.end()) + if (completion_candidates.count("NOT2_SYMBOL") > 0) { // NOT2 is a NOT with special meaning in the operator preceedence chain. // For code completion it's the same as NOT. @@ -642,8 +784,93 @@ completion_candidates.insert("NOT_SYMBOL"); } - if (completion_candidates.find("column_ref") != completion_candidates.end()) - collectTableReferences(); + // Add synonyms. + if (completion_candidates.count("CHAR_SYMBOL") > 0) + completion_candidates.insert("CHARACTER_SYMBOL"); + if (completion_candidates.count("NOW_SYMBOL") > 0) + { + completion_candidates.insert("CURRENT_TIMESTAMP_SYMBOL"); + completion_candidates.insert("LOCALTIME_SYMBOL"); + completion_candidates.insert("LOCALTIMESTAMP_SYMBOL"); + } + if (completion_candidates.count("DAY_SYMBOL") > 0) + completion_candidates.insert("DAYOFMONTH_SYMBOL"); + if (completion_candidates.count("DECIMAL_SYMBOL") > 0) + completion_candidates.insert("DEC_SYMBOL"); + if (completion_candidates.count("DISTINCT_SYMBOL") > 0) + completion_candidates.insert("DISTINCTROW_SYMBOL"); + if (completion_candidates.count("COLUMNS_SYMBOL") > 0) + completion_candidates.insert("FIELDS_SYMBOL"); + if (completion_candidates.count("FLOAT_SYMBOL") > 0) + completion_candidates.insert("FLOAT4_SYMBOL"); + if (completion_candidates.count("DOUBLE_SYMBOL") > 0) + completion_candidates.insert("FLOAT8_SYMBOL"); + if (completion_candidates.count("INT_SYMBOL") > 0) + { + completion_candidates.insert("INTEGER_SYMBOL"); + completion_candidates.insert("INT4_SYMBOL"); + } + if (completion_candidates.count("RELAY_THREAD_SYMBOL") > 0) + completion_candidates.insert("IO_THREAD_SYMBOL"); + if (completion_candidates.count("SUBSTRING_SYMBOL") > 0) + completion_candidates.insert("MID_SYMBOL"); + if (completion_candidates.count("MEDIUMINT_SYMBOL") > 0) + completion_candidates.insert("MIDDLEINT_SYMBOL"); + if (completion_candidates.count("NDBCLUSTER_SYMBOL") > 0) + completion_candidates.insert("NDB_SYMBOL"); + if (completion_candidates.count("REGEXP_SYMBOL") > 0) + completion_candidates.insert("RLIKE_SYMBOL"); + if (completion_candidates.count("DATABASE_SYMBOL") > 0) + completion_candidates.insert("SCHEMA_SYMBOL"); + if (completion_candidates.count("DATABASES_SYMBOL") > 0) + completion_candidates.insert("SCHEMAS_SYMBOL"); + if (completion_candidates.count("USER_SYMBOL") > 0) + completion_candidates.insert("SESSION_USER_SYMBOL"); + if (completion_candidates.count("STD_SYMBOL") > 0) + { + completion_candidates.insert("STDDEV_SYMBOL"); + completion_candidates.insert("STDDEV_POP_SYMBOL"); + } + if (completion_candidates.count("SUBSTRING_SYMBOL") > 0) + completion_candidates.insert("SUBSTR_SYMBOL"); + if (completion_candidates.count("VARCHAR_SYMBOL") > 0) + completion_candidates.insert("VARCHARACTER_SYMBOL"); + if (completion_candidates.count("VARIANCE_SYMBOL") > 0) + completion_candidates.insert("VAR_POP_SYMBOL"); + + if (completion_candidates.count("TINYINT_SYMBOL") > 0) + completion_candidates.insert("INT1_SYMBOL"); + if (completion_candidates.count("SMALLINT_SYMBOL") > 0) + completion_candidates.insert("INT2_SYMBOL"); + if (completion_candidates.count("MEDIUMINT_SYMBOL") > 0) + completion_candidates.insert("INT3_SYMBOL"); + if (completion_candidates.count("BIGINT_SYMBOL") > 0) + completion_candidates.insert("INT8_SYMBOL"); + if (completion_candidates.count("FRAC_SECOND_SYMBOL") > 0) + completion_candidates.insert("SQL_TSI_FRAC_SECOND_SYMBOL"); + if (completion_candidates.count("SECOND_SYMBOL") > 0) + completion_candidates.insert("SQL_TSI_SECOND_SYMBOL"); + if (completion_candidates.count("MINUTE_SYMBOL") > 0) + completion_candidates.insert("SQL_TSI_MINUTE_SYMBOL"); + if (completion_candidates.count("HOUR_SYMBOL") > 0) + completion_candidates.insert("SQL_TSI_HOUR_SYMBOL"); + if (completion_candidates.count("DAY_SYMBOL") > 0) + completion_candidates.insert("SQL_TSI_DAY_SYMBOL"); + if (completion_candidates.count("WEEK_SYMBOL") > 0) + completion_candidates.insert("SQL_TSI_WEEK_SYMBOL"); + if (completion_candidates.count("MONTH_SYMBOL") > 0) + completion_candidates.insert("SQL_TSI_MONTH_SYMBOL"); + if (completion_candidates.count("QUARTER_SYMBOL") > 0) + completion_candidates.insert("SQL_TSI_QUARTER_SYMBOL"); + if (completion_candidates.count("YEAR_SYMBOL") > 0) + completion_candidates.insert("SQL_TSI_YEAR_SYMBOL"); + + // If a column reference is required then we have to continue scanning the query for table references. + if (completion_candidates.count("column_ref") > 0) + { + collectRemainingTableReferences(); + takeReferencesSnapshot(); // Move references from stack to the ref map. + } return matched; } @@ -675,7 +902,7 @@ { node = sequence.nodes[i]; if (node.is_terminal) - matched = node.token_ref == scanner->token_type(); + matched = scanner->is(node.token_ref) || (node.any && !scanner->is(ANTLR3_TOKEN_EOF)); else matched = matchRuleAndCollectTableRefs(node.rule_ref); @@ -702,20 +929,20 @@ // If the current grammar node can be matched multiple times try as often as you can. // This is the greedy approach and default in ANTLR. At the moment we don't support non-greedy matches // as we don't use them in MySQL parser rules. - if (scanner->token_type() != ANTLR3_TOKEN_EOF && node.multiple) + if (!scanner->is(ANTLR3_TOKEN_EOF) && node.multiple) { do { if (node.is_terminal) { - matched = node.token_ref == scanner->token_type(); + matched = scanner->is(node.token_ref) || (node.any && !scanner->is(ANTLR3_TOKEN_EOF)); scanner->next(true); } else matched = matchRuleAndCollectTableRefs(node.rule_ref); } while (matched); - if (scanner->token_type() == ANTLR3_TOKEN_EOF) + if (scanner->is(ANTLR3_TOKEN_EOF)) break; } } @@ -743,109 +970,114 @@ */ bool matchRuleAndCollectTableRefs(const std::string &rule) { - walk_stack.push_back(rule); - - size_t marker = scanner->position(); RuleAlternatives alts = rules_holder.rules[rule]; - for (std::vector::const_iterator i = alts.begin(); i != alts.end(); ++i) - { - // First run predicate checks if this alt can be considered at all. - if ((i->min_version > server_version) || (server_version > i->max_version)) - continue; - if ((i->active_sql_modes > -1) && (i->active_sql_modes & sql_mode) != i->active_sql_modes) - continue; + if (alts.optimized) + { + if (alts.set.count(scanner->token_type()) > 0) + { + scanner->next(); + return true; + } + } + else + { + size_t marker = scanner->position(); + for (std::vector::const_iterator i = alts.sequence.begin(); i != alts.sequence.end(); ++i) + { + // First run predicate checks if this alt can be considered at all. + if ((i->min_version > server_version) || (server_version > i->max_version)) + continue; - if ((i->inactive_sql_modes > -1) && (i->inactive_sql_modes & sql_mode) != 0) - continue; + if ((i->active_sql_modes > -1) && (i->active_sql_modes & sql_mode) != i->active_sql_modes) + continue; - if (matchAltAndCollectTableRefs(*i)) - { - walk_stack.pop_back(); + if ((i->inactive_sql_modes > -1) && (i->inactive_sql_modes & sql_mode) != 0) + continue; - // If that was the table_alias rule then we can look back for which table (or subquery) - // it was set and collect the values. - if (rule == "table_alias") + if (matchAltAndCollectTableRefs(*i)) { - // The current scanner position is after the alias, so we can seek back straight to the - // needed values. Need to hard code grammar knowledge here, for this to work however. - marker = scanner->position(); + if (rule == "table_ref") + { + TableReference reference; + size_t position = scanner->position(); - TableReference reference; - scanner->previous(true); - reference.alias = base::unquote(scanner->token_text()); - scanner->previous(true); - if (scanner->token_type() == AS_SYMBOL || scanner->token_type() == EQUAL_OPERATOR) - scanner->previous(true); // Skip AS and = operators if they exist. + // At this point we are at the end of the table_ref token, so we need to scan back for the table + // and forward for the alias. + // Keep in mind we must have a valid table identifier here, as we just matched it in the above matchAltAndCollectTableRefs call. + scanner->previous(); + reference.table = base::unquote(scanner->token_text()); + scanner->previous(); + if (scanner->is(DOT_SYMBOL)) + { + scanner->previous(); + reference.schema = base::unquote(scanner->token_text()); + } - if (scanner->token_type() == CLOSE_PAR_SYMBOL) - { - // There can be a partition list between table reference and alias, which we have - // to skip too. Since there can only be an identifier list and we have valid syntax - // to even arrive here, we can simply scan back to the open par and be done. - do + // Now scan to the right (which might be errornous) for the alias. + scanner->seek(position); + if (scanner->skipIf(PARTITION_SYMBOL) && scanner->is(OPEN_PAR_SYMBOL)) { - scanner->previous(true); - } while (scanner->token_type() != OPEN_PAR_SYMBOL); + // All partition info is between a pair of parentheses. + do + { + scanner->next(); + } while (!scanner->is(CLOSE_PAR_SYMBOL) && !scanner->is(ANTLR3_TOKEN_EOF)); + scanner->skipIf(CLOSE_PAR_SYMBOL); + } - // Skip open par and PARTITION. - scanner->previous(true); - scanner->previous(true); - } + if (scanner->is(AS_SYMBOL) || scanner->is(EQUAL_OPERATOR)) + scanner->next(); + if (scanner->is_identifier()) + reference.alias = base::unquote(scanner->token_text()); - // Finally arrived at the table reference. - reference.table = base::unquote(scanner->token_text()); - scanner->previous(true); - if (scanner->token_type() == DOT_SYMBOL) - { - // Might have a schema part (or just a leading dot). - scanner->previous(true); - if (scanner->token_type() == IDENTIFIER) - reference.schema = base::unquote(scanner->token_text()); - } + referencesStack.front().push_back(reference); + scanner->seek(position); + } - references.push_back(reference); - scanner->seek(marker); + return true; } - return true; + + scanner->seek(marker); } - - scanner->seek(marker); } - walk_stack.pop_back(); return false; } //------------------------------------------------------------------------------------------------ /** - * Called if one of the candidates is a column_ref before a FROM keyword (i.e. a select item). + * Called if one of the candidates is a column_ref. * The function attempts to get table references together with aliases where possible. - * Since it is not required that the sql code must be valid after the caret we scan only as far - * as we can match the input to the grammar. + * Because inner queries can use table references from outer queries we can simply scan for any FROM clause + * provided we don't go deeper. This way the query doesn't need to be error free, just the FROM clauses must. */ - void collectTableReferences() + void collectRemainingTableReferences() { - // First advance to the FROM keyword on the same level as we are (no subselects etc.). + // First advance to the FROM keyword on the same level as the caret is (no subselects etc.). + // With certain syntax errors this can lead to a wrong FROM clause (e.g. if parentheses don't match). + // But that is acceptable. + + // Reset the scanner to the caret position and continue from there. We have already collected all + // table references before that position during normal matching. + scanner->reset(); + scanner->seek(caret_line, caret_offset); + size_t level = 0; - bool done = false; - while (!done) + while (true) { switch (scanner->token_type()) { case FROM_SYMBOL: - if (level > 0) - { - scanner->next(true); - break; - } - // Fall through. + scanner->next(true); + if (level == 0 && !scanner->is(DUAL_SYMBOL)) + matchRuleAndCollectTableRefs("join_table_list"); + break; case ANTLR3_TOKEN_EOF: - done = true; - break; + return; case OPEN_PAR_SYMBOL: ++level; @@ -853,10 +1085,8 @@ break; case CLOSE_PAR_SYMBOL: - // We can act relaxed here, even if the number of opening and closing - // parentheses doesn't match. - // Additionally, it can happen we are called with any number of opening pars before - // the caret position. + // No problem having more closing pars as we have opening ones. Could be there is a syntax error + // or we just started and the caret position is between some parentheses. if (level > 0) --level; scanner->next(true); @@ -866,27 +1096,30 @@ scanner->next(true); } } + } - if (scanner->token_type() != FROM_SYMBOL) - return; // Something is wrong (but not critical), e.g. end of input . - - scanner->next(true); + //------------------------------------------------------------------------------------------------ - if (scanner->token_type() == DUAL_SYMBOL) - return; // Nothing to do. + /** + * Copies the current references stack into the references map. + */ + void takeReferencesSnapshot() + { + // Don't clear the references map here. Can happen we have to take multiple snapshots. + // We automatically remove duplicates by using a map. + for (size_t level = 0; level < referencesStack.size(); ++level) + { + for (size_t entry = 0; entry < referencesStack[level].size(); ++entry) + references.push_back(referencesStack[level][entry]); + } - walk_stack.clear(); - references.clear(); - matchRuleAndCollectTableRefs("join_table_list"); } //------------------------------------------------------------------------------------------------ - + bool is_token_end_after_caret() { - // The first time we found that the caret is before the current token we store the - // current position of the input stream to return to it after we collected all candidates. - if (scanner->token_type() == ANTLR3_TOKEN_EOF) + if (scanner->is(ANTLR3_TOKEN_EOF)) return true; assert(scanner->token_line() > 0); @@ -924,7 +1157,10 @@ { GrammarNode node = sequence.nodes[i]; if (node.is_terminal && node.token_ref == ANTLR3_TOKEN_EOF) + { + run_state = RunStateMatching; break; + } if (node.is_terminal) { @@ -938,7 +1174,6 @@ { // Also collect following tokens into this candidate, until we find the end of the sequence // or a token that is either not required or can appear multiple times. - // Don't do this however, if we have an ignored token here. std::string token_refs = token_ref; if (!ignored && !node.multiple) { @@ -949,6 +1184,7 @@ break; token_refs += std::string(" ") + token_names[node.token_ref]; } + if (token_refs.size() > token_ref.size()) { if (!exists) @@ -956,23 +1192,24 @@ completion_candidates.insert(token_refs); } } - run_state = RunStateCollectionDone; + + // If we found a required token then we are done with this alternative. + // That doesn't mean that we cannot start another collection run somewhere else. Just not in this alt anymore + // (and those rules that include this alt). + run_state = RunStateMatching; return; } } else { collect_from_rule(node.rule_ref); - if (!node.is_required) - run_state = RunStateCollectionPending; - else - if (run_state != RunStateCollectionPending) - run_state = RunStateCollectionDone; - if (node.is_required && run_state == RunStateCollectionDone) + if (node.is_required && run_state != RunStateCollectionPending) return; } } - run_state = RunStateCollectionPending; // Parent needs to continue. + + // If we reach this point then we have found only optional parts, so the parent must continue collecting. + run_state = RunStateCollectionPending; } //---------------------------------------------------------------------------------------------------------------------- @@ -986,44 +1223,52 @@ if (rules_holder.special_rules.find(rule) != rules_holder.special_rules.end()) { completion_candidates.insert(rule); - run_state = RunStateCollectionDone; + run_state = RunStateMatching; return; } - // If this is an ignored rule see if we are in a path that involves a special rule - // and use this if found. - if (rules_holder.ignored_rules.find(rule) != rules_holder.ignored_rules.end()) + // Don't collect anything from an ignored rule. + if (rules_holder.ignored_rules.count(rule) > 0) { - for (std::deque::const_reverse_iterator i = walk_stack.rbegin(); i != walk_stack.rend(); ++i) - { - if (rules_holder.special_rules.find(*i) != rules_holder.special_rules.end()) - { - completion_candidates.insert(*i); - run_state = RunStateCollectionDone; - break; - } - } + run_state = RunStateMatching; return; } // Any other rule goes here. - RunState combined_state = RunStateCollectionDone; + RunState combined_state = RunStateMatching; RuleAlternatives alts = rules_holder.rules[rule]; - for (std::vector::const_iterator i = alts.begin(); i != alts.end(); ++i) + if (alts.optimized) + { + // Insert only tokens we are interested in. + for (std::set::const_iterator i = alts.set.begin(); i != alts.set.end(); ++i) + { + std::string token_ref = token_names[*i]; + bool ignored = rules_holder.ignored_tokens.find(token_ref) != rules_holder.ignored_tokens.end(); + if (!ignored) + completion_candidates.insert(token_ref); + } + + run_state = RunStateMatching; + return; + } + else { - // First run a predicate check if this alt can be considered at all. - if ((i->min_version > server_version) || (server_version > i->max_version)) - continue; + for (std::vector::const_iterator i = alts.sequence.begin(); i != alts.sequence.end(); ++i) + { + // First run a predicate check if this alt can be considered at all. + if ((i->min_version > server_version) || (server_version > i->max_version)) + continue; - if ((i->active_sql_modes > -1) && (i->active_sql_modes & sql_mode) != i->active_sql_modes) - continue; + if ((i->active_sql_modes > -1) && (i->active_sql_modes & sql_mode) != i->active_sql_modes) + continue; - if ((i->inactive_sql_modes > -1) && (i->inactive_sql_modes & sql_mode) != 0) - continue; + if ((i->inactive_sql_modes > -1) && (i->inactive_sql_modes & sql_mode) != 0) + continue; - collect_from_alternative(*i, 0); - if (run_state == RunStateCollectionPending) - combined_state = RunStateCollectionPending; + collect_from_alternative(*i, 0); + if (run_state == RunStateCollectionPending) + combined_state = RunStateCollectionPending; + } } run_state = combined_state; } @@ -1037,13 +1282,29 @@ bool match(const GrammarNode &node, uint32_t token_type) { if (node.is_terminal) - return node.token_ref == token_type; + return (node.token_ref == token_type) || (node.any && !scanner->is(ANTLR3_TOKEN_EOF)); else return match_rule(node.rule_ref); } //---------------------------------------------------------------------------------------------------------------------- + /** + * Returns true if the given index is at the end of the sequence or at a point where only optional parts follow. + */ + bool hasMatchedAllMandatoryTokens(const GrammarSequence &sequence, size_t index) + { + if (index + 1 == sequence.nodes.size()) + return true; + for (size_t i = index + 1; i < sequence.nodes.size(); ++i) + if (sequence.nodes[i].is_required) + return false; + + return true; + } + + //---------------------------------------------------------------------------------------------------------------------- + bool match_alternative(const GrammarSequence &sequence) { // An empty sequence per se matches anything without consuming input. @@ -1069,18 +1330,16 @@ { if (run_state == RunStateCollectionPending) { + // We start collecting at the current node if it allows multiple matches (to include candidates from the + // current rule). However this can prematurely stop the collection, since it might contain mandatory nodes. + // But since we matched it already at least once we also have to include tokens directly following it. + // Hence two calls for collect_from_alternative. The second call might include again already added candidates + // but duplicates are sorted out automatically. + if (node.multiple) + collect_from_alternative(sequence, i); collect_from_alternative(sequence, i + 1); - - /* This part looks suspicious as it inserts special rules even if they don't match. - - // If we just started collecting it might be we are in a special rule. - // Check the end of the stack and if so push the rule name to the candidates. - // Duplicates will be handled automatically. - if (rules_holder.special_rules.find(walk_stack.back()) != rules_holder.special_rules.end()) - completion_candidates.insert(walk_stack.back()); - */ } - return false; + return matched && hasMatchedAllMandatoryTokens(sequence, i); // Return true only if we fully matched the sequence. } if (matched && node.multiple) @@ -1096,45 +1355,107 @@ } while (true); + // Important note: + // We still have an unsolved problem here, which has to do with ignored rules that are part of special rules + // (e.g. a qualified identifier in an object reference). + // Normally we walk up the match stack to see if we can include the special rule in such a case. However, if that + // ignored rule ends with an optional part we cannot say currently if the current caret position is to be considered + // still as part of that ignored rule or must be seen as part of the following one: + // "qualifier. |" vs "identifier |" (with | being the caret). + // In the first case we have to include the special rule, while in the second case we must not. + // + // However this is a very special case and we solve this currently by testing for the DOT symbol, but this + // solution is not universal. if (matched) { // Load next token if the grammar node is a terminal node. // Otherwise the match() call will have advanced the input position already. if (node.is_terminal) { + ANTLR3_UINT32 lastToken = scanner->token_type(); scanner->next(true); if (is_token_end_after_caret()) { - collect_from_alternative(sequence, i + 1); - return false; + takeReferencesSnapshot(); + + // XXX: hack, need a better way to find out when we have to include the special rule from the stack. + // Using a fixed token look-back might not be valid for all languages. + if (lastToken == DOT_SYMBOL) + { + for (std::deque::const_iterator iterator = walk_stack.begin(); iterator != walk_stack.end(); ++iterator) + { + if (rules_holder.special_rules.find(*iterator) != rules_holder.special_rules.end()) + { + completion_candidates.insert(*iterator); + run_state = RunStateMatching; + return hasMatchedAllMandatoryTokens(sequence, i); + } + } + } + + collect_from_alternative(sequence, node.multiple ? i : i + 1); + + return hasMatchedAllMandatoryTokens(sequence, i); + } + } + else + { + // Similar here for non-terminals. + if (is_token_end_after_caret()) + { + takeReferencesSnapshot(); + collect_from_alternative(sequence, node.multiple ? i : i + 1); + + return hasMatchedAllMandatoryTokens(sequence, i); } } // If the current grammar node can be matched multiple times try as often as you can. // This is the greedy approach and default in ANTLR. At the moment we don't support non-greedy matches // as we don't use them in MySQL parser rules. - if (scanner->token_type() != ANTLR3_TOKEN_EOF && node.multiple) + if (!scanner->is(ANTLR3_TOKEN_EOF) && node.multiple) { - while (match(node, scanner->token_type())) + while (true) { - if (run_state != RunStateMatching) + matched = match(node, scanner->token_type()); + + // If we get a pending collection state here then it means the match() call caused a candidate collection + // to start and reached the end of the node which contains at least one path that allows to match + // more tokens after itself. + // So, we have to continue collecting candidates after the current node. + if (run_state == RunStateCollectionPending) { - if (run_state == RunStateCollectionPending) - collect_from_alternative(sequence, i + 1); - return false; - } + collect_from_alternative(sequence, i); // No check needed for multiple occurences (always the case here). + collect_from_alternative(sequence, i + 1); // Same double collection as above. - if (node.is_terminal) + // If this collection run reached an end it means we are done here. + // Otherwise we might still need more candidates to collect because this node or its subnodes are all + // optional too. + if (run_state != RunStateCollectionPending) + return hasMatchedAllMandatoryTokens(sequence, i); + + if (!matched) + break; + } + else { - scanner->next(true); - if (is_token_end_after_caret()) + if (!matched) + break; + + if (node.is_terminal) { - collect_from_alternative(sequence, i + 1); - return false; + scanner->next(true); + if (is_token_end_after_caret()) + { + takeReferencesSnapshot(); + collect_from_alternative(sequence, i + 1); + return hasMatchedAllMandatoryTokens(sequence, i); + } } + + if (scanner->is(ANTLR3_TOKEN_EOF)) + break; } - if (scanner->token_type() == ANTLR3_TOKEN_EOF) - break; } } } @@ -1157,6 +1478,17 @@ bool match_rule(const std::string &rule) { + if (rule == "subquery") + referencesStack.push_front(std::vector()); // Starting a new level. + + if (rule == "join_table_list" || rule == "table_ref") + { + // Collect table references as we come along them. + size_t lastPosition = scanner->position(); + matchRuleAndCollectTableRefs(rule); + scanner->seek(lastPosition); + } + if (run_state != RunStateMatching) // Sanity check - should never happen at this point. return false; @@ -1166,52 +1498,74 @@ return false; } - walk_stack.push_back(rule); - - // The first alternative that matches wins. - RuleAlternatives alts = rules_holder.rules[rule]; - bool can_seek = false; + walk_stack.push_front(rule); size_t highest_token_index = 0; - RunState result_state = run_state; - for (size_t i = 0; i < alts.size(); ++i) - { - // First run a predicate check if this alt can be considered at all. - GrammarSequence alt = alts[i]; - if ((alt.min_version > server_version) || (server_version > alt.max_version)) - continue; + bool matchedAtLeastOnce = false; - if ((alt.active_sql_modes > -1) && (alt.active_sql_modes & sql_mode) != alt.active_sql_modes) - continue; - - if ((alt.inactive_sql_modes > -1) && (alt.inactive_sql_modes & sql_mode) != 0) - continue; + // The longest match wins. + RuleAlternatives alts = rules_holder.rules[rule]; + if (alts.optimized) + { + // In the optimized case we have neither predicates nor sequences. + // We match a single terminal only, out of a set of alternative terminals. + if (alts.set.count(scanner->token_type()) > 0) + { + matchedAtLeastOnce = true; + scanner->next(true); + if (is_token_end_after_caret()) + result_state = RunStateCollectionPending; + } + } + else + { + bool can_seek = false; - // When attempting to match one alt out of a list pick the one with the longest match. - // Reset the run state each time to have the base matching done first (in case a previous alt did collect). - size_t marker = scanner->position(); - run_state = RunStateMatching; - if (match_alternative(alt) || run_state != RunStateMatching) + for (size_t i = 0; i < alts.sequence.size(); ++i) { - can_seek = true; - if (scanner->position() > highest_token_index) + // First run a predicate check if this alt can be considered at all. + GrammarSequence alt = alts.sequence[i]; + if ((alt.min_version > server_version) || (server_version > alt.max_version)) + continue; + + if ((alt.active_sql_modes > -1) && (alt.active_sql_modes & sql_mode) != alt.active_sql_modes) + continue; + + if ((alt.inactive_sql_modes > -1) && (alt.inactive_sql_modes & sql_mode) != 0) + continue; + + // When attempting to match one alt out of a list pick the one with the longest match. + // Reset the run state each time to have the base matching done first (in case a previous alt did collect). + size_t marker = scanner->position(); + run_state = RunStateMatching; + bool matched = match_alternative(alt); + if (matched) + matchedAtLeastOnce = true; + if (matched || run_state != RunStateMatching) { - highest_token_index = scanner->position(); - result_state = run_state; + can_seek = true; + if (scanner->position() > highest_token_index) + { + highest_token_index = scanner->position(); + result_state = run_state; + } } + + scanner->seek(marker); } - scanner->seek(marker); + if (can_seek) + scanner->seek(highest_token_index); // Move to the end of the longest match. } - if (can_seek) - scanner->seek(highest_token_index); // Move to the end of the longest match. - run_state = result_state; + walk_stack.pop_front(); - walk_stack.pop_back(); - return can_seek && result_state == RunStateMatching; + if (rule == "subquery") + referencesStack.pop_front(); // Subquery ended, no need for the nested references anymore. + + return matchedAtLeastOnce; } //------------------------------------------------------------------------------------------------ @@ -1374,11 +1728,13 @@ run++; } - // If we come here then we are outside any quoted text. Scan back for anything we consider - // to be a word stopper (for now anything below '0', char code wise). + // If we come here then we are outside of any quoted text. Scan back for anything we consider to be a word stopper. while (head < run--) { - if (*run < '0') + gunichar *converted = g_utf8_to_ucs4_fast(run, 1, NULL); + bool isStopper = !(g_unichar_isalnum(*converted) || *run == '_'); + g_free(converted); + if (isStopper) return run + 1; } return head; @@ -1421,7 +1777,7 @@ if (scanner->token_channel() != 0) scanner->next(true); // First skip to the next non-hidden token. - if (scanner->token_type() != DOT_SYMBOL && !scanner->is_identifier()) + if (!scanner->is(DOT_SYMBOL) && !scanner->is_identifier()) { // We are at the end of an incomplete identifier spec. Jump back, so that the other tests succeed. scanner->previous(true); @@ -1432,7 +1788,7 @@ { if (scanner->is_identifier() && scanner->look_around(-1, true) == DOT_SYMBOL) scanner->previous(true); - if (scanner->token_type() == DOT_SYMBOL && scanner->MySQLRecognitionBase::is_identifier(scanner->look_around(-1, true))) + if (scanner->is(DOT_SYMBOL) && scanner->MySQLRecognitionBase::is_identifier(scanner->look_around(-1, true))) scanner->previous(true); } @@ -1441,12 +1797,12 @@ std::string temp; if (scanner->is_identifier()) { - temp = scanner->token_text(); + temp = base::unquote(scanner->token_text()); scanner->next(true); } // Bail out if there is no more id parts or we are already behind the caret position. - if (scanner->token_type() != DOT_SYMBOL || position <= scanner->position()) + if (!scanner->is(DOT_SYMBOL) || position <= scanner->position()) return ObjectFlags(ShowFirst | ShowSecond); qualifier = temp; @@ -1483,7 +1839,7 @@ { if (scanner->is_identifier() && scanner->look_around(-1, true) == DOT_SYMBOL) scanner->previous(true); - if (scanner->token_type() == DOT_SYMBOL && scanner->MySQLRecognitionBase::is_identifier(scanner->look_around(-1, true))) + if (scanner->is(DOT_SYMBOL) && scanner->MySQLRecognitionBase::is_identifier(scanner->look_around(-1, true))) { scanner->previous(true); @@ -1504,12 +1860,12 @@ std::string temp; if (scanner->is_identifier()) { - temp = scanner->token_text(); + temp = base::unquote(scanner->token_text()); scanner->next(true); } // Bail out if there is no more id parts or we are already behind the caret position. - if (scanner->token_type() != DOT_SYMBOL || position <= scanner->position()) + if (!scanner->is(DOT_SYMBOL) || position <= scanner->position()) return ObjectFlags(ShowSchemas | ShowTables | ShowColumns); scanner->next(true); // Skip dot. @@ -1517,10 +1873,10 @@ schema = temp; if (scanner->is_identifier()) { - temp = scanner->token_text(); + temp = base::unquote(scanner->token_text()); scanner->next(true); - if (scanner->token_type() != DOT_SYMBOL || position <= scanner->position()) + if (!scanner->is(DOT_SYMBOL) || position <= scanner->position()) return ObjectFlags(ShowTables | ShowColumns); // Schema only valid for tables. Columns must use default schema. table = temp; @@ -1543,7 +1899,7 @@ //-------------------------------------------------------------------------------------------------- -void insert_schemas(AutoCompleteCache *cache, CompletionSet &set, const std::string &typed_part) +static void insertSchemas(AutoCompleteCache *cache, CompletionSet &set, const std::string &typed_part) { std::vector schemas = cache->get_matching_schema_names(typed_part); for (std::vector::const_iterator schema = schemas.begin(); schema != schemas.end(); ++schema) @@ -1552,22 +1908,44 @@ //-------------------------------------------------------------------------------------------------- -void insert_tables(AutoCompleteCache *cache, CompletionSet &set, const std::string &schema, +static void insertTables(AutoCompleteCache *cache, CompletionSet &set, const std::set &schemas, const std::string &typed_part) { - std::vector tables = cache->get_matching_table_names(schema, typed_part); - for (std::vector::const_iterator table = tables.begin(); table != tables.end(); ++table) - set.insert(std::make_pair(AC_TABLE_IMAGE, *table)); + for (std::set::const_iterator iterator = schemas.begin(); iterator != schemas.end(); ++iterator) + { + std::vector tables = cache->get_matching_table_names(*iterator, typed_part); + for (std::vector::const_iterator table = tables.begin(); table != tables.end(); ++table) + set.insert(std::make_pair(AC_TABLE_IMAGE, *table)); + } } //-------------------------------------------------------------------------------------------------- -void insert_views(AutoCompleteCache *cache, CompletionSet &set, const std::string &schema, +static void insertViews(AutoCompleteCache *cache, CompletionSet &set, const std::set &schemas, const std::string &typed_part) { - std::vector views = cache->get_matching_view_names(schema, typed_part); - for (std::vector::const_iterator view = views.begin(); view != views.end(); ++view) - set.insert(std::make_pair(AC_VIEW_IMAGE, *view)); + for (std::set::const_iterator iterator = schemas.begin(); iterator != schemas.end(); ++iterator) + { + std::vector views = cache->get_matching_view_names(*iterator, typed_part); + for (std::vector::const_iterator view = views.begin(); view != views.end(); ++view) + set.insert(std::make_pair(AC_VIEW_IMAGE, *view)); + } +} + +//-------------------------------------------------------------------------------------------------- + +static void insertColumns(AutoCompleteCache *cache, CompletionSet &set, const std::set &schemas, + const std::set &tables, const std::string &typedPart) +{ + for (std::set::const_iterator schemaIterator = schemas.begin(); schemaIterator != schemas.end(); ++schemaIterator) + { + for (std::set::const_iterator tableIterator = tables.begin(); tableIterator != tables.end(); ++tableIterator) + { + std::vector columns = cache->get_matching_column_names(*schemaIterator, *tableIterator, typedPart); + for (std::vector::const_iterator column = columns.begin(); column != columns.end(); ++column) + set.insert(std::make_pair(AC_COLUMN_IMAGE, *column)); + } + } } //-------------------------------------------------------------------------------------------------- @@ -1652,16 +2030,18 @@ CompletionSet engine_entries; CompletionSet logfile_group_entries; CompletionSet tablespace_entries; - CompletionSet user_var_entries; CompletionSet system_var_entries; CompletionSet keyword_entries; - - // To be done yet. CompletionSet collation_entries; CompletionSet charset_entries; + CompletionSet event_entries; + + // Handled but needs meat yet. + CompletionSet user_var_entries; + + // To be done yet. CompletionSet user_entries; CompletionSet index_entries; - CompletionSet event_entries; CompletionSet plugin_entries; _auto_completion_entries.clear(); @@ -1669,7 +2049,13 @@ bool uppercase_keywords = make_keywords_uppercase(); boost::shared_ptr scanner = parser_context->createScanner(statement); context.server_version = scanner->get_server_version(); - context.collect_candiates(scanner); + context.collectCandidates(scanner); + + MySQLQueryType queryType = QtUnknown; + { + boost::shared_ptr queryIdentifier = parser_context->createQueryIdentifier(); + queryType = queryIdentifier->getQueryType(statement.c_str(), statement.size(), true); + } // No sorting on the entries takes place. We group by type. for (std::set::const_iterator i = context.completion_candidates.begin(); i != context.completion_candidates.end(); ++i) @@ -1685,7 +2071,7 @@ std::string entry; for (std::vector::const_iterator j = entries.begin(); j != entries.end(); ++j) { - if (ends_with(*j, "_SYMBOL")) + if (base::ends_with(*j, "_SYMBOL")) { // A single keyword or something in a keyword sequence. Convert the entry to a readable form. std::string token = j->substr(0, j->size() - 7); @@ -1705,6 +2091,10 @@ break; } } + else if (token == "JSON_SEPARATOR") + { + keyword_entries.insert(std::make_pair(AC_OPERATOR_IMAGE, "->")); + } else { if (!entry.empty()) @@ -1732,14 +2122,22 @@ if (_editor_config != NULL && _auto_completion_cache != NULL) { std::map keyword_map = _editor_config->get_keywords(); - if (*i == "udf_call") + if (*i == "runtime_function_call") { - log_debug3("Adding runtime function names to code completion list\n"); + log_debug3("Adding runtime function names\n"); std::vector functions = base::split_by_set(keyword_map["Functions"], " \t\n"); for (std::vector::const_iterator function = functions.begin(); function != functions.end(); ++function) runtime_function_entries.insert(std::make_pair(AC_FUNCTION_IMAGE, *function + "()")); } + else if (*i == "udf_call") + { + log_debug3("Adding user defined function names from cache\n"); + + std::vector functions = _auto_completion_cache->get_matching_udf_names(context.typed_part); + for (std::vector::const_iterator function = functions.begin(); function != functions.end(); ++function) + runtime_function_entries.insert(std::make_pair(AC_FUNCTION_IMAGE, *function + "()")); + } else if (*i == "engine_ref") { log_debug3("Adding engine names\n"); @@ -1751,7 +2149,7 @@ else if (*i == "schema_ref") { log_debug3("Adding schema names from cache\n"); - insert_schemas(_auto_completion_cache, schema_entries, context.typed_part); + insertSchemas(_auto_completion_cache, schema_entries, context.typed_part); } else if (*i == "procedure_ref") { @@ -1761,7 +2159,7 @@ ObjectFlags flags = determine_qualifier(scanner, qualifier); if ((flags & ShowFirst) != 0) - insert_schemas(_auto_completion_cache, schema_entries, context.typed_part); + insertSchemas(_auto_completion_cache, schema_entries, context.typed_part); if ((flags & ShowSecond) != 0) { @@ -1781,7 +2179,7 @@ ObjectFlags flags = determine_qualifier(scanner, qualifier); if ((flags & ShowFirst) != 0) - insert_schemas(_auto_completion_cache, schema_entries, context.typed_part); + insertSchemas(_auto_completion_cache, schema_entries, context.typed_part); if ((flags & ShowSecond) != 0) { @@ -1802,14 +2200,14 @@ std::string schema, table; ObjectFlags flags = determine_schema_table_qualifier(scanner, schema, table); if ((flags & ShowSchemas) != 0) - insert_schemas(_auto_completion_cache, schema_entries, context.typed_part); + insertSchemas(_auto_completion_cache, schema_entries, context.typed_part); - if (schema.empty()) - schema = _current_schema; + std::set schemas; + schemas.insert(schema.empty() ? _current_schema : schema); if ((flags & ShowTables) != 0) { - insert_tables(_auto_completion_cache, table_entries, schema, context.typed_part); - insert_views(_auto_completion_cache, view_entries, schema, context.typed_part); + insertTables(_auto_completion_cache, table_entries, schemas, context.typed_part); + insertViews(_auto_completion_cache, view_entries, schemas, context.typed_part); } } else if (*i == "table_ref" || *i == "filter_table_ref" || *i == "table_ref_no_db") @@ -1821,75 +2219,112 @@ ObjectFlags flags = determine_qualifier(scanner, qualifier); if ((flags & ShowFirst) != 0) - insert_schemas(_auto_completion_cache, schema_entries, context.typed_part); + insertSchemas(_auto_completion_cache, schema_entries, context.typed_part); if ((flags & ShowSecond) != 0) { - if (qualifier.empty()) - qualifier = _current_schema; + std::set schemas; + schemas.insert(qualifier.empty() ? _current_schema : qualifier); - insert_tables(_auto_completion_cache, table_entries, qualifier, context.typed_part); - insert_views(_auto_completion_cache, view_entries, qualifier, context.typed_part); + insertTables(_auto_completion_cache, table_entries, schemas, context.typed_part); + insertViews(_auto_completion_cache, view_entries, schemas, context.typed_part); } } - else if (*i == "column_ref" || *i == "column_ref_with_wildcard" || *i == "table_wild") + else if (*i == "column_ref" || *i == "column_internal_ref" || *i == "column_ref_with_wildcard" || *i == "table_wild") { log_debug3("Adding column names from cache\n"); + // Try limiting what to show to the smallest set possible. + // If we have table references show columns only from them. + // Show columns from the default schema only if there are no references. std::string schema, table; ObjectFlags flags = determine_schema_table_qualifier(scanner, schema, table); if ((flags & ShowSchemas) != 0) - insert_schemas(_auto_completion_cache, schema_entries, context.typed_part); + insertSchemas(_auto_completion_cache, schema_entries, context.typed_part); + + // If a schema is given then list only tables + columns from that schema. + // If no schema is given but we have table references use the schemas from them. + // Otherwise use the default schema. + // TODO: case sensitivity. + std::set schemas; + + if (!schema.empty()) + schemas.insert(schema); + else + if (!context.references.empty()) + { + for (size_t i = 0; i < context.references.size(); ++ i) + { + if (!context.references[i].schema.empty()) + schemas.insert(context.references[i].schema); + } + } + + if (schemas.empty()) + schemas.insert(_current_schema); - if (schema.empty()) - schema = _current_schema; if ((flags & ShowTables) != 0) { - insert_tables(_auto_completion_cache, table_entries, schema, context.typed_part); + insertTables(_auto_completion_cache, table_entries, schemas, context.typed_part); if (*i == "column_ref") { // Insert also views. - insert_views(_auto_completion_cache, view_entries, schema, context.typed_part); + insertViews(_auto_completion_cache, view_entries, schemas, context.typed_part); - // Insert also tables from our references list (which is a collection of table names - // with aliases). - for (size_t i = 0; i < context.references.size(); ++i) + // Insert also tables from our references list. + for (std::vector::const_iterator iterator = context.references.begin(); + iterator != context.references.end(); ++iterator) { - TableReference reference = context.references[i]; - std::string used_schema = schema; - if (reference.schema.empty()) - used_schema = _current_schema; - if (reference.schema == used_schema) - table_entries.insert(std::make_pair(AC_TABLE_IMAGE, reference.alias)); + // If no schema was specified then allow also tables without a given schema. Otherwise + // the reference's schema must match any of the specified schemas (which include those from the ref list). + if ((schema.empty() && iterator->schema.empty()) || (schemas.count(iterator->schema) > 0)) + table_entries.insert(std::make_pair(AC_TABLE_IMAGE, iterator->alias.empty() ? iterator->table : iterator->alias)); } } } if ((flags & ShowColumns) != 0) { - // If we only show columns then we can use the given schema. - // Otherwise we don't have an explicit schema and use the default one. - if (flags != ShowColumns) - schema = _current_schema; - std::vector columns = _auto_completion_cache->get_matching_column_names(schema, table, context.typed_part); - for (std::vector::const_iterator column = columns.begin(); column != columns.end(); ++column) - column_entries.insert(std::make_pair(AC_COLUMN_IMAGE, *column)); - - if (*i == "column_ref") + if (schema == table) // Schema and table are equal if it's not clear if we see a schema or table qualfier. + schemas.insert(_current_schema); + + // For the columns we use a similar approach like for the schemas. + // If a table is given, list only columns from this (use the set of schemas from above). + // If not and we have table references then show columns from them. + // Otherwise show no columns. + std::set tables; + if (!table.empty()) { - // Insert also columns from matching tables from our references list. - for (size_t i = 0; i < context.references.size(); ++i) - { - TableReference reference = context.references[i]; - if (!reference.schema.empty()) - schema = reference.schema; - if (reference.alias == table) + tables.insert(table); + + // Could be an alias. + for (size_t i = 0; i < context.references.size(); ++ i) + if (base::same_string(table, context.references[i].alias)) { - columns = _auto_completion_cache->get_matching_column_names(schema, reference.table, context.typed_part); - for (std::vector::const_iterator column = columns.begin(); column != columns.end(); ++column) - column_entries.insert(std::make_pair(AC_COLUMN_IMAGE, *column)); + tables.insert(context.references[i].table); + break; } + } + else + if (!context.references.empty() && *i == "column_ref") + { + for (size_t i = 0; i < context.references.size(); ++ i) + tables.insert(context.references[i].table); } + + if (!tables.empty()) + { + insertColumns(_auto_completion_cache, column_entries, schemas, tables, context.typed_part); + } + + // Special deal here: triggers. Show columns for the "new" and "old" qualifiers too. + // Use the first reference in the list, which is the table to which this trigger belongs (there can be more + // if the trigger body references other tables). + if (queryType == QtCreateTrigger && !context.references.empty() && (base::same_string(table, "old") || base::same_string(table, "new"))) + { + tables.clear(); + tables.insert(context.references[0].table); + insertColumns(_auto_completion_cache, column_entries, schemas, tables, context.typed_part); } } } @@ -1902,8 +2337,11 @@ std::string qualifier; ObjectFlags flags = determine_qualifier(scanner, qualifier); + std::set schemas; + schemas.insert(_current_schema); + if ((flags & ShowFirst) != 0) - insert_tables(_auto_completion_cache, schema_entries, _current_schema, context.typed_part); + insertTables(_auto_completion_cache, schema_entries, schemas, context.typed_part); if ((flags & ShowSecond) != 0) { @@ -1921,7 +2359,7 @@ ObjectFlags flags = determine_qualifier(scanner, qualifier); if ((flags & ShowFirst) != 0) - insert_schemas(_auto_completion_cache, schema_entries, context.typed_part); + insertSchemas(_auto_completion_cache, schema_entries, context.typed_part); if ((flags & ShowSecond) != 0) { @@ -1962,6 +2400,44 @@ for (std::vector::const_iterator variable = variables.begin(); variable != variables.end(); ++variable) system_var_entries.insert(std::make_pair(AC_SYSTEM_VAR_IMAGE, *variable)); } + else if (*i == "charset_name") + { + log_debug3("Adding charsets\n"); + + std::vector charsets = _auto_completion_cache->get_matching_charsets(context.typed_part); + for (std::vector::const_iterator charset = charsets.begin(); charset != charsets.end(); ++charset) + charset_entries.insert(std::make_pair(AC_CHARSET_IMAGE, *charset)); + } + else if (*i == "collation_name") + { + log_debug3("Adding collations\n"); + + std::vector collations = _auto_completion_cache->get_matching_collations(context.typed_part); + for (std::vector::const_iterator collation = collations.begin(); collation != collations.end(); ++collation) + collation_entries.insert(std::make_pair(AC_COLLATION_IMAGE, *collation)); + } + else if (*i == "event_ref") + { + log_debug3("Adding events\n"); + + std::string qualifier; + ObjectFlags flags = determine_qualifier(scanner, qualifier); + + if ((flags & ShowFirst) != 0) + insertSchemas(_auto_completion_cache, schema_entries, context.typed_part); + + if ((flags & ShowSecond) != 0) + { + if (qualifier.empty()) + qualifier = _current_schema; + + std::vector events = _auto_completion_cache->get_matching_events(qualifier, context.typed_part); + for (std::vector::const_iterator event = events.begin(); event != events.end(); ++event) + view_entries.insert(std::make_pair(AC_EVENT_IMAGE, *event)); + } + } + else + keyword_entries.insert(std::make_pair(0, *i)); } } else @@ -1973,14 +2449,19 @@ } } + // Insert the groups "inside out", that is, most likely ones first + most inner first (columns before tables etc). std::copy(keyword_entries.begin(), keyword_entries.end(), std::back_inserter(_auto_completion_entries)); - std::copy(schema_entries.begin(), schema_entries.end(), std::back_inserter(_auto_completion_entries)); + std::copy(column_entries.begin(), column_entries.end(), std::back_inserter(_auto_completion_entries)); std::copy(table_entries.begin(), table_entries.end(), std::back_inserter(_auto_completion_entries)); std::copy(view_entries.begin(), view_entries.end(), std::back_inserter(_auto_completion_entries)); + std::copy(schema_entries.begin(), schema_entries.end(), std::back_inserter(_auto_completion_entries)); + + // Everything else is significantly less used. + // TODO: make this configurable. + // TODO: show an optimized (small) list of candidates on first invocation, a full list on every following. std::copy(function_entries.begin(), function_entries.end(), std::back_inserter(_auto_completion_entries)); std::copy(procedure_entries.begin(), procedure_entries.end(), std::back_inserter(_auto_completion_entries)); std::copy(trigger_entries.begin(), trigger_entries.end(), std::back_inserter(_auto_completion_entries)); - std::copy(column_entries.begin(), column_entries.end(), std::back_inserter(_auto_completion_entries)); std::copy(index_entries.begin(), index_entries.end(), std::back_inserter(_auto_completion_entries)); std::copy(event_entries.begin(), event_entries.end(), std::back_inserter(_auto_completion_entries)); std::copy(user_entries.begin(), user_entries.end(), std::back_inserter(_auto_completion_entries)); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/sql_editor_be.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/sql_editor_be.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/sql_editor_be.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/sql_editor_be.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -258,8 +258,7 @@ setup_auto_completion(); _auto_completion_cache = NULL; - - _sql_mode = ""; + _continue_on_error = false; setup_editor_menu(); } @@ -282,8 +281,8 @@ if (d->_editor_text_submenu != NULL) delete d->_editor_text_submenu; delete d->_editor_context_menu; - if (d->_owns_toolbar) - delete d->_toolbar; + if (d->_owns_toolbar && d->_toolbar != NULL) + d->_toolbar->release(); delete _editor_config; delete _code_editor; @@ -493,7 +492,7 @@ if (!d->_toolbar) { d->_owns_toolbar = true; - d->_toolbar = new mforms::ToolBar(mforms::SecondaryToolBar); + d->_toolbar = mforms::manage(new mforms::ToolBar(mforms::SecondaryToolBar)); #ifdef _WIN32 d->_toolbar->set_size(-1, 27); #endif @@ -750,7 +749,7 @@ d->_splitting_required = true; d->_text_info = _code_editor->get_text_ptr(); if (d->_is_sql_check_enabled) - d->_current_delay_timer = d->_grtm->run_every(boost::bind(&MySQLEditor::start_sql_processing, this), 0.05); + d->_current_delay_timer = d->_grtm->run_every(boost::bind(&MySQLEditor::start_sql_processing, this), 0.001); else d->_text_change_signal(); // If there is no timer set up then trigger change signals directly. } @@ -945,13 +944,17 @@ d->_error_marker_lines.swap(lines); + + mforms::LineMarkup unmark = _continue_on_error ? mforms::LineMarkupError : mforms::LineMarkupErrorContinue; + mforms::LineMarkup mark = _continue_on_error ? mforms::LineMarkupErrorContinue : mforms::LineMarkupError; + for (std::set::const_iterator iterator = removal_candidates.begin(); iterator != removal_candidates.end(); ++iterator) - _code_editor->remove_markup(mforms::LineMarkupError, *iterator); + _code_editor->remove_markup(unmark, *iterator); for (std::set::const_iterator iterator = insert_candidates.begin(); iterator != insert_candidates.end(); ++iterator) - _code_editor->show_markup(mforms::LineMarkupError, *iterator); + _code_editor->show_markup(mark, *iterator); return NULL; } @@ -1186,7 +1189,7 @@ { ThreadedTimer::get()->remove_task(d->_current_work_timer_id); // Does nothing if the id is -1. if (d->_current_delay_timer == NULL) - d->_current_delay_timer = d->_grtm->run_every(boost::bind(&MySQLEditor::start_sql_processing, this), 0.15); + d->_current_delay_timer = d->_grtm->run_every(boost::bind(&MySQLEditor::start_sql_processing, this), 0.01); } else stop_processing(); @@ -1317,3 +1320,27 @@ } //-------------------------------------------------------------------------------------------------- + +void MySQLEditor::set_continue_on_error(bool value) +{ + _continue_on_error = value; + + std::vector lines; + + mforms::LineMarkup unmark = _continue_on_error ? mforms::LineMarkupError : mforms::LineMarkupErrorContinue; + mforms::LineMarkup mark = _continue_on_error ? mforms::LineMarkupErrorContinue : mforms::LineMarkupError; + + for (size_t i = 0; i < d->_recognition_errors.size(); ++i) + { + _code_editor->show_indicator(mforms::RangeIndicatorError, d->_recognition_errors[i].position, d->_recognition_errors[i].length); + lines.push_back(_code_editor->line_from_position(d->_recognition_errors[i].position)); + } + + for (std::vector::iterator iter = lines.begin(); iter != lines.end(); ++iter) + { + _code_editor->remove_markup(unmark, *iter); + _code_editor->show_markup(mark, *iter); + } +} + +//-------------------------------------------------------------------------------------------------- diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/sql_editor_be.h mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/sql_editor_be.h --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/sql_editor_be.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/sql_editor_be.h 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -63,7 +63,7 @@ #define AC_SCHEMA_IMAGE 2 #define AC_TABLE_IMAGE 3 #define AC_ROUTINE_IMAGE 4 // For SQL stored procedures + functions. -#define AC_FUNCTION_IMAGE 5 // For MySQL library (runtime) functions. +#define AC_FUNCTION_IMAGE 5 // For MySQL library (runtime) functions and UDFs. #define AC_VIEW_IMAGE 6 #define AC_COLUMN_IMAGE 7 #define AC_OPERATOR_IMAGE 8 @@ -170,6 +170,8 @@ void focus(); void register_file_drop_for(mforms::DropDelegate *target); + + void set_continue_on_error(bool value); protected: MySQLEditor(grt::GRT *grt, parser::ParserContext::Ref syntax_check_context, @@ -222,4 +224,5 @@ std::string _current_schema; std::string _sql_mode; + bool _continue_on_error; }; diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/unit-tests/recordset_test.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/unit-tests/recordset_test.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/unit-tests/recordset_test.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/unit-tests/recordset_test.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -49,14 +49,23 @@ dbc_conn = sql::Dbc_connection_handler::Ref(new sql::Dbc_connection_handler()); dbc_conn->ref = dbc_drv_man->getConnection(wbt.get_connection_properties(), boost::bind(dummy)); + ensure("connection", dbc_conn->ref.get() != 0); } +static base::RecMutexLock getAuxConn(sql::Dbc_connection_handler::Ref &internalConn, sql::Dbc_connection_handler::Ref &conn) +{ + base::RecMutex _connLock; + base::RecMutexLock lock(_connLock, false); + conn = internalConn; + return lock; +} TEST_FUNCTION(2) { Recordset_cdbc_storage::Ref data_storage(Recordset_cdbc_storage::create(wbt.wb->get_grt_manager())); - data_storage->dbms_conn(dbc_conn); + + data_storage->setUserConnectionGetter(boost::bind(&getAuxConn, dbc_conn, _1)); Recordset::Ref rs = Recordset::create(wbt.wb->get_grt_manager()); rs->data_storage(data_storage); @@ -66,7 +75,6 @@ boost::shared_ptr rset(dbc_statement->getResultSet()); data_storage->dbc_resultset(rset); - data_storage->dbms_conn(dbc_conn); rs->reset(true); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/unit-tests/sql_editor.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/unit-tests/sql_editor.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/unit-tests/sql_editor.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/unit-tests/sql_editor.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -57,7 +57,7 @@ { db_mgmt_RdbmsRef rdbms= rdbms_list[n]; MySQLEditor::Ref sql_editor = MySQLEditor::create(tester.grt, parser, parser); - ensure(("failed to get sql editor for " + rdbms->name().repr() + " RDBMS").c_str(), (NULL != sql_editor.get())); + ensure(("failed to get sql editor for " + rdbms->name().toString() + " RDBMS").c_str(), (NULL != sql_editor.get())); } } diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/var_grid_model_be.cpp mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/var_grid_model_be.cpp --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/sqlide/var_grid_model_be.cpp 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/sqlide/var_grid_model_be.cpp 2016-10-14 12:12:04.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,9 +17,10 @@ * 02110-1301 USA */ +#include "sqlide_generics_private.h" + #include "var_grid_model_be.h" #include "base/string_utilities.h" -#include "sqlide_generics_private.h" #include #include #include @@ -95,6 +96,7 @@ void VarGridModel::reset() { + base::RecMutexLock data_mutex UNUSED (_data_mutex); _data_swap_db.reset(); if (_data_swap_db_path.empty()) { @@ -110,10 +112,7 @@ sqlite::execute(*data_swap_db, "create table `changes` (`id` integer primary key autoincrement, `record` integer, `action` integer, `column` integer)", true); } - { - base::RecMutexLock data_mutex UNUSED (_data_mutex); - reinit(_data); - } + reinit(_data); reinit(_column_names); reinit(_column_types); reinit(_real_column_types); diff -Nru mysql-workbench-6.3.6+dfsg/backend/wbpublic/stdafx.h mysql-workbench-6.3.8+dfsg/backend/wbpublic/stdafx.h --- mysql-workbench-6.3.6+dfsg/backend/wbpublic/stdafx.h 2015-12-10 13:46:19.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/backend/wbpublic/stdafx.h 2016-10-14 12:12:04.000000000 +0000 @@ -43,6 +43,8 @@ #include #include #include +#include +#include #define HAVE_ROUND #include diff -Nru mysql-workbench-6.3.6+dfsg/build/cmake/Modules/cotire.cmake mysql-workbench-6.3.8+dfsg/build/cmake/Modules/cotire.cmake --- mysql-workbench-6.3.6+dfsg/build/cmake/Modules/cotire.cmake 1970-01-01 00:00:00.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/build/cmake/Modules/cotire.cmake 2016-10-14 12:12:04.000000000 +0000 @@ -0,0 +1,3827 @@ +# - cotire (compile time reducer) +# +# See the cotire manual for usage hints. +# +#============================================================================= +# Copyright 2012-2015 Sascha Kratky +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +#============================================================================= + +if(__COTIRE_INCLUDED) + return() +endif() +set(__COTIRE_INCLUDED TRUE) + +# call cmake_minimum_required, but prevent modification of the CMake policy stack in include mode +# cmake_minimum_required also sets the policy version as a side effect, which we have to avoid +if (NOT CMAKE_SCRIPT_MODE_FILE) + cmake_policy(PUSH) +endif() +cmake_minimum_required(VERSION 2.8.12) +if (NOT CMAKE_SCRIPT_MODE_FILE) + cmake_policy(POP) +endif() + +set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}") +set (COTIRE_CMAKE_MODULE_VERSION "1.7.6") + +# activate select policies +if (POLICY CMP0025) + # Compiler id for Apple Clang is now AppleClang + cmake_policy(SET CMP0025 NEW) +endif() + +if (POLICY CMP0026) + # disallow use of the LOCATION target property + cmake_policy(SET CMP0026 NEW) +endif() + +if (POLICY CMP0038) + # targets may not link directly to themselves + cmake_policy(SET CMP0038 NEW) +endif() + +if (POLICY CMP0039) + # utility targets may not have link dependencies + cmake_policy(SET CMP0039 NEW) +endif() + +if (POLICY CMP0040) + # target in the TARGET signature of add_custom_command() must exist + cmake_policy(SET CMP0040 NEW) +endif() + +if (POLICY CMP0045) + # error on non-existent target in get_target_property + cmake_policy(SET CMP0045 NEW) +endif() + +if (POLICY CMP0046) + # error on non-existent dependency in add_dependencies + cmake_policy(SET CMP0046 NEW) +endif() + +if (POLICY CMP0049) + # do not expand variables in target source entries + cmake_policy(SET CMP0049 NEW) +endif() + +if (POLICY CMP0050) + # disallow add_custom_command SOURCE signatures + cmake_policy(SET CMP0050 NEW) +endif() + +if (POLICY CMP0051) + # include TARGET_OBJECTS expressions in a target's SOURCES property + cmake_policy(SET CMP0051 NEW) +endif() + +if (POLICY CMP0053) + # simplify variable reference and escape sequence evaluation + cmake_policy(SET CMP0053 NEW) +endif() + +if (POLICY CMP0054) + # only interpret if() arguments as variables or keywords when unquoted + cmake_policy(SET CMP0054 NEW) +endif() + +include(CMakeParseArguments) +include(ProcessorCount) + +function (cotire_get_configuration_types _configsVar) + set (_configs "") + if (CMAKE_CONFIGURATION_TYPES) + list (APPEND _configs ${CMAKE_CONFIGURATION_TYPES}) + endif() + if (CMAKE_BUILD_TYPE) + list (APPEND _configs "${CMAKE_BUILD_TYPE}") + endif() + if (_configs) + list (REMOVE_DUPLICATES _configs) + set (${_configsVar} ${_configs} PARENT_SCOPE) + else() + set (${_configsVar} "None" PARENT_SCOPE) + endif() +endfunction() + +function (cotire_get_source_file_extension _sourceFile _extVar) + # get_filename_component returns extension from first occurrence of . in file name + # this function computes the extension from last occurrence of . in file name + string (FIND "${_sourceFile}" "." _index REVERSE) + if (_index GREATER -1) + math (EXPR _index "${_index} + 1") + string (SUBSTRING "${_sourceFile}" ${_index} -1 _sourceExt) + else() + set (_sourceExt "") + endif() + set (${_extVar} "${_sourceExt}" PARENT_SCOPE) +endfunction() + +macro (cotire_check_is_path_relative_to _path _isRelativeVar) + set (${_isRelativeVar} FALSE) + if (IS_ABSOLUTE "${_path}") + foreach (_dir ${ARGN}) + file (RELATIVE_PATH _relPath "${_dir}" "${_path}") + if (NOT _relPath OR (NOT IS_ABSOLUTE "${_relPath}" AND NOT "${_relPath}" MATCHES "^\\.\\.")) + set (${_isRelativeVar} TRUE) + break() + endif() + endforeach() + endif() +endmacro() + +function (cotire_filter_language_source_files _language _target _sourceFilesVar _excludedSourceFilesVar _cotiredSourceFilesVar) + if (CMAKE_${_language}_SOURCE_FILE_EXTENSIONS) + set (_languageExtensions "${CMAKE_${_language}_SOURCE_FILE_EXTENSIONS}") + else() + set (_languageExtensions "") + endif() + if (CMAKE_${_language}_IGNORE_EXTENSIONS) + set (_ignoreExtensions "${CMAKE_${_language}_IGNORE_EXTENSIONS}") + else() + set (_ignoreExtensions "") + endif() + if (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS) + set (_excludeExtensions "${COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS}") + else() + set (_excludeExtensions "") + endif() + if (COTIRE_DEBUG AND _languageExtensions) + message (STATUS "${_language} source file extensions: ${_languageExtensions}") + endif() + if (COTIRE_DEBUG AND _ignoreExtensions) + message (STATUS "${_language} ignore extensions: ${_ignoreExtensions}") + endif() + if (COTIRE_DEBUG AND _excludeExtensions) + message (STATUS "${_language} exclude extensions: ${_excludeExtensions}") + endif() + if (CMAKE_VERSION VERSION_LESS "3.1.0") + set (_allSourceFiles ${ARGN}) + else() + # as of CMake 3.1 target sources may contain generator expressions + # since we cannot obtain required property information about source files added + # through generator expressions at configure time, we filter them out + string (GENEX_STRIP "${ARGN}" _allSourceFiles) + endif() + set (_filteredSourceFiles "") + set (_excludedSourceFiles "") + foreach (_sourceFile ${_allSourceFiles}) + get_source_file_property(_sourceIsHeaderOnly "${_sourceFile}" HEADER_FILE_ONLY) + get_source_file_property(_sourceIsExternal "${_sourceFile}" EXTERNAL_OBJECT) + get_source_file_property(_sourceIsSymbolic "${_sourceFile}" SYMBOLIC) + if (NOT _sourceIsHeaderOnly AND NOT _sourceIsExternal AND NOT _sourceIsSymbolic) + cotire_get_source_file_extension("${_sourceFile}" _sourceExt) + if (_sourceExt) + list (FIND _ignoreExtensions "${_sourceExt}" _ignoreIndex) + if (_ignoreIndex LESS 0) + list (FIND _excludeExtensions "${_sourceExt}" _excludeIndex) + if (_excludeIndex GREATER -1) + list (APPEND _excludedSourceFiles "${_sourceFile}") + else() + list (FIND _languageExtensions "${_sourceExt}" _sourceIndex) + if (_sourceIndex GREATER -1) + # consider source file unless it is excluded explicitly + get_source_file_property(_sourceIsExcluded "${_sourceFile}" COTIRE_EXCLUDED) + if (_sourceIsExcluded) + list (APPEND _excludedSourceFiles "${_sourceFile}") + else() + list (APPEND _filteredSourceFiles "${_sourceFile}") + endif() + else() + get_source_file_property(_sourceLanguage "${_sourceFile}" LANGUAGE) + if ("${_sourceLanguage}" STREQUAL "${_language}") + # add to excluded sources, if file is not ignored and has correct language without having the correct extension + list (APPEND _excludedSourceFiles "${_sourceFile}") + endif() + endif() + endif() + endif() + endif() + endif() + endforeach() + # separate filtered source files from already cotired ones + # the COTIRE_TARGET property of a source file may be set while a target is being processed by cotire + set (_sourceFiles "") + set (_cotiredSourceFiles "") + foreach (_sourceFile ${_filteredSourceFiles}) + get_source_file_property(_sourceIsCotired "${_sourceFile}" COTIRE_TARGET) + if (_sourceIsCotired) + list (APPEND _cotiredSourceFiles "${_sourceFile}") + else() + get_source_file_property(_sourceCompileFlags "${_sourceFile}" COMPILE_FLAGS) + if (_sourceCompileFlags) + # add to excluded sources, if file has custom compile flags + list (APPEND _excludedSourceFiles "${_sourceFile}") + else() + list (APPEND _sourceFiles "${_sourceFile}") + endif() + endif() + endforeach() + if (COTIRE_DEBUG) + if (_sourceFiles) + message (STATUS "Filtered ${_target} ${_language} sources: ${_sourceFiles}") + endif() + if (_excludedSourceFiles) + message (STATUS "Excluded ${_target} ${_language} sources: ${_excludedSourceFiles}") + endif() + if (_cotiredSourceFiles) + message (STATUS "Cotired ${_target} ${_language} sources: ${_cotiredSourceFiles}") + endif() + endif() + set (${_sourceFilesVar} ${_sourceFiles} PARENT_SCOPE) + set (${_excludedSourceFilesVar} ${_excludedSourceFiles} PARENT_SCOPE) + set (${_cotiredSourceFilesVar} ${_cotiredSourceFiles} PARENT_SCOPE) +endfunction() + +function (cotire_get_objects_with_property_on _filteredObjectsVar _property _type) + set (_filteredObjects "") + foreach (_object ${ARGN}) + get_property(_isSet ${_type} "${_object}" PROPERTY ${_property} SET) + if (_isSet) + get_property(_propertyValue ${_type} "${_object}" PROPERTY ${_property}) + if (_propertyValue) + list (APPEND _filteredObjects "${_object}") + endif() + endif() + endforeach() + set (${_filteredObjectsVar} ${_filteredObjects} PARENT_SCOPE) +endfunction() + +function (cotire_get_objects_with_property_off _filteredObjectsVar _property _type) + set (_filteredObjects "") + foreach (_object ${ARGN}) + get_property(_isSet ${_type} "${_object}" PROPERTY ${_property} SET) + if (_isSet) + get_property(_propertyValue ${_type} "${_object}" PROPERTY ${_property}) + if (NOT _propertyValue) + list (APPEND _filteredObjects "${_object}") + endif() + endif() + endforeach() + set (${_filteredObjectsVar} ${_filteredObjects} PARENT_SCOPE) +endfunction() + +function (cotire_get_source_file_property_values _valuesVar _property) + set (_values "") + foreach (_sourceFile ${ARGN}) + get_source_file_property(_propertyValue "${_sourceFile}" ${_property}) + if (_propertyValue) + list (APPEND _values "${_propertyValue}") + endif() + endforeach() + set (${_valuesVar} ${_values} PARENT_SCOPE) +endfunction() + +function (cotire_resolve_config_properites _configurations _propertiesVar) + set (_properties "") + foreach (_property ${ARGN}) + if ("${_property}" MATCHES "") + foreach (_config ${_configurations}) + string (TOUPPER "${_config}" _upperConfig) + string (REPLACE "" "${_upperConfig}" _configProperty "${_property}") + list (APPEND _properties ${_configProperty}) + endforeach() + else() + list (APPEND _properties ${_property}) + endif() + endforeach() + set (${_propertiesVar} ${_properties} PARENT_SCOPE) +endfunction() + +function (cotire_copy_set_properites _configurations _type _source _target) + cotire_resolve_config_properites("${_configurations}" _properties ${ARGN}) + foreach (_property ${_properties}) + get_property(_isSet ${_type} ${_source} PROPERTY ${_property} SET) + if (_isSet) + get_property(_propertyValue ${_type} ${_source} PROPERTY ${_property}) + set_property(${_type} ${_target} PROPERTY ${_property} "${_propertyValue}") + endif() + endforeach() +endfunction() + +function (cotire_get_target_usage_requirements _target _targetRequirementsVar) + set (_targetRequirements "") + get_target_property(_librariesToProcess ${_target} LINK_LIBRARIES) + while (_librariesToProcess) + # remove from head + list (GET _librariesToProcess 0 _library) + list (REMOVE_AT _librariesToProcess 0) + if (TARGET ${_library}) + list (FIND _targetRequirements ${_library} _index) + if (_index LESS 0) + list (APPEND _targetRequirements ${_library}) + # process transitive libraries + get_target_property(_libraries ${_library} INTERFACE_LINK_LIBRARIES) + if (_libraries) + list (APPEND _librariesToProcess ${_libraries}) + list (REMOVE_DUPLICATES _librariesToProcess) + endif() + endif() + endif() + endwhile() + set (${_targetRequirementsVar} ${_targetRequirements} PARENT_SCOPE) +endfunction() + +function (cotire_filter_compile_flags _language _flagFilter _matchedOptionsVar _unmatchedOptionsVar) + if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") + set (_flagPrefix "[/-]") + else() + set (_flagPrefix "--?") + endif() + set (_optionFlag "") + set (_matchedOptions "") + set (_unmatchedOptions "") + foreach (_compileFlag ${ARGN}) + if (_compileFlag) + if (_optionFlag AND NOT "${_compileFlag}" MATCHES "^${_flagPrefix}") + # option with separate argument + list (APPEND _matchedOptions "${_compileFlag}") + set (_optionFlag "") + elseif ("${_compileFlag}" MATCHES "^(${_flagPrefix})(${_flagFilter})$") + # remember option + set (_optionFlag "${CMAKE_MATCH_2}") + elseif ("${_compileFlag}" MATCHES "^(${_flagPrefix})(${_flagFilter})(.+)$") + # option with joined argument + list (APPEND _matchedOptions "${CMAKE_MATCH_3}") + set (_optionFlag "") + else() + # flush remembered option + if (_optionFlag) + list (APPEND _matchedOptions "${_optionFlag}") + set (_optionFlag "") + endif() + # add to unfiltered options + list (APPEND _unmatchedOptions "${_compileFlag}") + endif() + endif() + endforeach() + if (_optionFlag) + list (APPEND _matchedOptions "${_optionFlag}") + endif() + if (COTIRE_DEBUG AND _matchedOptions) + message (STATUS "Filter ${_flagFilter} matched: ${_matchedOptions}") + endif() + if (COTIRE_DEBUG AND _unmatchedOptions) + message (STATUS "Filter ${_flagFilter} unmatched: ${_unmatchedOptions}") + endif() + set (${_matchedOptionsVar} ${_matchedOptions} PARENT_SCOPE) + set (${_unmatchedOptionsVar} ${_unmatchedOptions} PARENT_SCOPE) +endfunction() + +function (cotire_get_target_compile_flags _config _language _target _flagsVar) + string (TOUPPER "${_config}" _upperConfig) + # collect options from CMake language variables + set (_compileFlags "") + if (CMAKE_${_language}_FLAGS) + set (_compileFlags "${_compileFlags} ${CMAKE_${_language}_FLAGS}") + endif() + if (CMAKE_${_language}_FLAGS_${_upperConfig}) + set (_compileFlags "${_compileFlags} ${CMAKE_${_language}_FLAGS_${_upperConfig}}") + endif() + if (_target) + # add target compile flags + get_target_property(_targetflags ${_target} COMPILE_FLAGS) + if (_targetflags) + set (_compileFlags "${_compileFlags} ${_targetflags}") + endif() + endif() + if (UNIX) + separate_arguments(_compileFlags UNIX_COMMAND "${_compileFlags}") + elseif(WIN32) + separate_arguments(_compileFlags WINDOWS_COMMAND "${_compileFlags}") + else() + separate_arguments(_compileFlags) + endif() + # target compile options + if (_target) + get_target_property(_targetOptions ${_target} COMPILE_OPTIONS) + if (_targetOptions) + list (APPEND _compileFlags ${_targetOptions}) + endif() + endif() + # interface compile options from linked library targets + if (_target) + set (_linkedTargets "") + cotire_get_target_usage_requirements(${_target} _linkedTargets) + foreach (_linkedTarget ${_linkedTargets}) + get_target_property(_targetOptions ${_linkedTarget} INTERFACE_COMPILE_OPTIONS) + if (_targetOptions) + list (APPEND _compileFlags ${_targetOptions}) + endif() + endforeach() + endif() + # handle language standard properties + if (_target) + get_target_property(_targetLanguageStandard ${_target} ${_language}_STANDARD) + get_target_property(_targetLanguageExtensions ${_target} ${_language}_EXTENSIONS) + get_target_property(_targetLanguageStandardRequired ${_target} ${_language}_STANDARD_REQUIRED) + if (_targetLanguageExtensions) + if (CMAKE_${_language}${_targetLanguageExtensions}_EXTENSION_COMPILE_OPTION) + list (APPEND _compileFlags "${CMAKE_${_language}${_targetLanguageExtensions}_EXTENSION_COMPILE_OPTION}") + endif() + elseif (_targetLanguageStandard) + if (_targetLanguageStandardRequired) + if (CMAKE_${_language}${_targetLanguageStandard}_STANDARD_COMPILE_OPTION) + list (APPEND _compileFlags "${CMAKE_${_language}${_targetLanguageStandard}_STANDARD_COMPILE_OPTION}") + endif() + else() + if (CMAKE_${_language}${_targetLanguageStandard}_EXTENSION_COMPILE_OPTION) + list (APPEND _compileFlags "${CMAKE_${_language}${_targetLanguageStandard}_EXTENSION_COMPILE_OPTION}") + endif() + endif() + endif() + endif() + # handle the POSITION_INDEPENDENT_CODE target property + if (_target) + get_target_property(_targetPIC ${_target} POSITION_INDEPENDENT_CODE) + if (_targetPIC) + get_target_property(_targetType ${_target} TYPE) + if (_targetType STREQUAL "EXECUTABLE" AND CMAKE_${_language}_COMPILE_OPTIONS_PIE) + list (APPEND _compileFlags "${CMAKE_${_language}_COMPILE_OPTIONS_PIE}") + elseif (CMAKE_${_language}_COMPILE_OPTIONS_PIC) + list (APPEND _compileFlags "${CMAKE_${_language}_COMPILE_OPTIONS_PIC}") + endif() + endif() + endif() + # handle visibility target properties + if (_target) + get_target_property(_targetVisibility ${_target} ${_language}_VISIBILITY_PRESET) + if (_targetVisibility AND CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY) + list (APPEND _compileFlags "${CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY}${_targetVisibility}") + endif() + get_target_property(_targetVisibilityInlines ${_target} VISIBILITY_INLINES_HIDDEN) + if (_targetVisibilityInlines AND CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN) + list (APPEND _compileFlags "${CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN}") + endif() + endif() + # platform specific flags + if (APPLE) + get_target_property(_architectures ${_target} OSX_ARCHITECTURES_${_upperConfig}) + if (NOT _architectures) + get_target_property(_architectures ${_target} OSX_ARCHITECTURES) + endif() + if (_architectures) + foreach (_arch ${_architectures}) + list (APPEND _compileFlags "-arch" "${_arch}") + endforeach() + endif() + if (CMAKE_OSX_SYSROOT) + if (CMAKE_${_language}_SYSROOT_FLAG) + list (APPEND _compileFlags "${CMAKE_${_language}_SYSROOT_FLAG}" "${CMAKE_OSX_SYSROOT}") + else() + list (APPEND _compileFlags "-isysroot" "${CMAKE_OSX_SYSROOT}") + endif() + endif() + if (CMAKE_OSX_DEPLOYMENT_TARGET) + if (CMAKE_${_language}_OSX_DEPLOYMENT_TARGET_FLAG) + list (APPEND _compileFlags "${CMAKE_${_language}_OSX_DEPLOYMENT_TARGET_FLAG}${CMAKE_OSX_DEPLOYMENT_TARGET}") + else() + list (APPEND _compileFlags "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}") + endif() + endif() + endif() + if (COTIRE_DEBUG AND _compileFlags) + message (STATUS "Target ${_target} compile flags: ${_compileFlags}") + endif() + set (${_flagsVar} ${_compileFlags} PARENT_SCOPE) +endfunction() + +function (cotire_get_target_include_directories _config _language _target _includeDirsVar _systemIncludeDirsVar) + set (_includeDirs "") + set (_systemIncludeDirs "") + # default include dirs + if (CMAKE_INCLUDE_CURRENT_DIR) + list (APPEND _includeDirs "${CMAKE_CURRENT_BINARY_DIR}") + list (APPEND _includeDirs "${CMAKE_CURRENT_SOURCE_DIR}") + endif() + set (_targetFlags "") + cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags) + # parse additional include directories from target compile flags + if (CMAKE_INCLUDE_FLAG_${_language}) + string (STRIP "${CMAKE_INCLUDE_FLAG_${_language}}" _includeFlag) + string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") + if (_includeFlag) + set (_dirs "") + cotire_filter_compile_flags("${_language}" "${_includeFlag}" _dirs _ignore ${_targetFlags}) + if (_dirs) + list (APPEND _includeDirs ${_dirs}) + endif() + endif() + endif() + # parse additional system include directories from target compile flags + if (CMAKE_INCLUDE_SYSTEM_FLAG_${_language}) + string (STRIP "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" _includeFlag) + string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") + if (_includeFlag) + set (_dirs "") + cotire_filter_compile_flags("${_language}" "${_includeFlag}" _dirs _ignore ${_targetFlags}) + if (_dirs) + list (APPEND _systemIncludeDirs ${_dirs}) + endif() + endif() + endif() + # target include directories + get_directory_property(_dirs DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" INCLUDE_DIRECTORIES) + if (_target) + get_target_property(_targetDirs ${_target} INCLUDE_DIRECTORIES) + if (_targetDirs) + list (APPEND _dirs ${_targetDirs}) + endif() + get_target_property(_targetDirs ${_target} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES) + if (_targetDirs) + list (APPEND _systemIncludeDirs ${_targetDirs}) + endif() + endif() + # interface include directories from linked library targets + if (_target) + set (_linkedTargets "") + cotire_get_target_usage_requirements(${_target} _linkedTargets) + foreach (_linkedTarget ${_linkedTargets}) + get_target_property(_targetDirs ${_linkedTarget} INTERFACE_INCLUDE_DIRECTORIES) + if (_targetDirs) + list (APPEND _dirs ${_targetDirs}) + endif() + get_target_property(_targetDirs ${_linkedTarget} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES) + if (_targetDirs) + list (APPEND _systemIncludeDirs ${_targetDirs}) + endif() + endforeach() + endif() + if (dirs) + list (REMOVE_DUPLICATES _dirs) + endif() + list (LENGTH _includeDirs _projectInsertIndex) + foreach (_dir ${_dirs}) + if (CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE) + cotire_check_is_path_relative_to("${_dir}" _isRelative "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}") + if (_isRelative) + list (LENGTH _includeDirs _len) + if (_len EQUAL _projectInsertIndex) + list (APPEND _includeDirs "${_dir}") + else() + list (INSERT _includeDirs _projectInsertIndex "${_dir}") + endif() + math (EXPR _projectInsertIndex "${_projectInsertIndex} + 1") + else() + list (APPEND _includeDirs "${_dir}") + endif() + else() + list (APPEND _includeDirs "${_dir}") + endif() + endforeach() + list (REMOVE_DUPLICATES _includeDirs) + list (REMOVE_DUPLICATES _systemIncludeDirs) + if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES) + list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES}) + endif() + if (COTIRE_DEBUG AND _includeDirs) + message (STATUS "Target ${_target} include dirs: ${_includeDirs}") + endif() + set (${_includeDirsVar} ${_includeDirs} PARENT_SCOPE) + if (COTIRE_DEBUG AND _systemIncludeDirs) + message (STATUS "Target ${_target} system include dirs: ${_systemIncludeDirs}") + endif() + set (${_systemIncludeDirsVar} ${_systemIncludeDirs} PARENT_SCOPE) +endfunction() + +function (cotire_get_target_export_symbol _target _exportSymbolVar) + set (_exportSymbol "") + get_target_property(_targetType ${_target} TYPE) + get_target_property(_enableExports ${_target} ENABLE_EXPORTS) + if (_targetType MATCHES "(SHARED|MODULE)_LIBRARY" OR + (_targetType STREQUAL "EXECUTABLE" AND _enableExports)) + get_target_property(_exportSymbol ${_target} DEFINE_SYMBOL) + if (NOT _exportSymbol) + set (_exportSymbol "${_target}_EXPORTS") + endif() + string (MAKE_C_IDENTIFIER "${_exportSymbol}" _exportSymbol) + endif() + set (${_exportSymbolVar} ${_exportSymbol} PARENT_SCOPE) +endfunction() + +function (cotire_get_target_compile_definitions _config _language _target _definitionsVar) + string (TOUPPER "${_config}" _upperConfig) + set (_configDefinitions "") + # CMAKE_INTDIR for multi-configuration build systems + if (NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".") + list (APPEND _configDefinitions "CMAKE_INTDIR=\"${_config}\"") + endif() + # target export define symbol + cotire_get_target_export_symbol("${_target}" _defineSymbol) + if (_defineSymbol) + list (APPEND _configDefinitions "${_defineSymbol}") + endif() + # directory compile definitions + get_directory_property(_definitions DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMPILE_DEFINITIONS) + if (_definitions) + list (APPEND _configDefinitions ${_definitions}) + endif() + get_directory_property(_definitions DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMPILE_DEFINITIONS_${_upperConfig}) + if (_definitions) + list (APPEND _configDefinitions ${_definitions}) + endif() + # target compile definitions + get_target_property(_definitions ${_target} COMPILE_DEFINITIONS) + if (_definitions) + list (APPEND _configDefinitions ${_definitions}) + endif() + get_target_property(_definitions ${_target} COMPILE_DEFINITIONS_${_upperConfig}) + if (_definitions) + list (APPEND _configDefinitions ${_definitions}) + endif() + # interface compile definitions from linked library targets + set (_linkedTargets "") + cotire_get_target_usage_requirements(${_target} _linkedTargets) + foreach (_linkedTarget ${_linkedTargets}) + get_target_property(_definitions ${_linkedTarget} INTERFACE_COMPILE_DEFINITIONS) + if (_definitions) + list (APPEND _configDefinitions ${_definitions}) + endif() + endforeach() + # parse additional compile definitions from target compile flags + # and don't look at directory compile definitions, which we already handled + set (_targetFlags "") + cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags) + cotire_filter_compile_flags("${_language}" "D" _definitions _ignore ${_targetFlags}) + if (_definitions) + list (APPEND _configDefinitions ${_definitions}) + endif() + list (REMOVE_DUPLICATES _configDefinitions) + if (COTIRE_DEBUG AND _configDefinitions) + message (STATUS "Target ${_target} compile definitions: ${_configDefinitions}") + endif() + set (${_definitionsVar} ${_configDefinitions} PARENT_SCOPE) +endfunction() + +function (cotire_get_target_compiler_flags _config _language _target _compilerFlagsVar) + # parse target compile flags omitting compile definitions and include directives + set (_targetFlags "") + cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags) + set (_flagFilter "D") + if (CMAKE_INCLUDE_FLAG_${_language}) + string (STRIP "${CMAKE_INCLUDE_FLAG_${_language}}" _includeFlag) + string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") + if (_includeFlag) + set (_flagFilter "${_flagFilter}|${_includeFlag}") + endif() + endif() + if (CMAKE_INCLUDE_SYSTEM_FLAG_${_language}) + string (STRIP "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" _includeFlag) + string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") + if (_includeFlag) + set (_flagFilter "${_flagFilter}|${_includeFlag}") + endif() + endif() + set (_compilerFlags "") + cotire_filter_compile_flags("${_language}" "${_flagFilter}" _ignore _compilerFlags ${_targetFlags}) + if (COTIRE_DEBUG AND _compilerFlags) + message (STATUS "Target ${_target} compiler flags: ${_compilerFlags}") + endif() + set (${_compilerFlagsVar} ${_compilerFlags} PARENT_SCOPE) +endfunction() + +function (cotire_add_sys_root_paths _pathsVar) + if (APPLE) + if (CMAKE_OSX_SYSROOT AND CMAKE_${_language}_HAS_ISYSROOT) + foreach (_path IN LISTS ${_pathsVar}) + if (IS_ABSOLUTE "${_path}") + get_filename_component(_path "${CMAKE_OSX_SYSROOT}/${_path}" ABSOLUTE) + if (EXISTS "${_path}") + list (APPEND ${_pathsVar} "${_path}") + endif() + endif() + endforeach() + endif() + endif() + set (${_pathsVar} ${${_pathsVar}} PARENT_SCOPE) +endfunction() + +function (cotire_get_source_extra_properties _sourceFile _pattern _resultVar) + set (_extraProperties ${ARGN}) + set (_result "") + if (_extraProperties) + list (FIND _extraProperties "${_sourceFile}" _index) + if (_index GREATER -1) + math (EXPR _index "${_index} + 1") + list (LENGTH _extraProperties _len) + math (EXPR _len "${_len} - 1") + foreach (_index RANGE ${_index} ${_len}) + list (GET _extraProperties ${_index} _value) + if (_value MATCHES "${_pattern}") + list (APPEND _result "${_value}") + else() + break() + endif() + endforeach() + endif() + endif() + set (${_resultVar} ${_result} PARENT_SCOPE) +endfunction() + +function (cotire_get_source_compile_definitions _config _language _sourceFile _definitionsVar) + set (_compileDefinitions "") + if (NOT CMAKE_SCRIPT_MODE_FILE) + string (TOUPPER "${_config}" _upperConfig) + get_source_file_property(_definitions "${_sourceFile}" COMPILE_DEFINITIONS) + if (_definitions) + list (APPEND _compileDefinitions ${_definitions}) + endif() + get_source_file_property(_definitions "${_sourceFile}" COMPILE_DEFINITIONS_${_upperConfig}) + if (_definitions) + list (APPEND _compileDefinitions ${_definitions}) + endif() + endif() + cotire_get_source_extra_properties("${_sourceFile}" "^[a-zA-Z0-9_]+(=.*)?$" _definitions ${ARGN}) + if (_definitions) + list (APPEND _compileDefinitions ${_definitions}) + endif() + if (COTIRE_DEBUG AND _compileDefinitions) + message (STATUS "Source ${_sourceFile} compile definitions: ${_compileDefinitions}") + endif() + set (${_definitionsVar} ${_compileDefinitions} PARENT_SCOPE) +endfunction() + +function (cotire_get_source_files_compile_definitions _config _language _definitionsVar) + set (_configDefinitions "") + foreach (_sourceFile ${ARGN}) + cotire_get_source_compile_definitions("${_config}" "${_language}" "${_sourceFile}" _sourceDefinitions) + if (_sourceDefinitions) + list (APPEND _configDefinitions "${_sourceFile}" ${_sourceDefinitions} "-") + endif() + endforeach() + set (${_definitionsVar} ${_configDefinitions} PARENT_SCOPE) +endfunction() + +function (cotire_get_source_undefs _sourceFile _property _sourceUndefsVar) + set (_sourceUndefs "") + if (NOT CMAKE_SCRIPT_MODE_FILE) + get_source_file_property(_undefs "${_sourceFile}" ${_property}) + if (_undefs) + list (APPEND _sourceUndefs ${_undefs}) + endif() + endif() + cotire_get_source_extra_properties("${_sourceFile}" "^[a-zA-Z0-9_]+$" _undefs ${ARGN}) + if (_undefs) + list (APPEND _sourceUndefs ${_undefs}) + endif() + if (COTIRE_DEBUG AND _sourceUndefs) + message (STATUS "Source ${_sourceFile} ${_property} undefs: ${_sourceUndefs}") + endif() + set (${_sourceUndefsVar} ${_sourceUndefs} PARENT_SCOPE) +endfunction() + +function (cotire_get_source_files_undefs _property _sourceUndefsVar) + set (_sourceUndefs "") + foreach (_sourceFile ${ARGN}) + cotire_get_source_undefs("${_sourceFile}" ${_property} _undefs) + if (_undefs) + list (APPEND _sourceUndefs "${_sourceFile}" ${_undefs} "-") + endif() + endforeach() + set (${_sourceUndefsVar} ${_sourceUndefs} PARENT_SCOPE) +endfunction() + +macro (cotire_set_cmd_to_prologue _cmdVar) + set (${_cmdVar} "${CMAKE_COMMAND}") + if (COTIRE_DEBUG) + list (APPEND ${_cmdVar} "--warn-uninitialized") + endif() + list (APPEND ${_cmdVar} "-DCOTIRE_BUILD_TYPE:STRING=$") + if (COTIRE_VERBOSE) + list (APPEND ${_cmdVar} "-DCOTIRE_VERBOSE:BOOL=ON") + elseif("${CMAKE_GENERATOR}" MATCHES "Makefiles") + list (APPEND ${_cmdVar} "-DCOTIRE_VERBOSE:BOOL=$(VERBOSE)") + endif() +endmacro() + +function (cotire_init_compile_cmd _cmdVar _language _compilerExe _compilerArg1) + if (NOT _compilerExe) + set (_compilerExe "${CMAKE_${_language}_COMPILER}") + endif() + if (NOT _compilerArg1) + set (_compilerArg1 ${CMAKE_${_language}_COMPILER_ARG1}) + endif() + string (STRIP "${_compilerArg1}" _compilerArg1) + set (${_cmdVar} "${_compilerExe}" ${_compilerArg1} PARENT_SCOPE) +endfunction() + +macro (cotire_add_definitions_to_cmd _cmdVar _language) + foreach (_definition ${ARGN}) + if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") + list (APPEND ${_cmdVar} "/D${_definition}") + else() + list (APPEND ${_cmdVar} "-D${_definition}") + endif() + endforeach() +endmacro() + +function (cotire_add_includes_to_cmd _cmdVar _language _includesVar _systemIncludesVar) + set (_includeDirs ${${_includesVar}} ${${_systemIncludesVar}}) + if (_includeDirs) + list (REMOVE_DUPLICATES _includeDirs) + foreach (_include ${_includeDirs}) + if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") + file (TO_NATIVE_PATH "${_include}" _include) + list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_${_language}_SEP}${_include}") + else() + set (_index -1) + if ("${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" MATCHES ".+") + list (FIND ${_systemIncludesVar} "${_include}" _index) + endif() + if (_index GREATER -1) + list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${_include}") + else() + list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_${_language}_SEP}${_include}") + endif() + endif() + endforeach() + endif() + set (${_cmdVar} ${${_cmdVar}} PARENT_SCOPE) +endfunction() + +function (cotire_add_frameworks_to_cmd _cmdVar _language _includesVar _systemIncludesVar) + if (APPLE) + set (_frameworkDirs "") + foreach (_include ${${_includesVar}}) + if (IS_ABSOLUTE "${_include}" AND _include MATCHES "\\.framework$") + get_filename_component(_frameworkDir "${_include}" DIRECTORY) + list (APPEND _frameworkDirs "${_frameworkDir}") + endif() + endforeach() + set (_systemFrameworkDirs "") + foreach (_include ${${_systemIncludesVar}}) + if (IS_ABSOLUTE "${_include}" AND _include MATCHES "\\.framework$") + get_filename_component(_frameworkDir "${_include}" DIRECTORY) + list (APPEND _systemFrameworkDirs "${_frameworkDir}") + endif() + endforeach() + if (_systemFrameworkDirs) + list (APPEND _frameworkDirs ${_systemFrameworkDirs}) + endif() + if (_frameworkDirs) + list (REMOVE_DUPLICATES _frameworkDirs) + foreach (_frameworkDir ${_frameworkDirs}) + set (_index -1) + if ("${CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG}" MATCHES ".+") + list (FIND _systemFrameworkDirs "${_frameworkDir}" _index) + endif() + if (_index GREATER -1) + list (APPEND ${_cmdVar} "${CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG}${_frameworkDir}") + else() + list (APPEND ${_cmdVar} "${CMAKE_${_language}_FRAMEWORK_SEARCH_FLAG}${_frameworkDir}") + endif() + endforeach() + endif() + endif() + set (${_cmdVar} ${${_cmdVar}} PARENT_SCOPE) +endfunction() + +macro (cotire_add_compile_flags_to_cmd _cmdVar) + foreach (_flag ${ARGN}) + list (APPEND ${_cmdVar} "${_flag}") + endforeach() +endmacro() + +function (cotire_check_file_up_to_date _fileIsUpToDateVar _file) + if (EXISTS "${_file}") + set (_triggerFile "") + foreach (_dependencyFile ${ARGN}) + if (EXISTS "${_dependencyFile}") + # IS_NEWER_THAN returns TRUE if both files have the same timestamp + # thus we do the comparison in both directions to exclude ties + if ("${_dependencyFile}" IS_NEWER_THAN "${_file}" AND + NOT "${_file}" IS_NEWER_THAN "${_dependencyFile}") + set (_triggerFile "${_dependencyFile}") + break() + endif() + endif() + endforeach() + if (_triggerFile) + if (COTIRE_VERBOSE) + get_filename_component(_fileName "${_file}" NAME) + message (STATUS "${_fileName} update triggered by ${_triggerFile} change.") + endif() + set (${_fileIsUpToDateVar} FALSE PARENT_SCOPE) + else() + if (COTIRE_VERBOSE) + get_filename_component(_fileName "${_file}" NAME) + message (STATUS "${_fileName} is up-to-date.") + endif() + set (${_fileIsUpToDateVar} TRUE PARENT_SCOPE) + endif() + else() + if (COTIRE_VERBOSE) + get_filename_component(_fileName "${_file}" NAME) + message (STATUS "${_fileName} does not exist yet.") + endif() + set (${_fileIsUpToDateVar} FALSE PARENT_SCOPE) + endif() +endfunction() + +macro (cotire_find_closest_relative_path _headerFile _includeDirs _relPathVar) + set (${_relPathVar} "") + foreach (_includeDir ${_includeDirs}) + if (IS_DIRECTORY "${_includeDir}") + file (RELATIVE_PATH _relPath "${_includeDir}" "${_headerFile}") + if (NOT IS_ABSOLUTE "${_relPath}" AND NOT "${_relPath}" MATCHES "^\\.\\.") + string (LENGTH "${${_relPathVar}}" _closestLen) + string (LENGTH "${_relPath}" _relLen) + if (_closestLen EQUAL 0 OR _relLen LESS _closestLen) + set (${_relPathVar} "${_relPath}") + endif() + endif() + elseif ("${_includeDir}" STREQUAL "${_headerFile}") + # if path matches exactly, return short non-empty string + set (${_relPathVar} "1") + break() + endif() + endforeach() +endmacro() + +macro (cotire_check_header_file_location _headerFile _insideIncludeDirs _outsideIncludeDirs _headerIsInside) + # check header path against ignored and honored include directories + cotire_find_closest_relative_path("${_headerFile}" "${_insideIncludeDirs}" _insideRelPath) + if (_insideRelPath) + # header is inside, but could be become outside if there is a shorter outside match + cotire_find_closest_relative_path("${_headerFile}" "${_outsideIncludeDirs}" _outsideRelPath) + if (_outsideRelPath) + string (LENGTH "${_insideRelPath}" _insideRelPathLen) + string (LENGTH "${_outsideRelPath}" _outsideRelPathLen) + if (_outsideRelPathLen LESS _insideRelPathLen) + set (${_headerIsInside} FALSE) + else() + set (${_headerIsInside} TRUE) + endif() + else() + set (${_headerIsInside} TRUE) + endif() + else() + # header is outside + set (${_headerIsInside} FALSE) + endif() +endmacro() + +macro (cotire_check_ignore_header_file_path _headerFile _headerIsIgnoredVar) + if (NOT EXISTS "${_headerFile}") + set (${_headerIsIgnoredVar} TRUE) + elseif (IS_DIRECTORY "${_headerFile}") + set (${_headerIsIgnoredVar} TRUE) + elseif ("${_headerFile}" MATCHES "\\.\\.|[_-]fixed" AND "${_headerFile}" MATCHES "\\.h$") + # heuristic: ignore C headers with embedded parent directory references or "-fixed" or "_fixed" in path + # these often stem from using GCC #include_next tricks, which may break the precompiled header compilation + # with the error message "error: no include path in which to search for header.h" + set (${_headerIsIgnoredVar} TRUE) + else() + set (${_headerIsIgnoredVar} FALSE) + endif() +endmacro() + +macro (cotire_check_ignore_header_file_ext _headerFile _ignoreExtensionsVar _headerIsIgnoredVar) + # check header file extension + cotire_get_source_file_extension("${_headerFile}" _headerFileExt) + set (${_headerIsIgnoredVar} FALSE) + if (_headerFileExt) + list (FIND ${_ignoreExtensionsVar} "${_headerFileExt}" _index) + if (_index GREATER -1) + set (${_headerIsIgnoredVar} TRUE) + endif() + endif() +endmacro() + +macro (cotire_parse_line _line _headerFileVar _headerDepthVar) + if (MSVC) + # cl.exe /showIncludes output looks different depending on the language pack used, e.g.: + # English: "Note: including file: C:\directory\file" + # German: "Hinweis: Einlesen der Datei: C:\directory\file" + # We use a very general regular expression, relying on the presence of the : characters + if (_line MATCHES "( +)([a-zA-Z]:[^:]+)$") + # Visual Studio compiler output + string (LENGTH "${CMAKE_MATCH_1}" ${_headerDepthVar}) + get_filename_component(${_headerFileVar} "${CMAKE_MATCH_2}" ABSOLUTE) + else() + set (${_headerFileVar} "") + set (${_headerDepthVar} 0) + endif() + else() + if (_line MATCHES "^(\\.+) (.*)$") + # GCC like output + string (LENGTH "${CMAKE_MATCH_1}" ${_headerDepthVar}) + if (IS_ABSOLUTE "${CMAKE_MATCH_2}") + set (${_headerFileVar} "${CMAKE_MATCH_2}") + else() + get_filename_component(${_headerFileVar} "${CMAKE_MATCH_2}" REALPATH) + endif() + else() + set (${_headerFileVar} "") + set (${_headerDepthVar} 0) + endif() + endif() +endmacro() + +function (cotire_parse_includes _language _scanOutput _ignoredIncludeDirs _honoredIncludeDirs _ignoredExtensions _selectedIncludesVar _unparsedLinesVar) + if (WIN32) + # prevent CMake macro invocation errors due to backslash characters in Windows paths + string (REPLACE "\\" "/" _scanOutput "${_scanOutput}") + endif() + # canonize slashes + string (REPLACE "//" "/" _scanOutput "${_scanOutput}") + # prevent semicolon from being interpreted as a line separator + string (REPLACE ";" "\\;" _scanOutput "${_scanOutput}") + # then separate lines + string (REGEX REPLACE "\n" ";" _scanOutput "${_scanOutput}") + list (LENGTH _scanOutput _len) + # remove duplicate lines to speed up parsing + list (REMOVE_DUPLICATES _scanOutput) + list (LENGTH _scanOutput _uniqueLen) + if (COTIRE_VERBOSE OR COTIRE_DEBUG) + message (STATUS "Scanning ${_uniqueLen} unique lines of ${_len} for includes") + if (_ignoredExtensions) + message (STATUS "Ignored extensions: ${_ignoredExtensions}") + endif() + if (_ignoredIncludeDirs) + message (STATUS "Ignored paths: ${_ignoredIncludeDirs}") + endif() + if (_honoredIncludeDirs) + message (STATUS "Included paths: ${_honoredIncludeDirs}") + endif() + endif() + set (_sourceFiles ${ARGN}) + set (_selectedIncludes "") + set (_unparsedLines "") + # stack keeps track of inside/outside project status of processed header files + set (_headerIsInsideStack "") + foreach (_line IN LISTS _scanOutput) + if (_line) + cotire_parse_line("${_line}" _headerFile _headerDepth) + if (_headerFile) + cotire_check_header_file_location("${_headerFile}" "${_ignoredIncludeDirs}" "${_honoredIncludeDirs}" _headerIsInside) + if (COTIRE_DEBUG) + message (STATUS "${_headerDepth}: ${_headerFile} ${_headerIsInside}") + endif() + # update stack + list (LENGTH _headerIsInsideStack _stackLen) + if (_headerDepth GREATER _stackLen) + math (EXPR _stackLen "${_stackLen} + 1") + foreach (_index RANGE ${_stackLen} ${_headerDepth}) + list (APPEND _headerIsInsideStack ${_headerIsInside}) + endforeach() + else() + foreach (_index RANGE ${_headerDepth} ${_stackLen}) + list (REMOVE_AT _headerIsInsideStack -1) + endforeach() + list (APPEND _headerIsInsideStack ${_headerIsInside}) + endif() + if (COTIRE_DEBUG) + message (STATUS "${_headerIsInsideStack}") + endif() + # header is a candidate if it is outside project + if (NOT _headerIsInside) + # get parent header file's inside/outside status + if (_headerDepth GREATER 1) + math (EXPR _index "${_headerDepth} - 2") + list (GET _headerIsInsideStack ${_index} _parentHeaderIsInside) + else() + set (_parentHeaderIsInside TRUE) + endif() + # select header file if parent header file is inside project + # (e.g., a project header file that includes a standard header file) + if (_parentHeaderIsInside) + cotire_check_ignore_header_file_path("${_headerFile}" _headerIsIgnored) + if (NOT _headerIsIgnored) + cotire_check_ignore_header_file_ext("${_headerFile}" _ignoredExtensions _headerIsIgnored) + if (NOT _headerIsIgnored) + list (APPEND _selectedIncludes "${_headerFile}") + else() + # fix header's inside status on stack, it is ignored by extension now + list (REMOVE_AT _headerIsInsideStack -1) + list (APPEND _headerIsInsideStack TRUE) + endif() + endif() + if (COTIRE_DEBUG) + message (STATUS "${_headerFile} ${_ignoredExtensions} ${_headerIsIgnored}") + endif() + endif() + endif() + else() + if (MSVC) + # for cl.exe do not keep unparsed lines which solely consist of a source file name + string (FIND "${_sourceFiles}" "${_line}" _index) + if (_index LESS 0) + list (APPEND _unparsedLines "${_line}") + endif() + else() + list (APPEND _unparsedLines "${_line}") + endif() + endif() + endif() + endforeach() + list (REMOVE_DUPLICATES _selectedIncludes) + set (${_selectedIncludesVar} ${_selectedIncludes} PARENT_SCOPE) + set (${_unparsedLinesVar} ${_unparsedLines} PARENT_SCOPE) +endfunction() + +function (cotire_scan_includes _includesVar) + set(_options "") + set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_VERSION LANGUAGE UNPARSED_LINES) + set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES + IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH) + cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) + set (_sourceFiles ${_option_UNPARSED_ARGUMENTS}) + if (NOT _option_LANGUAGE) + set (_option_LANGUAGE "CXX") + endif() + if (NOT _option_COMPILER_ID) + set (_option_COMPILER_ID "${CMAKE_${_option_LANGUAGE}_ID}") + endif() + if (NOT _option_COMPILER_VERSION) + set (_option_COMPILER_VERSION "${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}") + endif() + cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}") + cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS}) + cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS}) + cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) + cotire_add_frameworks_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) + cotire_add_makedep_flags("${_option_LANGUAGE}" "${_option_COMPILER_ID}" "${_option_COMPILER_VERSION}" _cmd) + # only consider existing source files for scanning + set (_existingSourceFiles "") + foreach (_sourceFile ${_sourceFiles}) + if (EXISTS "${_sourceFile}") + list (APPEND _existingSourceFiles "${_sourceFile}") + endif() + endforeach() + if (NOT _existingSourceFiles) + set (${_includesVar} "" PARENT_SCOPE) + return() + endif() + list (APPEND _cmd ${_existingSourceFiles}) + if (COTIRE_VERBOSE) + message (STATUS "execute_process: ${_cmd}") + endif() + if (_option_COMPILER_ID MATCHES "MSVC") + # cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared + unset (ENV{VS_UNICODE_OUTPUT}) + endif() + execute_process( + COMMAND ${_cmd} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + RESULT_VARIABLE _result + OUTPUT_QUIET + ERROR_VARIABLE _output) + if (_result) + message (STATUS "Result ${_result} scanning includes of ${_existingSourceFiles}.") + endif() + cotire_parse_includes( + "${_option_LANGUAGE}" "${_output}" + "${_option_IGNORE_PATH}" "${_option_INCLUDE_PATH}" + "${_option_IGNORE_EXTENSIONS}" + _includes _unparsedLines + ${_sourceFiles}) + if (_option_INCLUDE_PRIORITY_PATH) + set (_sortedIncludes "") + foreach (_priorityPath ${_option_INCLUDE_PRIORITY_PATH}) + foreach (_include ${_includes}) + string (FIND ${_include} ${_priorityPath} _position) + if (_position GREATER -1) + list (APPEND _sortedIncludes ${_include}) + endif() + endforeach() + endforeach() + if (_sortedIncludes) + list (INSERT _includes 0 ${_sortedIncludes}) + list (REMOVE_DUPLICATES _includes) + endif() + endif() + set (${_includesVar} ${_includes} PARENT_SCOPE) + if (_option_UNPARSED_LINES) + set (${_option_UNPARSED_LINES} ${_unparsedLines} PARENT_SCOPE) + endif() +endfunction() + +macro (cotire_append_undefs _contentsVar) + set (_undefs ${ARGN}) + if (_undefs) + list (REMOVE_DUPLICATES _undefs) + foreach (_definition ${_undefs}) + list (APPEND ${_contentsVar} "#undef ${_definition}") + endforeach() + endif() +endmacro() + +macro (cotire_comment_str _language _commentText _commentVar) + if ("${_language}" STREQUAL "CMAKE") + set (${_commentVar} "# ${_commentText}") + else() + set (${_commentVar} "/* ${_commentText} */") + endif() +endmacro() + +function (cotire_write_file _language _file _contents _force) + get_filename_component(_moduleName "${COTIRE_CMAKE_MODULE_FILE}" NAME) + cotire_comment_str("${_language}" "${_moduleName} ${COTIRE_CMAKE_MODULE_VERSION} generated file" _header1) + cotire_comment_str("${_language}" "${_file}" _header2) + set (_contents "${_header1}\n${_header2}\n${_contents}") + if (COTIRE_DEBUG) + message (STATUS "${_contents}") + endif() + if (_force OR NOT EXISTS "${_file}") + file (WRITE "${_file}" "${_contents}") + else() + file (READ "${_file}" _oldContents) + if (NOT "${_oldContents}" STREQUAL "${_contents}") + file (WRITE "${_file}" "${_contents}") + else() + if (COTIRE_DEBUG) + message (STATUS "${_file} unchanged") + endif() + endif() + endif() +endfunction() + +function (cotire_generate_unity_source _unityFile) + set(_options "") + set(_oneValueArgs LANGUAGE) + set(_multiValueArgs + DEPENDS SOURCES_COMPILE_DEFINITIONS + PRE_UNDEFS SOURCES_PRE_UNDEFS POST_UNDEFS SOURCES_POST_UNDEFS PROLOGUE EPILOGUE) + cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) + if (_option_DEPENDS) + cotire_check_file_up_to_date(_unityFileIsUpToDate "${_unityFile}" ${_option_DEPENDS}) + if (_unityFileIsUpToDate) + return() + endif() + endif() + set (_sourceFiles ${_option_UNPARSED_ARGUMENTS}) + if (NOT _option_PRE_UNDEFS) + set (_option_PRE_UNDEFS "") + endif() + if (NOT _option_SOURCES_PRE_UNDEFS) + set (_option_SOURCES_PRE_UNDEFS "") + endif() + if (NOT _option_POST_UNDEFS) + set (_option_POST_UNDEFS "") + endif() + if (NOT _option_SOURCES_POST_UNDEFS) + set (_option_SOURCES_POST_UNDEFS "") + endif() + set (_contents "") + if (_option_PROLOGUE) + list (APPEND _contents ${_option_PROLOGUE}) + endif() + if (_option_LANGUAGE AND _sourceFiles) + if ("${_option_LANGUAGE}" STREQUAL "CXX") + list (APPEND _contents "#ifdef __cplusplus") + elseif ("${_option_LANGUAGE}" STREQUAL "C") + list (APPEND _contents "#ifndef __cplusplus") + endif() + endif() + set (_compileUndefinitions "") + foreach (_sourceFile ${_sourceFiles}) + cotire_get_source_compile_definitions( + "${_option_CONFIGURATION}" "${_option_LANGUAGE}" "${_sourceFile}" _compileDefinitions + ${_option_SOURCES_COMPILE_DEFINITIONS}) + cotire_get_source_undefs("${_sourceFile}" COTIRE_UNITY_SOURCE_PRE_UNDEFS _sourcePreUndefs ${_option_SOURCES_PRE_UNDEFS}) + cotire_get_source_undefs("${_sourceFile}" COTIRE_UNITY_SOURCE_POST_UNDEFS _sourcePostUndefs ${_option_SOURCES_POST_UNDEFS}) + if (_option_PRE_UNDEFS) + list (APPEND _compileUndefinitions ${_option_PRE_UNDEFS}) + endif() + if (_sourcePreUndefs) + list (APPEND _compileUndefinitions ${_sourcePreUndefs}) + endif() + if (_compileUndefinitions) + cotire_append_undefs(_contents ${_compileUndefinitions}) + set (_compileUndefinitions "") + endif() + if (_sourcePostUndefs) + list (APPEND _compileUndefinitions ${_sourcePostUndefs}) + endif() + if (_option_POST_UNDEFS) + list (APPEND _compileUndefinitions ${_option_POST_UNDEFS}) + endif() + foreach (_definition ${_compileDefinitions}) + if (_definition MATCHES "^([a-zA-Z0-9_]+)=(.+)$") + list (APPEND _contents "#define ${CMAKE_MATCH_1} ${CMAKE_MATCH_2}") + list (INSERT _compileUndefinitions 0 "${CMAKE_MATCH_1}") + else() + list (APPEND _contents "#define ${_definition}") + list (INSERT _compileUndefinitions 0 "${_definition}") + endif() + endforeach() + # use absolute path as source file location + get_filename_component(_sourceFileLocation "${_sourceFile}" ABSOLUTE) + if (WIN32) + file (TO_NATIVE_PATH "${_sourceFileLocation}" _sourceFileLocation) + endif() + list (APPEND _contents "#include \"${_sourceFileLocation}\"") + endforeach() + if (_compileUndefinitions) + cotire_append_undefs(_contents ${_compileUndefinitions}) + set (_compileUndefinitions "") + endif() + if (_option_LANGUAGE AND _sourceFiles) + list (APPEND _contents "#endif") + endif() + if (_option_EPILOGUE) + list (APPEND _contents ${_option_EPILOGUE}) + endif() + list (APPEND _contents "") + string (REPLACE ";" "\n" _contents "${_contents}") + if (COTIRE_VERBOSE) + message ("${_contents}") + endif() + cotire_write_file("${_option_LANGUAGE}" "${_unityFile}" "${_contents}" TRUE) +endfunction() + +function (cotire_generate_prefix_header _prefixFile) + set(_options "") + set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION) + set(_multiValueArgs DEPENDS COMPILE_DEFINITIONS COMPILE_FLAGS + INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH + IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH) + cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) + if (NOT _option_COMPILER_ID) + set (_option_COMPILER_ID "${CMAKE_${_option_LANGUAGE}_ID}") + endif() + if (NOT _option_COMPILER_VERSION) + set (_option_COMPILER_VERSION "${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}") + endif() + if (_option_DEPENDS) + cotire_check_file_up_to_date(_prefixFileIsUpToDate "${_prefixFile}" ${_option_DEPENDS}) + if (_prefixFileIsUpToDate) + # create empty log file + set (_unparsedLinesFile "${_prefixFile}.log") + file (WRITE "${_unparsedLinesFile}" "") + return() + endif() + endif() + set (_prologue "") + set (_epilogue "") + if (_option_COMPILER_ID MATCHES "Clang") + set (_prologue "#pragma clang system_header") + elseif (_option_COMPILER_ID MATCHES "GNU") + set (_prologue "#pragma GCC system_header") + elseif (_option_COMPILER_ID MATCHES "MSVC") + set (_prologue "#pragma warning(push, 0)") + set (_epilogue "#pragma warning(pop)") + elseif (_option_COMPILER_ID MATCHES "Intel") + # Intel compiler requires hdrstop pragma to stop generating PCH file + set (_epilogue "#pragma hdrstop") + endif() + set (_sourceFiles ${_option_UNPARSED_ARGUMENTS}) + cotire_scan_includes(_selectedHeaders ${_sourceFiles} + LANGUAGE "${_option_LANGUAGE}" + COMPILER_EXECUTABLE "${_option_COMPILER_EXECUTABLE}" + COMPILER_ID "${_option_COMPILER_ID}" + COMPILER_VERSION "${_option_COMPILER_VERSION}" + COMPILE_DEFINITIONS ${_option_COMPILE_DEFINITIONS} + COMPILE_FLAGS ${_option_COMPILE_FLAGS} + INCLUDE_DIRECTORIES ${_option_INCLUDE_DIRECTORIES} + SYSTEM_INCLUDE_DIRECTORIES ${_option_SYSTEM_INCLUDE_DIRECTORIES} + IGNORE_PATH ${_option_IGNORE_PATH} + INCLUDE_PATH ${_option_INCLUDE_PATH} + IGNORE_EXTENSIONS ${_option_IGNORE_EXTENSIONS} + INCLUDE_PRIORITY_PATH ${_option_INCLUDE_PRIORITY_PATH} + UNPARSED_LINES _unparsedLines) + cotire_generate_unity_source("${_prefixFile}" + PROLOGUE ${_prologue} EPILOGUE ${_epilogue} LANGUAGE "${_option_LANGUAGE}" ${_selectedHeaders}) + set (_unparsedLinesFile "${_prefixFile}.log") + if (_unparsedLines) + if (COTIRE_VERBOSE OR NOT _selectedHeaders) + list (LENGTH _unparsedLines _skippedLineCount) + message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesFile}") + endif() + string (REPLACE ";" "\n" _unparsedLines "${_unparsedLines}") + endif() + file (WRITE "${_unparsedLinesFile}" "${_unparsedLines}") +endfunction() + +function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flagsVar) + set (_flags ${${_flagsVar}}) + if (_compilerID MATCHES "MSVC") + # cl.exe options used + # /nologo suppresses display of sign-on banner + # /TC treat all files named on the command line as C source files + # /TP treat all files named on the command line as C++ source files + # /EP preprocess to stdout without #line directives + # /showIncludes list include files + set (_sourceFileTypeC "/TC") + set (_sourceFileTypeCXX "/TP") + if (_flags) + # append to list + list (APPEND _flags /nologo "${_sourceFileType${_language}}" /EP /showIncludes) + else() + # return as a flag string + set (_flags "${_sourceFileType${_language}} /EP /showIncludes") + endif() + elseif (_compilerID MATCHES "GNU") + # GCC options used + # -H print the name of each header file used + # -E invoke preprocessor + # -fdirectives-only do not expand macros, requires GCC >= 4.3 + if (_flags) + # append to list + list (APPEND _flags -H -E) + if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0") + list (APPEND _flags "-fdirectives-only") + endif() + else() + # return as a flag string + set (_flags "-H -E") + if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0") + set (_flags "${_flags} -fdirectives-only") + endif() + endif() + elseif (_compilerID MATCHES "Clang") + # Clang options used + # -H print the name of each header file used + # -E invoke preprocessor + # -fno-color-diagnostics don't prints diagnostics in color + if (_flags) + # append to list + list (APPEND _flags -H -E -fno-color-diagnostics) + else() + # return as a flag string + set (_flags "-H -E -fno-color-diagnostics") + endif() + elseif (_compilerID MATCHES "Intel") + if (WIN32) + # Windows Intel options used + # /nologo do not display compiler version information + # /QH display the include file order + # /EP preprocess to stdout, omitting #line directives + # /TC process all source or unrecognized file types as C source files + # /TP process all source or unrecognized file types as C++ source files + set (_sourceFileTypeC "/TC") + set (_sourceFileTypeCXX "/TP") + if (_flags) + # append to list + list (APPEND _flags /nologo "${_sourceFileType${_language}}" /EP /QH) + else() + # return as a flag string + set (_flags "${_sourceFileType${_language}} /EP /QH") + endif() + else() + # Linux / Mac OS X Intel options used + # -H print the name of each header file used + # -EP preprocess to stdout, omitting #line directives + # -Kc++ process all source or unrecognized file types as C++ source files + if (_flags) + # append to list + if ("${_language}" STREQUAL "CXX") + list (APPEND _flags -Kc++) + endif() + list (APPEND _flags -H -EP) + else() + # return as a flag string + if ("${_language}" STREQUAL "CXX") + set (_flags "-Kc++ ") + endif() + set (_flags "${_flags}-H -EP") + endif() + endif() + else() + message (FATAL_ERROR "cotire: unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.") + endif() + set (${_flagsVar} ${_flags} PARENT_SCOPE) +endfunction() + +function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersion _prefixFile _pchFile _hostFile _flagsVar) + set (_flags ${${_flagsVar}}) + if (_compilerID MATCHES "MSVC") + file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) + file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) + file (TO_NATIVE_PATH "${_hostFile}" _hostFileNative) + # cl.exe options used + # /Yc creates a precompiled header file + # /Fp specifies precompiled header binary file name + # /FI forces inclusion of file + # /TC treat all files named on the command line as C source files + # /TP treat all files named on the command line as C++ source files + # /Zs syntax check only + # /Zm precompiled header memory allocation scaling factor + set (_sourceFileTypeC "/TC") + set (_sourceFileTypeCXX "/TP") + if (_flags) + # append to list + list (APPEND _flags /nologo "${_sourceFileType${_language}}" + "/Yc${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}" /Zs "${_hostFileNative}") + if (COTIRE_PCH_MEMORY_SCALING_FACTOR) + list (APPEND _flags "/Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}") + endif() + else() + # return as a flag string + set (_flags "/Yc\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") + if (COTIRE_PCH_MEMORY_SCALING_FACTOR) + set (_flags "${_flags} /Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}") + endif() + endif() + elseif (_compilerID MATCHES "GNU|Clang") + # GCC / Clang options used + # -x specify the source language + # -c compile but do not link + # -o place output in file + # note that we cannot use -w to suppress all warnings upon pre-compiling, because turning off a warning may + # alter compile flags as a side effect (e.g., -Wwrite-string implies -fconst-strings) + set (_xLanguage_C "c-header") + set (_xLanguage_CXX "c++-header") + if (_flags) + # append to list + list (APPEND _flags "-x" "${_xLanguage_${_language}}" "-c" "${_prefixFile}" -o "${_pchFile}") + else() + # return as a flag string + set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"") + endif() + elseif (_compilerID MATCHES "Intel") + if (WIN32) + file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) + file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) + file (TO_NATIVE_PATH "${_hostFile}" _hostFileNative) + # Windows Intel options used + # /nologo do not display compiler version information + # /Yc create a precompiled header (PCH) file + # /Fp specify a path or file name for precompiled header files + # /FI tells the preprocessor to include a specified file name as the header file + # /TC process all source or unrecognized file types as C source files + # /TP process all source or unrecognized file types as C++ source files + # /Zs syntax check only + # /Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) + set (_sourceFileTypeC "/TC") + set (_sourceFileTypeCXX "/TP") + if (_flags) + # append to list + list (APPEND _flags /nologo "${_sourceFileType${_language}}" + "/Yc" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}" /Zs "${_hostFileNative}") + if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") + list (APPEND _flags "/Wpch-messages") + endif() + else() + # return as a flag string + set (_flags "/Yc /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") + if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") + set (_flags "${_flags} /Wpch-messages") + endif() + endif() + else() + # Linux / Mac OS X Intel options used + # -pch-dir location for precompiled header files + # -pch-create name of the precompiled header (PCH) to create + # -Kc++ process all source or unrecognized file types as C++ source files + # -fsyntax-only check only for correct syntax + # -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) + get_filename_component(_pchDir "${_pchFile}" DIRECTORY) + get_filename_component(_pchName "${_pchFile}" NAME) + set (_xLanguage_C "c-header") + set (_xLanguage_CXX "c++-header") + if (_flags) + # append to list + if ("${_language}" STREQUAL "CXX") + list (APPEND _flags -Kc++) + endif() + list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-create" "${_pchName}" "-fsyntax-only" "${_hostFile}") + if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") + list (APPEND _flags "-Wpch-messages") + endif() + else() + # return as a flag string + set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-create \"${_pchName}\"") + if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") + set (_flags "${_flags} -Wpch-messages") + endif() + endif() + endif() + else() + message (FATAL_ERROR "cotire: unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.") + endif() + set (${_flagsVar} ${_flags} PARENT_SCOPE) +endfunction() + +function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerVersion _prefixFile _pchFile _flagsVar) + set (_flags ${${_flagsVar}}) + if (_compilerID MATCHES "MSVC") + file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) + # cl.exe options used + # /Yu uses a precompiled header file during build + # /Fp specifies precompiled header binary file name + # /FI forces inclusion of file + # /Zm precompiled header memory allocation scaling factor + if (_pchFile) + file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) + if (_flags) + # append to list + list (APPEND _flags "/Yu${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}") + if (COTIRE_PCH_MEMORY_SCALING_FACTOR) + list (APPEND _flags "/Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}") + endif() + else() + # return as a flag string + set (_flags "/Yu\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") + if (COTIRE_PCH_MEMORY_SCALING_FACTOR) + set (_flags "${_flags} /Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}") + endif() + endif() + else() + # no precompiled header, force inclusion of prefix header + if (_flags) + # append to list + list (APPEND _flags "/FI${_prefixFileNative}") + else() + # return as a flag string + set (_flags "/FI\"${_prefixFileNative}\"") + endif() + endif() + elseif (_compilerID MATCHES "GNU") + # GCC options used + # -include process include file as the first line of the primary source file + # -Winvalid-pch warns if precompiled header is found but cannot be used + # note: ccache requires the -include flag to be used in order to process precompiled header correctly + if (_flags) + # append to list + list (APPEND _flags "-Winvalid-pch" "-include" "${_prefixFile}") + else() + # return as a flag string + set (_flags "-Winvalid-pch -include \"${_prefixFile}\"") + endif() + elseif (_compilerID MATCHES "Clang") + # Clang options used + # -include process include file as the first line of the primary source file + # -include-pch include precompiled header file + # -Qunused-arguments don't emit warning for unused driver arguments + # note: ccache requires the -include flag to be used in order to process precompiled header correctly + if (_flags) + # append to list + list (APPEND _flags "-Qunused-arguments" "-include" "${_prefixFile}") + else() + # return as a flag string + set (_flags "-Qunused-arguments -include \"${_prefixFile}\"") + endif() + elseif (_compilerID MATCHES "Intel") + if (WIN32) + file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) + # Windows Intel options used + # /Yu use a precompiled header (PCH) file + # /Fp specify a path or file name for precompiled header files + # /FI tells the preprocessor to include a specified file name as the header file + # /Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) + if (_pchFile) + file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) + if (_flags) + # append to list + list (APPEND _flags "/Yu" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}") + if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") + list (APPEND _flags "/Wpch-messages") + endif() + else() + # return as a flag string + set (_flags "/Yu /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") + if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") + set (_flags "${_flags} /Wpch-messages") + endif() + endif() + else() + # no precompiled header, force inclusion of prefix header + if (_flags) + # append to list + list (APPEND _flags "/FI${_prefixFileNative}") + else() + # return as a flag string + set (_flags "/FI\"${_prefixFileNative}\"") + endif() + endif() + else() + # Linux / Mac OS X Intel options used + # -pch-dir location for precompiled header files + # -pch-use name of the precompiled header (PCH) to use + # -include process include file as the first line of the primary source file + # -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) + if (_pchFile) + get_filename_component(_pchDir "${_pchFile}" DIRECTORY) + get_filename_component(_pchName "${_pchFile}" NAME) + if (_flags) + # append to list + list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-use" "${_pchName}") + if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") + list (APPEND _flags "-Wpch-messages") + endif() + else() + # return as a flag string + set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-use \"${_pchName}\"") + if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") + set (_flags "${_flags} -Wpch-messages") + endif() + endif() + else() + # no precompiled header, force inclusion of prefix header + if (_flags) + # append to list + list (APPEND _flags "-include" "${_prefixFile}") + else() + # return as a flag string + set (_flags "-include \"${_prefixFile}\"") + endif() + endif() + endif() + else() + message (FATAL_ERROR "cotire: unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.") + endif() + set (${_flagsVar} ${_flags} PARENT_SCOPE) +endfunction() + +function (cotire_precompile_prefix_header _prefixFile _pchFile _hostFile) + set(_options "") + set(_oneValueArgs COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION LANGUAGE) + set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES SYS) + cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) + if (NOT _option_LANGUAGE) + set (_option_LANGUAGE "CXX") + endif() + if (NOT _option_COMPILER_ID) + set (_option_COMPILER_ID "${CMAKE_${_option_LANGUAGE}_ID}") + endif() + if (NOT _option_COMPILER_VERSION) + set (_option_COMPILER_VERSION "${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}") + endif() + cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}") + cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS}) + cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS}) + cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) + cotire_add_frameworks_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) + cotire_add_pch_compilation_flags( + "${_option_LANGUAGE}" "${_option_COMPILER_ID}" "${_option_COMPILER_VERSION}" + "${_prefixFile}" "${_pchFile}" "${_hostFile}" _cmd) + if (COTIRE_VERBOSE) + message (STATUS "execute_process: ${_cmd}") + endif() + if (_option_COMPILER_ID MATCHES "MSVC") + # cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared + unset (ENV{VS_UNICODE_OUTPUT}) + endif() + execute_process( + COMMAND ${_cmd} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + RESULT_VARIABLE _result) + if (_result) + message (FATAL_ERROR "cotire: error ${_result} precompiling ${_prefixFile}.") + endif() +endfunction() + +function (cotire_check_precompiled_header_support _language _target _msgVar) + set (_unsupportedCompiler + "Precompiled headers not supported for ${_language} compiler ${CMAKE_${_language}_COMPILER_ID}") + if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC") + # supported since Visual Studio C++ 6.0 + # and CMake does not support an earlier version + set (${_msgVar} "" PARENT_SCOPE) + elseif (CMAKE_${_language}_COMPILER_ID MATCHES "GNU") + # GCC PCH support requires version >= 3.4 + if ("${CMAKE_${_language}_COMPILER_VERSION}" VERSION_LESS "3.4.0") + set (${_msgVar} "${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}." PARENT_SCOPE) + else() + set (${_msgVar} "" PARENT_SCOPE) + endif() + elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang") + # all Clang versions have PCH support + set (${_msgVar} "" PARENT_SCOPE) + elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel") + # Intel PCH support requires version >= 8.0.0 + if ("${CMAKE_${_language}_COMPILER_VERSION}" VERSION_LESS "8.0.0") + set (${_msgVar} "${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}." PARENT_SCOPE) + else() + set (${_msgVar} "" PARENT_SCOPE) + endif() + else() + set (${_msgVar} "${_unsupportedCompiler}." PARENT_SCOPE) + endif() + if (CMAKE_${_language}_COMPILER MATCHES "ccache") + if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros|pch_defines") + set (${_msgVar} + "ccache requires the environment variable CCACHE_SLOPPINESS to be set to \"pch_defines,time_macros\"." + PARENT_SCOPE) + endif() + endif() + if (APPLE) + # PCH compilation not supported by GCC / Clang for multi-architecture builds (e.g., i386, x86_64) + cotire_get_configuration_types(_configs) + foreach (_config ${_configs}) + set (_targetFlags "") + cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags) + cotire_filter_compile_flags("${_language}" "arch" _architectures _ignore ${_targetFlags}) + list (LENGTH _architectures _numberOfArchitectures) + if (_numberOfArchitectures GREATER 1) + string (REPLACE ";" ", " _architectureStr "${_architectures}") + set (${_msgVar} + "Precompiled headers not supported on Darwin for multi-architecture builds (${_architectureStr})." + PARENT_SCOPE) + break() + endif() + endforeach() + endif() +endfunction() + +macro (cotire_get_intermediate_dir _cotireDir) + # ${CMAKE_CFG_INTDIR} may reference a build-time variable when using a generator which supports configuration types + get_filename_component(${_cotireDir} "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${COTIRE_INTDIR}" ABSOLUTE) +endmacro() + +macro (cotire_setup_file_extension_variables) + set (_unityFileExt_C ".c") + set (_unityFileExt_CXX ".cxx") + set (_prefixFileExt_C ".h") + set (_prefixFileExt_CXX ".hxx") + set (_prefixSourceFileExt_C ".c") + set (_prefixSourceFileExt_CXX ".cxx") +endmacro() + +function (cotire_make_single_unity_source_file_path _language _target _unityFileVar) + cotire_setup_file_extension_variables() + if (NOT DEFINED _unityFileExt_${_language}) + set (${_unityFileVar} "" PARENT_SCOPE) + return() + endif() + set (_unityFileBaseName "${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}") + set (_unityFileName "${_unityFileBaseName}${_unityFileExt_${_language}}") + cotire_get_intermediate_dir(_baseDir) + set (_unityFile "${_baseDir}/${_unityFileName}") + set (${_unityFileVar} "${_unityFile}" PARENT_SCOPE) +endfunction() + +function (cotire_make_unity_source_file_paths _language _target _maxIncludes _unityFilesVar) + cotire_setup_file_extension_variables() + if (NOT DEFINED _unityFileExt_${_language}) + set (${_unityFileVar} "" PARENT_SCOPE) + return() + endif() + set (_unityFileBaseName "${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}") + cotire_get_intermediate_dir(_baseDir) + set (_startIndex 0) + set (_index 0) + set (_unityFiles "") + set (_sourceFiles ${ARGN}) + foreach (_sourceFile ${_sourceFiles}) + get_source_file_property(_startNew "${_sourceFile}" COTIRE_START_NEW_UNITY_SOURCE) + math (EXPR _unityFileCount "${_index} - ${_startIndex}") + if (_startNew OR (_maxIncludes GREATER 0 AND NOT _unityFileCount LESS _maxIncludes)) + if (_index GREATER 0) + # start new unity file segment + math (EXPR _endIndex "${_index} - 1") + set (_unityFileName "${_unityFileBaseName}_${_startIndex}_${_endIndex}${_unityFileExt_${_language}}") + list (APPEND _unityFiles "${_baseDir}/${_unityFileName}") + endif() + set (_startIndex ${_index}) + endif() + math (EXPR _index "${_index} + 1") + endforeach() + list (LENGTH _sourceFiles _numberOfSources) + if (_startIndex EQUAL 0) + # there is only a single unity file + cotire_make_single_unity_source_file_path(${_language} ${_target} _unityFiles) + elseif (_startIndex LESS _numberOfSources) + # end with final unity file segment + math (EXPR _endIndex "${_index} - 1") + set (_unityFileName "${_unityFileBaseName}_${_startIndex}_${_endIndex}${_unityFileExt_${_language}}") + list (APPEND _unityFiles "${_baseDir}/${_unityFileName}") + endif() + set (${_unityFilesVar} ${_unityFiles} PARENT_SCOPE) + if (COTIRE_DEBUG AND _unityFiles) + message (STATUS "unity files: ${_unityFiles}") + endif() +endfunction() + +function (cotire_unity_to_prefix_file_path _language _target _unityFile _prefixFileVar) + cotire_setup_file_extension_variables() + if (NOT DEFINED _unityFileExt_${_language}) + set (${_prefixFileVar} "" PARENT_SCOPE) + return() + endif() + set (_unityFileBaseName "${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}") + set (_prefixFileBaseName "${_target}_${_language}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}") + string (REPLACE "${_unityFileBaseName}" "${_prefixFileBaseName}" _prefixFile "${_unityFile}") + string (REGEX REPLACE "${_unityFileExt_${_language}}$" "${_prefixFileExt_${_language}}" _prefixFile "${_prefixFile}") + set (${_prefixFileVar} "${_prefixFile}" PARENT_SCOPE) +endfunction() + +function (cotire_prefix_header_to_source_file_path _language _prefixHeaderFile _prefixSourceFileVar) + cotire_setup_file_extension_variables() + if (NOT DEFINED _prefixSourceFileExt_${_language}) + set (${_prefixSourceFileVar} "" PARENT_SCOPE) + return() + endif() + string (REGEX REPLACE "${_prefixFileExt_${_language}}$" "${_prefixSourceFileExt_${_language}}" _prefixSourceFile "${_prefixHeaderFile}") + set (${_prefixSourceFileVar} "${_prefixSourceFile}" PARENT_SCOPE) +endfunction() + +function (cotire_make_prefix_file_name _language _target _prefixFileBaseNameVar _prefixFileNameVar) + cotire_setup_file_extension_variables() + if (NOT _language) + set (_prefixFileBaseName "${_target}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}") + set (_prefixFileName "${_prefixFileBaseName}${_prefixFileExt_C}") + elseif (DEFINED _prefixFileExt_${_language}) + set (_prefixFileBaseName "${_target}_${_language}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}") + set (_prefixFileName "${_prefixFileBaseName}${_prefixFileExt_${_language}}") + else() + set (_prefixFileBaseName "") + set (_prefixFileName "") + endif() + set (${_prefixFileBaseNameVar} "${_prefixFileBaseName}" PARENT_SCOPE) + set (${_prefixFileNameVar} "${_prefixFileName}" PARENT_SCOPE) +endfunction() + +function (cotire_make_prefix_file_path _language _target _prefixFileVar) + cotire_make_prefix_file_name("${_language}" "${_target}" _prefixFileBaseName _prefixFileName) + set (${_prefixFileVar} "" PARENT_SCOPE) + if (_prefixFileName) + if (NOT _language) + set (_language "C") + endif() + if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang|Intel|MSVC") + cotire_get_intermediate_dir(_baseDir) + set (${_prefixFileVar} "${_baseDir}/${_prefixFileName}" PARENT_SCOPE) + endif() + endif() +endfunction() + +function (cotire_make_pch_file_path _language _target _pchFileVar) + cotire_make_prefix_file_name("${_language}" "${_target}" _prefixFileBaseName _prefixFileName) + set (${_pchFileVar} "" PARENT_SCOPE) + if (_prefixFileBaseName AND _prefixFileName) + cotire_check_precompiled_header_support("${_language}" "${_target}" _msg) + if (NOT _msg) + if (XCODE) + # For Xcode, we completely hand off the compilation of the prefix header to the IDE + return() + endif() + cotire_get_intermediate_dir(_baseDir) + if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC") + # MSVC uses the extension .pch added to the prefix header base name + set (${_pchFileVar} "${_baseDir}/${_prefixFileBaseName}.pch" PARENT_SCOPE) + elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang") + # Clang looks for a precompiled header corresponding to the prefix header with the extension .pch appended + set (${_pchFileVar} "${_baseDir}/${_prefixFileName}.pch" PARENT_SCOPE) + elseif (CMAKE_${_language}_COMPILER_ID MATCHES "GNU") + # GCC looks for a precompiled header corresponding to the prefix header with the extension .gch appended + set (${_pchFileVar} "${_baseDir}/${_prefixFileName}.gch" PARENT_SCOPE) + elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel") + # Intel uses the extension .pchi added to the prefix header base name + set (${_pchFileVar} "${_baseDir}/${_prefixFileBaseName}.pchi" PARENT_SCOPE) + endif() + endif() + endif() +endfunction() + +function (cotire_select_unity_source_files _unityFile _sourcesVar) + set (_sourceFiles ${ARGN}) + if (_sourceFiles AND "${_unityFile}" MATCHES "${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}_([0-9]+)_([0-9]+)") + set (_startIndex ${CMAKE_MATCH_1}) + set (_endIndex ${CMAKE_MATCH_2}) + list (LENGTH _sourceFiles _numberOfSources) + if (NOT _startIndex LESS _numberOfSources) + math (EXPR _startIndex "${_numberOfSources} - 1") + endif() + if (NOT _endIndex LESS _numberOfSources) + math (EXPR _endIndex "${_numberOfSources} - 1") + endif() + set (_files "") + foreach (_index RANGE ${_startIndex} ${_endIndex}) + list (GET _sourceFiles ${_index} _file) + list (APPEND _files "${_file}") + endforeach() + else() + set (_files ${_sourceFiles}) + endif() + set (${_sourcesVar} ${_files} PARENT_SCOPE) +endfunction() + +function (cotire_get_unity_source_dependencies _language _target _dependencySourcesVar) + set (_dependencySources "") + # depend on target's generated source files + get_target_property(_targetSourceFiles ${_target} SOURCES) + cotire_get_objects_with_property_on(_generatedSources GENERATED SOURCE ${_targetSourceFiles}) + if (_generatedSources) + # but omit all generated source files that have the COTIRE_EXCLUDED property set to true + cotire_get_objects_with_property_on(_excludedGeneratedSources COTIRE_EXCLUDED SOURCE ${_generatedSources}) + if (_excludedGeneratedSources) + list (REMOVE_ITEM _generatedSources ${_excludedGeneratedSources}) + endif() + # and omit all generated source files that have the COTIRE_DEPENDENCY property set to false explicitly + cotire_get_objects_with_property_off(_excludedNonDependencySources COTIRE_DEPENDENCY SOURCE ${_generatedSources}) + if (_excludedNonDependencySources) + list (REMOVE_ITEM _generatedSources ${_excludedNonDependencySources}) + endif() + if (_generatedSources) + list (APPEND _dependencySources ${_generatedSources}) + endif() + endif() + if (COTIRE_DEBUG AND _dependencySources) + message (STATUS "${_language} ${_target} unity source dependencies: ${_dependencySources}") + endif() + set (${_dependencySourcesVar} ${_dependencySources} PARENT_SCOPE) +endfunction() + +function (cotire_get_prefix_header_dependencies _language _target _dependencySourcesVar) + set (_dependencySources "") + # depend on target source files marked with custom COTIRE_DEPENDENCY property + get_target_property(_targetSourceFiles ${_target} SOURCES) + cotire_get_objects_with_property_on(_dependencySources COTIRE_DEPENDENCY SOURCE ${_targetSourceFiles}) + if (COTIRE_DEBUG AND _dependencySources) + message (STATUS "${_language} ${_target} prefix header dependencies: ${_dependencySources}") + endif() + set (${_dependencySourcesVar} ${_dependencySources} PARENT_SCOPE) +endfunction() + +function (cotire_generate_target_script _language _configurations _target _targetScriptVar _targetConfigScriptVar) + set (_targetSources ${ARGN}) + cotire_get_prefix_header_dependencies(${_language} ${_target} COTIRE_TARGET_PREFIX_DEPENDS ${_targetSources}) + cotire_get_unity_source_dependencies(${_language} ${_target} COTIRE_TARGET_UNITY_DEPENDS ${_targetSources}) + # set up variables to be configured + set (COTIRE_TARGET_LANGUAGE "${_language}") + get_target_property(COTIRE_TARGET_IGNORE_PATH ${_target} COTIRE_PREFIX_HEADER_IGNORE_PATH) + cotire_add_sys_root_paths(COTIRE_TARGET_IGNORE_PATH) + get_target_property(COTIRE_TARGET_INCLUDE_PATH ${_target} COTIRE_PREFIX_HEADER_INCLUDE_PATH) + cotire_add_sys_root_paths(COTIRE_TARGET_INCLUDE_PATH) + get_target_property(COTIRE_TARGET_PRE_UNDEFS ${_target} COTIRE_UNITY_SOURCE_PRE_UNDEFS) + get_target_property(COTIRE_TARGET_POST_UNDEFS ${_target} COTIRE_UNITY_SOURCE_POST_UNDEFS) + get_target_property(COTIRE_TARGET_MAXIMUM_NUMBER_OF_INCLUDES ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES) + get_target_property(COTIRE_TARGET_INCLUDE_PRIORITY_PATH ${_target} COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH) + cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_PRE_UNDEFS COTIRE_TARGET_SOURCES_PRE_UNDEFS ${_targetSources}) + cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_POST_UNDEFS COTIRE_TARGET_SOURCES_POST_UNDEFS ${_targetSources}) + set (COTIRE_TARGET_CONFIGURATION_TYPES "${_configurations}") + foreach (_config ${_configurations}) + string (TOUPPER "${_config}" _upperConfig) + cotire_get_target_include_directories( + "${_config}" "${_language}" "${_target}" COTIRE_TARGET_INCLUDE_DIRECTORIES_${_upperConfig} COTIRE_TARGET_SYSTEM_INCLUDE_DIRECTORIES_${_upperConfig}) + cotire_get_target_compile_definitions( + "${_config}" "${_language}" "${_target}" COTIRE_TARGET_COMPILE_DEFINITIONS_${_upperConfig}) + cotire_get_target_compiler_flags( + "${_config}" "${_language}" "${_target}" COTIRE_TARGET_COMPILE_FLAGS_${_upperConfig}) + cotire_get_source_files_compile_definitions( + "${_config}" "${_language}" COTIRE_TARGET_SOURCES_COMPILE_DEFINITIONS_${_upperConfig} ${_targetSources}) + endforeach() + # set up COTIRE_TARGET_SOURCES + set (COTIRE_TARGET_SOURCES "") + foreach (_sourceFile ${_targetSources}) + get_source_file_property(_generated "${_sourceFile}" GENERATED) + if (_generated) + # use absolute paths for generated files only, retrieving the LOCATION property is an expensive operation + get_source_file_property(_sourceLocation "${_sourceFile}" LOCATION) + list (APPEND COTIRE_TARGET_SOURCES "${_sourceLocation}") + else() + list (APPEND COTIRE_TARGET_SOURCES "${_sourceFile}") + endif() + endforeach() + # copy variable definitions to cotire target script + get_cmake_property(_vars VARIABLES) + string (REGEX MATCHALL "COTIRE_[A-Za-z0-9_]+" _matchVars "${_vars}") + # omit COTIRE_*_INIT variables + string (REGEX MATCHALL "COTIRE_[A-Za-z0-9_]+_INIT" _initVars "${_matchVars}") + if (_initVars) + list (REMOVE_ITEM _matchVars ${_initVars}) + endif() + # omit COTIRE_VERBOSE which is passed as a CMake define on command line + list (REMOVE_ITEM _matchVars COTIRE_VERBOSE) + set (_contents "") + set (_contentsHasGeneratorExpressions FALSE) + foreach (_var IN LISTS _matchVars ITEMS + XCODE MSVC CMAKE_GENERATOR CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES + CMAKE_${_language}_COMPILER_ID CMAKE_${_language}_COMPILER_VERSION + CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1 + CMAKE_INCLUDE_FLAG_${_language} CMAKE_INCLUDE_FLAG_${_language}_SEP + CMAKE_INCLUDE_SYSTEM_FLAG_${_language} + CMAKE_${_language}_FRAMEWORK_SEARCH_FLAG + CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG + CMAKE_${_language}_SOURCE_FILE_EXTENSIONS) + if (DEFINED ${_var}) + string (REPLACE "\"" "\\\"" _value "${${_var}}") + set (_contents "${_contents}set (${_var} \"${_value}\")\n") + if (NOT _contentsHasGeneratorExpressions) + if ("${_value}" MATCHES "\\$<.*>") + set (_contentsHasGeneratorExpressions TRUE) + endif() + endif() + endif() + endforeach() + # generate target script file + get_filename_component(_moduleName "${COTIRE_CMAKE_MODULE_FILE}" NAME) + set (_targetCotireScript "${CMAKE_CURRENT_BINARY_DIR}/${_target}_${_language}_${_moduleName}") + cotire_write_file("CMAKE" "${_targetCotireScript}" "${_contents}" FALSE) + if (_contentsHasGeneratorExpressions) + # use file(GENERATE ...) to expand generator expressions in the target script at CMake generate-time + set (_configNameOrNoneGeneratorExpression "$<$:None>$<$>:$>") + set (_targetCotireConfigScript "${CMAKE_CURRENT_BINARY_DIR}/${_target}_${_language}_${_configNameOrNoneGeneratorExpression}_${_moduleName}") + file (GENERATE OUTPUT "${_targetCotireConfigScript}" INPUT "${_targetCotireScript}") + else() + set (_targetCotireConfigScript "${_targetCotireScript}") + endif() + set (${_targetScriptVar} "${_targetCotireScript}" PARENT_SCOPE) + set (${_targetConfigScriptVar} "${_targetCotireConfigScript}" PARENT_SCOPE) +endfunction() + +function (cotire_setup_pch_file_compilation _language _target _targetScript _prefixFile _pchFile _hostFile) + set (_sourceFiles ${ARGN}) + if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") + # for Visual Studio and Intel, we attach the precompiled header compilation to the host file + # the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion + if (_sourceFiles) + set (_flags "") + cotire_add_pch_compilation_flags( + "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" + "${_prefixFile}" "${_pchFile}" "${_hostFile}" _flags) + set_property (SOURCE ${_hostFile} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") + set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_OUTPUTS "${_pchFile}") + # make object file generated from host file depend on prefix header + set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}") + # mark host file as cotired to prevent it from being used in another cotired target + set_property (SOURCE ${_hostFile} PROPERTY COTIRE_TARGET "${_target}") + endif() + elseif ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") + # for makefile based generator, we add a custom command to precompile the prefix header + if (_targetScript) + cotire_set_cmd_to_prologue(_cmds) + list (APPEND _cmds -P "${COTIRE_CMAKE_MODULE_FILE}" "precompile" "${_targetScript}" "${_prefixFile}" "${_pchFile}" "${_hostFile}") + file (RELATIVE_PATH _pchFileRelPath "${CMAKE_BINARY_DIR}" "${_pchFile}") + if (COTIRE_DEBUG) + message (STATUS "add_custom_command: OUTPUT ${_pchFile} ${_cmds} DEPENDS ${_prefixFile} IMPLICIT_DEPENDS ${_language} ${_prefixFile}") + endif() + set_property (SOURCE "${_pchFile}" PROPERTY GENERATED TRUE) + add_custom_command( + OUTPUT "${_pchFile}" + COMMAND ${_cmds} + DEPENDS "${_prefixFile}" + IMPLICIT_DEPENDS ${_language} "${_prefixFile}" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "Building ${_language} precompiled header ${_pchFileRelPath}" + VERBATIM) + endif() + endif() +endfunction() + +function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefixFile _pchFile _hostFile) + if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") + # for Visual Studio and Intel, we include the precompiled header in all but the host file + # the host file does the precompiled header compilation, see cotire_setup_pch_file_compilation + set (_sourceFiles ${ARGN}) + list (LENGTH _sourceFiles _numberOfSourceFiles) + if (_numberOfSourceFiles GREATER 0) + # mark sources as cotired to prevent them from being used in another cotired target + set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}") + set (_flags "") + cotire_add_prefix_pch_inclusion_flags( + "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" + "${_prefixFile}" "${_pchFile}" _flags) + set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") + # make object files generated from source files depend on precompiled header + set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_pchFile}") + endif() + elseif ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") + set (_sourceFiles ${_hostFile} ${ARGN}) + if (NOT _wholeTarget) + # for makefile based generator, we force the inclusion of the prefix header for a subset + # of the source files, if this is a multi-language target or has excluded files + set (_flags "") + cotire_add_prefix_pch_inclusion_flags( + "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" + "${_prefixFile}" "${_pchFile}" _flags) + set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") + # mark sources as cotired to prevent them from being used in another cotired target + set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}") + endif() + # make object files generated from source files depend on precompiled header + set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_pchFile}") + endif() +endfunction() + +function (cotire_setup_prefix_file_inclusion _language _target _prefixFile) + set (_sourceFiles ${ARGN}) + # force the inclusion of the prefix header for the given source files + set (_flags "") + set (_pchFile "") + cotire_add_prefix_pch_inclusion_flags( + "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" + "${_prefixFile}" "${_pchFile}" _flags) + set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") + # mark sources as cotired to prevent them from being used in another cotired target + set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}") + # make object files generated from source files depend on prefix header + set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}") +endfunction() + +function (cotire_get_first_set_property_value _propertyValueVar _type _object) + set (_properties ${ARGN}) + foreach (_property ${_properties}) + get_property(_propertyValue ${_type} "${_object}" PROPERTY ${_property}) + if (_propertyValue) + set (${_propertyValueVar} ${_propertyValue} PARENT_SCOPE) + return() + endif() + endforeach() + set (${_propertyValueVar} "" PARENT_SCOPE) +endfunction() + +function (cotire_setup_combine_command _language _targetScript _joinedFile _cmdsVar) + set (_files ${ARGN}) + set (_filesPaths "") + foreach (_file ${_files}) + get_filename_component(_filePath "${_file}" ABSOLUTE) + list (APPEND _filesPaths "${_filePath}") + endforeach() + cotire_set_cmd_to_prologue(_prefixCmd) + list (APPEND _prefixCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "combine") + if (_targetScript) + list (APPEND _prefixCmd "${_targetScript}") + endif() + list (APPEND _prefixCmd "${_joinedFile}" ${_filesPaths}) + if (COTIRE_DEBUG) + message (STATUS "add_custom_command: OUTPUT ${_joinedFile} COMMAND ${_prefixCmd} DEPENDS ${_files}") + endif() + set_property (SOURCE "${_joinedFile}" PROPERTY GENERATED TRUE) + file (RELATIVE_PATH _joinedFileRelPath "${CMAKE_BINARY_DIR}" "${_joinedFile}") + get_filename_component(_joinedFileBaseName "${_joinedFile}" NAME_WE) + get_filename_component(_joinedFileExt "${_joinedFile}" EXT) + if (_language AND _joinedFileBaseName MATCHES "${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}$") + set (_comment "Generating ${_language} unity source ${_joinedFileRelPath}") + elseif (_language AND _joinedFileBaseName MATCHES "${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}$") + if (_joinedFileExt MATCHES "^\\.c") + set (_comment "Generating ${_language} prefix source ${_joinedFileRelPath}") + else() + set (_comment "Generating ${_language} prefix header ${_joinedFileRelPath}") + endif() + else() + set (_comment "Generating ${_joinedFileRelPath}") + endif() + add_custom_command( + OUTPUT "${_joinedFile}" + COMMAND ${_prefixCmd} + DEPENDS ${_files} + COMMENT "${_comment}" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" + VERBATIM) + list (APPEND ${_cmdsVar} COMMAND ${_prefixCmd}) + set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) +endfunction() + +function (cotire_setup_target_pch_usage _languages _target _wholeTarget) + if (XCODE) + # for Xcode, we attach a pre-build action to generate the unity sources and prefix headers + set (_prefixFiles "") + foreach (_language ${_languages}) + get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER) + if (_prefixFile) + list (APPEND _prefixFiles "${_prefixFile}") + endif() + endforeach() + set (_cmds ${ARGN}) + list (LENGTH _prefixFiles _numberOfPrefixFiles) + if (_numberOfPrefixFiles GREATER 1) + # we also generate a generic, single prefix header which includes all language specific prefix headers + set (_language "") + set (_targetScript "") + cotire_make_prefix_file_path("${_language}" ${_target} _prefixHeader) + cotire_setup_combine_command("${_language}" "${_targetScript}" "${_prefixHeader}" _cmds ${_prefixFiles}) + else() + set (_prefixHeader "${_prefixFiles}") + endif() + if (COTIRE_DEBUG) + message (STATUS "add_custom_command: TARGET ${_target} PRE_BUILD ${_cmds}") + endif() + # because CMake PRE_BUILD command does not support dependencies, + # we check dependencies explicity in cotire script mode when the pre-build action is run + add_custom_command( + TARGET "${_target}" + PRE_BUILD ${_cmds} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "Updating target ${_target} prefix headers" + VERBATIM) + # make Xcode precompile the generated prefix header with ProcessPCH and ProcessPCH++ + set_target_properties(${_target} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES") + set_target_properties(${_target} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${_prefixHeader}") + elseif ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") + # for makefile based generator, we force inclusion of the prefix header for all target source files + # if this is a single-language target without any excluded files + if (_wholeTarget) + set (_language "${_languages}") + # for Visual Studio and Intel, precompiled header inclusion is always done on the source file level + # see cotire_setup_pch_file_inclusion + if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") + get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER) + if (_prefixFile) + get_property(_pchFile TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER) + set (_options COMPILE_OPTIONS) + cotire_add_prefix_pch_inclusion_flags( + "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" + "${_prefixFile}" "${_pchFile}" _options) + set_property(TARGET ${_target} APPEND PROPERTY ${_options}) + endif() + endif() + endif() + endif() +endfunction() + +function (cotire_setup_unity_generation_commands _language _target _targetScript _targetConfigScript _unityFiles _cmdsVar) + set (_dependencySources "") + cotire_get_unity_source_dependencies(${_language} ${_target} _dependencySources ${ARGN}) + foreach (_unityFile ${_unityFiles}) + set_property (SOURCE "${_unityFile}" PROPERTY GENERATED TRUE) + # set up compiled unity source dependencies via OBJECT_DEPENDS + # this ensures that missing source files are generated before the unity file is compiled + if (COTIRE_DEBUG AND _dependencySources) + message (STATUS "${_unityFile} OBJECT_DEPENDS ${_dependencySources}") + endif() + if (_dependencySources) + # the OBJECT_DEPENDS property requires a list of full paths + set (_objectDependsPaths "") + foreach (_sourceFile ${_dependencySources}) + get_source_file_property(_sourceLocation "${_sourceFile}" LOCATION) + list (APPEND _objectDependsPaths "${_sourceLocation}") + endforeach() + set_property (SOURCE "${_unityFile}" PROPERTY OBJECT_DEPENDS ${_objectDependsPaths}) + endif() + if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") + # unity file compilation results in potentially huge object file, thus use /bigobj by default unter MSVC and Windows Intel + set_property (SOURCE "${_unityFile}" APPEND_STRING PROPERTY COMPILE_FLAGS "/bigobj") + endif() + cotire_set_cmd_to_prologue(_unityCmd) + list (APPEND _unityCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "unity" "${_targetConfigScript}" "${_unityFile}") + if (CMAKE_VERSION VERSION_LESS "3.1.0") + set (_unityCmdDepends "${_targetScript}") + else() + # CMake 3.1.0 supports generator expressions in arguments to DEPENDS + set (_unityCmdDepends "${_targetConfigScript}") + endif() + file (RELATIVE_PATH _unityFileRelPath "${CMAKE_BINARY_DIR}" "${_unityFile}") + if (COTIRE_DEBUG) + message (STATUS "add_custom_command: OUTPUT ${_unityFile} COMMAND ${_unityCmd} DEPENDS ${_unityCmdDepends}") + endif() + add_custom_command( + OUTPUT "${_unityFile}" + COMMAND ${_unityCmd} + DEPENDS ${_unityCmdDepends} + COMMENT "Generating ${_language} unity source ${_unityFileRelPath}" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + VERBATIM) + list (APPEND ${_cmdsVar} COMMAND ${_unityCmd}) + endforeach() + set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) +endfunction() + +function (cotire_setup_prefix_generation_command _language _target _targetScript _prefixFile _unityFiles _cmdsVar) + set (_sourceFiles ${ARGN}) + set (_dependencySources "") + cotire_get_prefix_header_dependencies(${_language} ${_target} _dependencySources ${_sourceFiles}) + cotire_set_cmd_to_prologue(_prefixCmd) + list (APPEND _prefixCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "prefix" "${_targetScript}" "${_prefixFile}" ${_unityFiles}) + set_property (SOURCE "${_prefixFile}" PROPERTY GENERATED TRUE) + if (COTIRE_DEBUG) + message (STATUS "add_custom_command: OUTPUT ${_prefixFile} COMMAND ${_prefixCmd} DEPENDS ${_unityFile} ${_dependencySources}") + endif() + file (RELATIVE_PATH _prefixFileRelPath "${CMAKE_BINARY_DIR}" "${_prefixFile}") + get_filename_component(_prefixFileExt "${_prefixFile}" EXT) + if (_prefixFileExt MATCHES "^\\.c") + set (_comment "Generating ${_language} prefix source ${_prefixFileRelPath}") + else() + set (_comment "Generating ${_language} prefix header ${_prefixFileRelPath}") + endif() + # prevent pre-processing errors upon generating the prefix header when a target's generated include file does not yet exist + # we do not add a file-level dependency for the target's generated files though, because we only want to depend on their existence + # thus we make the prefix header generation depend on a custom helper target which triggers the generation of the files + set (_preTargetName "${_target}${COTIRE_PCH_TARGET_SUFFIX}_pre") + if (TARGET ${_preTargetName}) + # custom helper target has already been generated while processing a different language + list (APPEND _dependencySources ${_preTargetName}) + else() + get_target_property(_targetSourceFiles ${_target} SOURCES) + cotire_get_objects_with_property_on(_generatedSources GENERATED SOURCE ${_targetSourceFiles}) + if (_generatedSources) + add_custom_target("${_preTargetName}" DEPENDS ${_generatedSources}) + cotire_init_target("${_preTargetName}") + list (APPEND _dependencySources ${_preTargetName}) + endif() + endif() + add_custom_command( + OUTPUT "${_prefixFile}" "${_prefixFile}.log" + COMMAND ${_prefixCmd} + DEPENDS ${_unityFiles} ${_dependencySources} + COMMENT "${_comment}" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + VERBATIM) + list (APPEND ${_cmdsVar} COMMAND ${_prefixCmd}) + set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) +endfunction() + +function (cotire_setup_prefix_generation_from_unity_command _language _target _targetScript _prefixFile _unityFiles _cmdsVar) + set (_sourceFiles ${ARGN}) + if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang") + # GNU and Clang require indirect compilation of the prefix header to make them honor the system_header pragma + cotire_prefix_header_to_source_file_path(${_language} "${_prefixFile}" _prefixSourceFile) + else() + set (_prefixSourceFile "${_prefixFile}") + endif() + cotire_setup_prefix_generation_command( + ${_language} ${_target} "${_targetScript}" + "${_prefixSourceFile}" "${_unityFiles}" ${_cmdsVar} ${_sourceFiles}) + if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang") + # set up generation of a prefix source file which includes the prefix header + cotire_setup_combine_command(${_language} "${_targetScript}" "${_prefixFile}" _cmds ${_prefixSourceFile}) + endif() + set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) +endfunction() + +function (cotire_setup_prefix_generation_from_provided_command _language _target _targetScript _prefixFile _cmdsVar) + set (_prefixHeaderFiles ${ARGN}) + if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang") + # GNU and Clang require indirect compilation of the prefix header to make them honor the system_header pragma + cotire_prefix_header_to_source_file_path(${_language} "${_prefixFile}" _prefixSourceFile) + else() + set (_prefixSourceFile "${_prefixFile}") + endif() + cotire_setup_combine_command(${_language} "${_targetScript}" "${_prefixSourceFile}" _cmds ${_prefixHeaderFiles}) + if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang") + # set up generation of a prefix source file which includes the prefix header + cotire_setup_combine_command(${_language} "${_targetScript}" "${_prefixFile}" _cmds ${_prefixSourceFile}) + endif() + set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) +endfunction() + +function (cotire_init_cotire_target_properties _target) + get_property(_isSet TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER SET) + if (NOT _isSet) + set_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER TRUE) + endif() + get_property(_isSet TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD SET) + if (NOT _isSet) + set_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD TRUE) + endif() + get_property(_isSet TARGET ${_target} PROPERTY COTIRE_ADD_CLEAN SET) + if (NOT _isSet) + set_property(TARGET ${_target} PROPERTY COTIRE_ADD_CLEAN FALSE) + endif() + get_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH SET) + if (NOT _isSet) + set_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH "${CMAKE_SOURCE_DIR}") + cotire_check_is_path_relative_to("${CMAKE_BINARY_DIR}" _isRelative "${CMAKE_SOURCE_DIR}") + if (NOT _isRelative) + set_property(TARGET ${_target} APPEND PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH "${CMAKE_BINARY_DIR}") + endif() + endif() + get_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH SET) + if (NOT _isSet) + set_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH "") + endif() + get_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH SET) + if (NOT _isSet) + set_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH "") + endif() + get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_PRE_UNDEFS SET) + if (NOT _isSet) + set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_PRE_UNDEFS "") + endif() + get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_POST_UNDEFS SET) + if (NOT _isSet) + set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_POST_UNDEFS "") + endif() + get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_LINK_LIBRARIES_INIT SET) + if (NOT _isSet) + set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_LINK_LIBRARIES_INIT "COPY_UNITY") + endif() + get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES SET) + if (NOT _isSet) + if (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES) + set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES "${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES}") + else() + set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES "") + endif() + endif() +endfunction() + +function (cotire_make_target_message _target _languages _disableMsg _targetMsgVar) + get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER) + get_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD) + string (REPLACE ";" " " _languagesStr "${_languages}") + math (EXPR _numberOfExcludedFiles "${ARGC} - 4") + if (_numberOfExcludedFiles EQUAL 0) + set (_excludedStr "") + elseif (COTIRE_VERBOSE OR _numberOfExcludedFiles LESS 4) + string (REPLACE ";" ", " _excludedStr "excluding ${ARGN}") + else() + set (_excludedStr "excluding ${_numberOfExcludedFiles} files") + endif() + set (_targetMsg "") + if (NOT _languages) + set (_targetMsg "Target ${_target} cannot be cotired.") + if (_disableMsg) + set (_targetMsg "${_targetMsg} ${_disableMsg}") + endif() + elseif (NOT _targetUsePCH AND NOT _targetAddSCU) + set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build and precompiled header.") + if (_disableMsg) + set (_targetMsg "${_targetMsg} ${_disableMsg}") + endif() + elseif (NOT _targetUsePCH) + if (_excludedStr) + set (_targetMsg "${_languagesStr} target ${_target} cotired without precompiled header ${_excludedStr}.") + else() + set (_targetMsg "${_languagesStr} target ${_target} cotired without precompiled header.") + endif() + if (_disableMsg) + set (_targetMsg "${_targetMsg} ${_disableMsg}") + endif() + elseif (NOT _targetAddSCU) + if (_excludedStr) + set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build ${_excludedStr}.") + else() + set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build.") + endif() + else() + if (_excludedStr) + set (_targetMsg "${_languagesStr} target ${_target} cotired ${_excludedStr}.") + else() + set (_targetMsg "${_languagesStr} target ${_target} cotired.") + endif() + endif() + set (${_targetMsgVar} "${_targetMsg}" PARENT_SCOPE) +endfunction() + +function (cotire_choose_target_languages _target _targetLanguagesVar _wholeTargetVar) + set (_languages ${ARGN}) + set (_allSourceFiles "") + set (_allExcludedSourceFiles "") + set (_allCotiredSourceFiles "") + set (_targetLanguages "") + set (_pchEligibleTargetLanguages "") + get_target_property(_targetType ${_target} TYPE) + get_target_property(_targetSourceFiles ${_target} SOURCES) + get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER) + get_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD) + set (_disableMsg "") + foreach (_language ${_languages}) + get_target_property(_prefixHeader ${_target} COTIRE_${_language}_PREFIX_HEADER) + get_target_property(_unityBuildFile ${_target} COTIRE_${_language}_UNITY_SOURCE) + if (_prefixHeader OR _unityBuildFile) + message (STATUS "cotire: target ${_target} has already been cotired.") + set (${_targetLanguagesVar} "" PARENT_SCOPE) + return() + endif() + if (_targetUsePCH AND "${_language}" MATCHES "^C|CXX$") + cotire_check_precompiled_header_support("${_language}" "${_target}" _disableMsg) + if (_disableMsg) + set (_targetUsePCH FALSE) + endif() + endif() + set (_sourceFiles "") + set (_excludedSources "") + set (_cotiredSources "") + cotire_filter_language_source_files(${_language} ${_target} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles}) + if (_sourceFiles OR _excludedSources OR _cotiredSources) + list (APPEND _targetLanguages ${_language}) + endif() + if (_sourceFiles) + list (APPEND _allSourceFiles ${_sourceFiles}) + endif() + list (LENGTH _sourceFiles _numberOfSources) + if (NOT _numberOfSources LESS ${COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES}) + list (APPEND _pchEligibleTargetLanguages ${_language}) + endif() + if (_excludedSources) + list (APPEND _allExcludedSourceFiles ${_excludedSources}) + endif() + if (_cotiredSources) + list (APPEND _allCotiredSourceFiles ${_cotiredSources}) + endif() + endforeach() + set (_targetMsgLevel STATUS) + if (NOT _targetLanguages) + string (REPLACE ";" " or " _languagesStr "${_languages}") + set (_disableMsg "No ${_languagesStr} source files.") + set (_targetUsePCH FALSE) + set (_targetAddSCU FALSE) + endif() + if (_targetUsePCH) + if (_allCotiredSourceFiles) + cotire_get_source_file_property_values(_cotireTargets COTIRE_TARGET ${_allCotiredSourceFiles}) + list (REMOVE_DUPLICATES _cotireTargets) + string (REPLACE ";" ", " _cotireTargetsStr "${_cotireTargets}") + set (_disableMsg "Target sources already include a precompiled header for target(s) ${_cotireTargets}.") + set (_disableMsg "${_disableMsg} Set target property COTIRE_ENABLE_PRECOMPILED_HEADER to FALSE for targets ${_target},") + set (_disableMsg "${_disableMsg} ${_cotireTargetsStr} to get a workable build system.") + set (_targetMsgLevel SEND_ERROR) + set (_targetUsePCH FALSE) + elseif (NOT _pchEligibleTargetLanguages) + set (_disableMsg "Too few applicable sources.") + set (_targetUsePCH FALSE) + elseif (XCODE AND _allExcludedSourceFiles) + # for Xcode, we cannot apply the precompiled header to individual sources, only to the whole target + set (_disableMsg "Exclusion of source files not supported for generator Xcode.") + set (_targetUsePCH FALSE) + elseif (XCODE AND "${_targetType}" STREQUAL "OBJECT_LIBRARY") + # for Xcode, we cannot apply the required PRE_BUILD action to generate the prefix header to an OBJECT_LIBRARY target + set (_disableMsg "Required PRE_BUILD action not supported for OBJECT_LIBRARY targets for generator Xcode.") + set (_targetUsePCH FALSE) + endif() + endif() + set_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER ${_targetUsePCH}) + set_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD ${_targetAddSCU}) + cotire_make_target_message(${_target} "${_targetLanguages}" "${_disableMsg}" _targetMsg ${_allExcludedSourceFiles}) + if (_targetMsg) + if (NOT DEFINED COTIREMSG_${_target}) + set (COTIREMSG_${_target} "") + endif() + if (COTIRE_VERBOSE OR NOT "${_targetMsgLevel}" STREQUAL "STATUS" OR + NOT "${COTIREMSG_${_target}}" STREQUAL "${_targetMsg}") + # cache message to avoid redundant messages on re-configure + set (COTIREMSG_${_target} "${_targetMsg}" CACHE INTERNAL "${_target} cotire message.") + message (${_targetMsgLevel} "${_targetMsg}") + endif() + endif() + list (LENGTH _targetLanguages _numberOfLanguages) + if (_numberOfLanguages GREATER 1 OR _allExcludedSourceFiles) + set (${_wholeTargetVar} FALSE PARENT_SCOPE) + else() + set (${_wholeTargetVar} TRUE PARENT_SCOPE) + endif() + set (${_targetLanguagesVar} ${_targetLanguages} PARENT_SCOPE) +endfunction() + +function (cotire_compute_unity_max_number_of_includes _target _maxIncludesVar) + set (_sourceFiles ${ARGN}) + get_target_property(_maxIncludes ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES) + if (_maxIncludes MATCHES "(-j|--parallel|--jobs) ?([0-9]*)") + set (_numberOfThreads "${CMAKE_MATCH_2}") + if (NOT _numberOfThreads) + # use all available cores + ProcessorCount(_numberOfThreads) + endif() + list (LENGTH _sourceFiles _numberOfSources) + math (EXPR _maxIncludes "(${_numberOfSources} + ${_numberOfThreads} - 1) / ${_numberOfThreads}") + elseif (NOT _maxIncludes MATCHES "[0-9]+") + set (_maxIncludes 0) + endif() + if (COTIRE_DEBUG) + message (STATUS "${_target} unity source max includes: ${_maxIncludes}") + endif() + set (${_maxIncludesVar} ${_maxIncludes} PARENT_SCOPE) +endfunction() + +function (cotire_process_target_language _language _configurations _target _wholeTarget _cmdsVar) + set (${_cmdsVar} "" PARENT_SCOPE) + get_target_property(_targetSourceFiles ${_target} SOURCES) + set (_sourceFiles "") + set (_excludedSources "") + set (_cotiredSources "") + cotire_filter_language_source_files(${_language} ${_target} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles}) + if (NOT _sourceFiles AND NOT _cotiredSources) + return() + endif() + set (_cmds "") + # check for user provided unity source file list + get_property(_unitySourceFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE_INIT) + if (NOT _unitySourceFiles) + set (_unitySourceFiles ${_sourceFiles} ${_cotiredSources}) + endif() + cotire_generate_target_script( + ${_language} "${_configurations}" ${_target} _targetScript _targetConfigScript ${_unitySourceFiles}) + # set up unity files for parallel compilation + cotire_compute_unity_max_number_of_includes(${_target} _maxIncludes ${_unitySourceFiles}) + cotire_make_unity_source_file_paths(${_language} ${_target} ${_maxIncludes} _unityFiles ${_unitySourceFiles}) + list (LENGTH _unityFiles _numberOfUnityFiles) + if (_numberOfUnityFiles EQUAL 0) + return() + elseif (_numberOfUnityFiles GREATER 1) + cotire_setup_unity_generation_commands( + ${_language} ${_target} "${_targetScript}" "${_targetConfigScript}" "${_unityFiles}" _cmds ${_unitySourceFiles}) + endif() + # set up single unity file for prefix header generation + cotire_make_single_unity_source_file_path(${_language} ${_target} _unityFile) + cotire_setup_unity_generation_commands( + ${_language} ${_target} "${_targetScript}" "${_targetConfigScript}" "${_unityFile}" _cmds ${_unitySourceFiles}) + cotire_make_prefix_file_path(${_language} ${_target} _prefixFile) + # set up prefix header + if (_prefixFile) + # check for user provided prefix header files + get_property(_prefixHeaderFiles TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER_INIT) + if (_prefixHeaderFiles) + cotire_setup_prefix_generation_from_provided_command( + ${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" _cmds ${_prefixHeaderFiles}) + else() + cotire_setup_prefix_generation_from_unity_command( + ${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" "${_unityFile}" _cmds ${_unitySourceFiles}) + endif() + # check if selected language has enough sources at all + list (LENGTH _sourceFiles _numberOfSources) + if (_numberOfSources LESS ${COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES}) + set (_targetUsePCH FALSE) + else() + get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER) + endif() + if (_targetUsePCH) + cotire_make_pch_file_path(${_language} ${_target} _pchFile) + if (_pchFile) + # first file in _sourceFiles is passed as the host file + cotire_setup_pch_file_compilation( + ${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" "${_pchFile}" ${_sourceFiles}) + cotire_setup_pch_file_inclusion( + ${_language} ${_target} ${_wholeTarget} "${_prefixFile}" "${_pchFile}" ${_sourceFiles}) + endif() + elseif (_prefixHeaderFiles) + # user provided prefix header must be included unconditionally + cotire_setup_prefix_file_inclusion(${_language} ${_target} "${_prefixFile}" ${_sourceFiles}) + endif() + endif() + # mark target as cotired for language + set_property(TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE "${_unityFiles}") + if (_prefixFile) + set_property(TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER "${_prefixFile}") + if (_targetUsePCH AND _pchFile) + set_property(TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER "${_pchFile}") + endif() + endif() + set (${_cmdsVar} ${_cmds} PARENT_SCOPE) +endfunction() + +function (cotire_setup_clean_target _target) + set (_cleanTargetName "${_target}${COTIRE_CLEAN_TARGET_SUFFIX}") + if (NOT TARGET "${_cleanTargetName}") + cotire_set_cmd_to_prologue(_cmds) + get_filename_component(_outputDir "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" ABSOLUTE) + list (APPEND _cmds -P "${COTIRE_CMAKE_MODULE_FILE}" "cleanup" "${_outputDir}" "${COTIRE_INTDIR}" "${_target}") + add_custom_target(${_cleanTargetName} + COMMAND ${_cmds} + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" + COMMENT "Cleaning up target ${_target} cotire generated files" + VERBATIM) + cotire_init_target("${_cleanTargetName}") + endif() +endfunction() + +function (cotire_setup_pch_target _languages _configurations _target) + if ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") + # for makefile based generators, we add a custom target to trigger the generation of the cotire related files + set (_dependsFiles "") + foreach (_language ${_languages}) + set (_props COTIRE_${_language}_PREFIX_HEADER COTIRE_${_language}_UNITY_SOURCE) + if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") + # Visual Studio and Intel only create precompiled header as a side effect + list (INSERT _props 0 COTIRE_${_language}_PRECOMPILED_HEADER) + endif() + cotire_get_first_set_property_value(_dependsFile TARGET ${_target} ${_props}) + if (_dependsFile) + list (APPEND _dependsFiles "${_dependsFile}") + endif() + endforeach() + if (_dependsFiles) + set (_pchTargetName "${_target}${COTIRE_PCH_TARGET_SUFFIX}") + add_custom_target("${_pchTargetName}" DEPENDS ${_dependsFiles}) + cotire_init_target("${_pchTargetName}") + cotire_add_to_pch_all_target(${_pchTargetName}) + endif() + else() + # for other generators, we add the "clean all" target to clean up the precompiled header + cotire_setup_clean_all_target() + endif() +endfunction() + +function (cotire_collect_unity_target_sources _target _languages _unityTargetSourcesVar) + get_target_property(_targetSourceFiles ${_target} SOURCES) + set (_unityTargetSources ${_targetSourceFiles}) + foreach (_language ${_languages}) + get_property(_unityFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE) + if (_unityFiles) + # remove source files that are included in the unity source + set (_sourceFiles "") + set (_excludedSources "") + set (_cotiredSources "") + cotire_filter_language_source_files(${_language} ${_target} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles}) + if (_sourceFiles OR _cotiredSources) + list (REMOVE_ITEM _unityTargetSources ${_sourceFiles} ${_cotiredSources}) + endif() + # add unity source files instead + list (APPEND _unityTargetSources ${_unityFiles}) + endif() + endforeach() + set (${_unityTargetSourcesVar} ${_unityTargetSources} PARENT_SCOPE) +endfunction() + +function (cotire_setup_unity_target_pch_usage _languages _target) + foreach (_language ${_languages}) + get_property(_unityFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE) + if (_unityFiles) + get_property(_userPrefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER_INIT) + get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER) + if (_userPrefixFile AND _prefixFile) + # user provided prefix header must be included unconditionally by unity sources + cotire_setup_prefix_file_inclusion(${_language} ${_target} "${_prefixFile}" ${_unityFiles}) + endif() + endif() + endforeach() +endfunction() + +function (cotire_setup_unity_build_target _languages _configurations _target) + get_target_property(_unityTargetName ${_target} COTIRE_UNITY_TARGET_NAME) + if (NOT _unityTargetName) + set (_unityTargetName "${_target}${COTIRE_UNITY_BUILD_TARGET_SUFFIX}") + endif() + # determine unity target sub type + get_target_property(_targetType ${_target} TYPE) + if ("${_targetType}" STREQUAL "EXECUTABLE") + set (_unityTargetSubType "") + elseif (_targetType MATCHES "(STATIC|SHARED|MODULE|OBJECT)_LIBRARY") + set (_unityTargetSubType "${CMAKE_MATCH_1}") + else() + message (WARNING "cotire: target ${_target} has unknown target type ${_targetType}.") + return() + endif() + # determine unity target sources + set (_unityTargetSources "") + cotire_collect_unity_target_sources(${_target} "${_languages}" _unityTargetSources) + # handle automatic Qt processing + get_target_property(_targetAutoMoc ${_target} AUTOMOC) + get_target_property(_targetAutoUic ${_target} AUTOUIC) + get_target_property(_targetAutoRcc ${_target} AUTORCC) + if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc) + # if the original target sources are subject to CMake's automatic Qt processing, + # also include implicitly generated _automoc.cpp file + list (APPEND _unityTargetSources "${_target}_automoc.cpp") + set_property (SOURCE "${_target}_automoc.cpp" PROPERTY GENERATED TRUE) + endif() + # prevent AUTOMOC, AUTOUIC and AUTORCC properties from being set when the unity target is created + set (CMAKE_AUTOMOC OFF) + set (CMAKE_AUTOUIC OFF) + set (CMAKE_AUTORCC OFF) + if (COTIRE_DEBUG) + message (STATUS "add target ${_targetType} ${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources}") + endif() + # generate unity target + if ("${_targetType}" STREQUAL "EXECUTABLE") + add_executable(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources}) + else() + add_library(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources}) + endif() + if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc) + # depend on the original target's implicity generated _automoc target + add_dependencies(${_unityTargetName} ${_target}_automoc) + endif() + # copy output location properties + set (_outputDirProperties + ARCHIVE_OUTPUT_DIRECTORY ARCHIVE_OUTPUT_DIRECTORY_ + LIBRARY_OUTPUT_DIRECTORY LIBRARY_OUTPUT_DIRECTORY_ + RUNTIME_OUTPUT_DIRECTORY RUNTIME_OUTPUT_DIRECTORY_) + if (COTIRE_UNITY_OUTPUT_DIRECTORY) + set (_setDefaultOutputDir TRUE) + if (IS_ABSOLUTE "${COTIRE_UNITY_OUTPUT_DIRECTORY}") + set (_outputDir "${COTIRE_UNITY_OUTPUT_DIRECTORY}") + else() + # append relative COTIRE_UNITY_OUTPUT_DIRECTORY to target's actual output directory + cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} ${_outputDirProperties}) + cotire_resolve_config_properites("${_configurations}" _properties ${_outputDirProperties}) + foreach (_property ${_properties}) + get_property(_outputDir TARGET ${_target} PROPERTY ${_property}) + if (_outputDir) + get_filename_component(_outputDir "${_outputDir}/${COTIRE_UNITY_OUTPUT_DIRECTORY}" ABSOLUTE) + set_property(TARGET ${_unityTargetName} PROPERTY ${_property} "${_outputDir}") + set (_setDefaultOutputDir FALSE) + endif() + endforeach() + if (_setDefaultOutputDir) + get_filename_component(_outputDir "${CMAKE_CURRENT_BINARY_DIR}/${COTIRE_UNITY_OUTPUT_DIRECTORY}" ABSOLUTE) + endif() + endif() + if (_setDefaultOutputDir) + set_target_properties(${_unityTargetName} PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY "${_outputDir}" + LIBRARY_OUTPUT_DIRECTORY "${_outputDir}" + RUNTIME_OUTPUT_DIRECTORY "${_outputDir}") + endif() + else() + cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + ${_outputDirProperties}) + endif() + # copy output name + cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + ARCHIVE_OUTPUT_NAME ARCHIVE_OUTPUT_NAME_ + LIBRARY_OUTPUT_NAME LIBRARY_OUTPUT_NAME_ + OUTPUT_NAME OUTPUT_NAME_ + RUNTIME_OUTPUT_NAME RUNTIME_OUTPUT_NAME_ + PREFIX _POSTFIX SUFFIX + IMPORT_PREFIX IMPORT_SUFFIX) + # copy compile stuff + cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + COMPILE_DEFINITIONS COMPILE_DEFINITIONS_ + COMPILE_FLAGS COMPILE_OPTIONS + Fortran_FORMAT Fortran_MODULE_DIRECTORY + INCLUDE_DIRECTORIES + INTERPROCEDURAL_OPTIMIZATION INTERPROCEDURAL_OPTIMIZATION_ + POSITION_INDEPENDENT_CODE + C_COMPILER_LAUNCHER CXX_COMPILER_LAUNCHER + C_INCLUDE_WHAT_YOU_USE CXX_INCLUDE_WHAT_YOU_USE + C_VISIBILITY_PRESET CXX_VISIBILITY_PRESET VISIBILITY_INLINES_HIDDEN) + # copy compile features + cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + C_EXTENSIONS C_STANDARD C_STANDARD_REQUIRED + CXX_EXTENSIONS CXX_STANDARD CXX_STANDARD_REQUIRED + COMPILE_FEATURES) + # copy interface stuff + cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + COMPATIBLE_INTERFACE_BOOL COMPATIBLE_INTERFACE_NUMBER_MAX COMPATIBLE_INTERFACE_NUMBER_MIN + COMPATIBLE_INTERFACE_STRING + INTERFACE_COMPILE_DEFINITIONS INTERFACE_COMPILE_FEATURES INTERFACE_COMPILE_OPTIONS + INTERFACE_INCLUDE_DIRECTORIES INTERFACE_SOURCES + INTERFACE_POSITION_INDEPENDENT_CODE INTERFACE_SYSTEM_INCLUDE_DIRECTORIES + INTERFACE_AUTOUIC_OPTIONS NO_SYSTEM_FROM_IMPORTED) + # copy link stuff + cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + BUILD_WITH_INSTALL_RPATH INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH + LINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED + LINK_FLAGS LINK_FLAGS_ + LINK_INTERFACE_LIBRARIES LINK_INTERFACE_LIBRARIES_ + LINK_INTERFACE_MULTIPLICITY LINK_INTERFACE_MULTIPLICITY_ + LINK_SEARCH_START_STATIC LINK_SEARCH_END_STATIC + STATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_ + NO_SONAME SOVERSION VERSION) + # copy cmake stuff + cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + IMPLICIT_DEPENDS_INCLUDE_TRANSFORM RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK) + # copy Apple platform specific stuff + cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + BUNDLE BUNDLE_EXTENSION FRAMEWORK FRAMEWORK_VERSION INSTALL_NAME_DIR + MACOSX_BUNDLE MACOSX_BUNDLE_INFO_PLIST MACOSX_FRAMEWORK_INFO_PLIST MACOSX_RPATH + OSX_ARCHITECTURES OSX_ARCHITECTURES_ PRIVATE_HEADER PUBLIC_HEADER RESOURCE XCTEST) + # copy Windows platform specific stuff + cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + GNUtoMS + COMPILE_PDB_NAME COMPILE_PDB_NAME_ + COMPILE_PDB_OUTPUT_DIRECTORY COMPILE_PDB_OUTPUT_DIRECTORY_ + PDB_NAME PDB_NAME_ PDB_OUTPUT_DIRECTORY PDB_OUTPUT_DIRECTORY_ + VS_DESKTOP_EXTENSIONS_VERSION VS_DOTNET_REFERENCES VS_DOTNET_TARGET_FRAMEWORK_VERSION + VS_GLOBAL_KEYWORD VS_GLOBAL_PROJECT_TYPES VS_GLOBAL_ROOTNAMESPACE + VS_IOT_EXTENSIONS_VERSION VS_IOT_STARTUP_TASK + VS_KEYWORD VS_MOBILE_EXTENSIONS_VERSION + VS_SCC_AUXPATH VS_SCC_LOCALPATH VS_SCC_PROJECTNAME VS_SCC_PROVIDER + VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION + VS_WINRT_COMPONENT VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES + WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS) + # copy Android platform specific stuff + cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + ANDROID_API ANDROID_API_MIN ANDROID_GUI + ANDROID_ANT_ADDITIONAL_OPTIONS ANDROID_ARCH ANDROID_ASSETS_DIRECTORIES + ANDROID_JAR_DEPENDENCIES ANDROID_JAR_DIRECTORIES ANDROID_JAVA_SOURCE_DIR + ANDROID_NATIVE_LIB_DEPENDENCIES ANDROID_NATIVE_LIB_DIRECTORIES + ANDROID_PROCESS_MAX ANDROID_PROGUARD ANDROID_PROGUARD_CONFIG_PATH + ANDROID_SECURE_PROPS_PATH ANDROID_SKIP_ANT_STEP ANDROID_STL_TYPE) + # use output name from original target + get_target_property(_targetOutputName ${_unityTargetName} OUTPUT_NAME) + if (NOT _targetOutputName) + set_property(TARGET ${_unityTargetName} PROPERTY OUTPUT_NAME "${_target}") + endif() + # use export symbol from original target + cotire_get_target_export_symbol("${_target}" _defineSymbol) + if (_defineSymbol) + set_property(TARGET ${_unityTargetName} PROPERTY DEFINE_SYMBOL "${_defineSymbol}") + if ("${_targetType}" STREQUAL "EXECUTABLE") + set_property(TARGET ${_unityTargetName} PROPERTY ENABLE_EXPORTS TRUE) + endif() + endif() + cotire_init_target(${_unityTargetName}) + cotire_add_to_unity_all_target(${_unityTargetName}) + set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_TARGET_NAME "${_unityTargetName}") +endfunction(cotire_setup_unity_build_target) + +function (cotire_target _target) + set(_options "") + set(_oneValueArgs "") + set(_multiValueArgs LANGUAGES CONFIGURATIONS) + cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) + if (NOT _option_LANGUAGES) + get_property (_option_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) + endif() + if (NOT _option_CONFIGURATIONS) + cotire_get_configuration_types(_option_CONFIGURATIONS) + endif() + # trivial checks + get_target_property(_imported ${_target} IMPORTED) + if (_imported) + message (WARNING "cotire: imported target ${_target} cannot be cotired.") + return() + endif() + # resolve alias + get_target_property(_aliasName ${_target} ALIASED_TARGET) + if (_aliasName) + if (COTIRE_DEBUG) + message (STATUS "${_target} is an alias. Applying cotire to aliased target ${_aliasName} instead.") + endif() + set (_target ${_aliasName}) + endif() + # check if target needs to be cotired for build type + # when using configuration types, the test is performed at build time + cotire_init_cotire_target_properties(${_target}) + if (NOT CMAKE_CONFIGURATION_TYPES) + if (CMAKE_BUILD_TYPE) + list (FIND _option_CONFIGURATIONS "${CMAKE_BUILD_TYPE}" _index) + else() + list (FIND _option_CONFIGURATIONS "None" _index) + endif() + if (_index EQUAL -1) + if (COTIRE_DEBUG) + message (STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} not cotired (${_option_CONFIGURATIONS})") + endif() + return() + endif() + endif() + # when not using configuration types, immediately create cotire intermediate dir + if (NOT CMAKE_CONFIGURATION_TYPES) + cotire_get_intermediate_dir(_baseDir) + file (MAKE_DIRECTORY "${_baseDir}") + endif() + # choose languages that apply to the target + cotire_choose_target_languages("${_target}" _targetLanguages _wholeTarget ${_option_LANGUAGES}) + if (NOT _targetLanguages) + return() + endif() + set (_cmds "") + foreach (_language ${_targetLanguages}) + cotire_process_target_language("${_language}" "${_option_CONFIGURATIONS}" ${_target} ${_wholeTarget} _cmd) + if (_cmd) + list (APPEND _cmds ${_cmd}) + endif() + endforeach() + get_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD) + if (_targetAddSCU) + cotire_setup_unity_build_target("${_targetLanguages}" "${_option_CONFIGURATIONS}" ${_target}) + endif() + get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER) + if (_targetUsePCH) + cotire_setup_target_pch_usage("${_targetLanguages}" ${_target} ${_wholeTarget} ${_cmds}) + cotire_setup_pch_target("${_targetLanguages}" "${_option_CONFIGURATIONS}" ${_target}) + if (_targetAddSCU) + cotire_setup_unity_target_pch_usage("${_targetLanguages}" ${_target}) + endif() + endif() + get_target_property(_targetAddCleanTarget ${_target} COTIRE_ADD_CLEAN) + if (_targetAddCleanTarget) + cotire_setup_clean_target(${_target}) + endif() +endfunction(cotire_target) + +function (cotire_map_libraries _strategy _mappedLibrariesVar) + set (_mappedLibraries "") + foreach (_library ${ARGN}) + if (TARGET "${_library}" AND "${_strategy}" MATCHES "COPY_UNITY") + # use target's corresponding unity target, if available + get_target_property(_libraryUnityTargetName ${_library} COTIRE_UNITY_TARGET_NAME) + if (TARGET "${_libraryUnityTargetName}") + list (APPEND _mappedLibraries "${_libraryUnityTargetName}") + else() + list (APPEND _mappedLibraries "${_library}") + endif() + else() + list (APPEND _mappedLibraries "${_library}") + endif() + endforeach() + list (REMOVE_DUPLICATES _mappedLibraries) + set (${_mappedLibrariesVar} ${_mappedLibraries} PARENT_SCOPE) +endfunction() + +function (cotire_target_link_libraries _target) + get_target_property(_unityTargetName ${_target} COTIRE_UNITY_TARGET_NAME) + if (TARGET "${_unityTargetName}") + get_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT) + if (COTIRE_DEBUG) + message (STATUS "unity target ${_unityTargetName} link strategy: ${_linkLibrariesStrategy}") + endif() + if ("${_linkLibrariesStrategy}" MATCHES "^(COPY|COPY_UNITY)$") + set (_unityLinkLibraries "") + get_target_property(_linkLibraries ${_target} LINK_LIBRARIES) + if (_linkLibraries) + list (APPEND _unityLinkLibraries ${_linkLibraries}) + endif() + get_target_property(_interfaceLinkLibraries ${_target} INTERFACE_LINK_LIBRARIES) + if (_interfaceLinkLibraries) + list (APPEND _unityLinkLibraries ${_interfaceLinkLibraries}) + endif() + cotire_map_libraries("${_linkLibrariesStrategy}" _unityLinkLibraries ${_unityLinkLibraries}) + if (COTIRE_DEBUG) + message (STATUS "unity target ${_unityTargetName} libraries: ${_unityLinkLibraries}") + endif() + if (_unityLinkLibraries) + target_link_libraries(${_unityTargetName} ${_unityLinkLibraries}) + endif() + endif() + endif() +endfunction(cotire_target_link_libraries) + +function (cotire_cleanup _binaryDir _cotireIntermediateDirName _targetName) + if (_targetName) + file (GLOB_RECURSE _cotireFiles "${_binaryDir}/${_targetName}*.*") + else() + file (GLOB_RECURSE _cotireFiles "${_binaryDir}/*.*") + endif() + # filter files in intermediate directory + set (_filesToRemove "") + foreach (_file ${_cotireFiles}) + get_filename_component(_dir "${_file}" DIRECTORY) + get_filename_component(_dirName "${_dir}" NAME) + if ("${_dirName}" STREQUAL "${_cotireIntermediateDirName}") + list (APPEND _filesToRemove "${_file}") + endif() + endforeach() + if (_filesToRemove) + if (COTIRE_VERBOSE) + message (STATUS "cleaning up ${_filesToRemove}") + endif() + file (REMOVE ${_filesToRemove}) + endif() +endfunction() + +function (cotire_init_target _targetName) + if (COTIRE_TARGETS_FOLDER) + set_target_properties(${_targetName} PROPERTIES FOLDER "${COTIRE_TARGETS_FOLDER}") + endif() + set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_ALL TRUE) + if (MSVC_IDE) + set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE) + endif() +endfunction() + +function (cotire_add_to_pch_all_target _pchTargetName) + set (_targetName "${COTIRE_PCH_ALL_TARGET_NAME}") + if (NOT TARGET "${_targetName}") + add_custom_target("${_targetName}" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" + VERBATIM) + cotire_init_target("${_targetName}") + endif() + cotire_setup_clean_all_target() + add_dependencies(${_targetName} ${_pchTargetName}) +endfunction() + +function (cotire_add_to_unity_all_target _unityTargetName) + set (_targetName "${COTIRE_UNITY_BUILD_ALL_TARGET_NAME}") + if (NOT TARGET "${_targetName}") + add_custom_target("${_targetName}" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" + VERBATIM) + cotire_init_target("${_targetName}") + endif() + cotire_setup_clean_all_target() + add_dependencies(${_targetName} ${_unityTargetName}) +endfunction() + +function (cotire_setup_clean_all_target) + set (_targetName "${COTIRE_CLEAN_ALL_TARGET_NAME}") + if (NOT TARGET "${_targetName}") + cotire_set_cmd_to_prologue(_cmds) + list (APPEND _cmds -P "${COTIRE_CMAKE_MODULE_FILE}" "cleanup" "${CMAKE_BINARY_DIR}" "${COTIRE_INTDIR}") + add_custom_target(${_targetName} + COMMAND ${_cmds} + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" + COMMENT "Cleaning up all cotire generated files" + VERBATIM) + cotire_init_target("${_targetName}") + endif() +endfunction() + +function (cotire) + set(_options "") + set(_oneValueArgs "") + set(_multiValueArgs LANGUAGES CONFIGURATIONS) + cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) + set (_targets ${_option_UNPARSED_ARGUMENTS}) + foreach (_target ${_targets}) + if (TARGET ${_target}) + cotire_target(${_target} LANGUAGES ${_option_LANGUAGES} CONFIGURATIONS ${_option_CONFIGURATIONS}) + else() + message (WARNING "cotire: ${_target} is not a target.") + endif() + endforeach() + foreach (_target ${_targets}) + if (TARGET ${_target}) + cotire_target_link_libraries(${_target}) + endif() + endforeach() +endfunction() + +if (CMAKE_SCRIPT_MODE_FILE) + + # cotire is being run in script mode + # locate -P on command args + set (COTIRE_ARGC -1) + foreach (_index RANGE ${CMAKE_ARGC}) + if (COTIRE_ARGC GREATER -1) + set (COTIRE_ARGV${COTIRE_ARGC} "${CMAKE_ARGV${_index}}") + math (EXPR COTIRE_ARGC "${COTIRE_ARGC} + 1") + elseif ("${CMAKE_ARGV${_index}}" STREQUAL "-P") + set (COTIRE_ARGC 0) + endif() + endforeach() + + # include target script if available + if ("${COTIRE_ARGV2}" MATCHES "\\.cmake$") + # the included target scripts sets up additional variables relating to the target (e.g., COTIRE_TARGET_SOURCES) + include("${COTIRE_ARGV2}") + endif() + + if (COTIRE_DEBUG) + message (STATUS "${COTIRE_ARGV0} ${COTIRE_ARGV1} ${COTIRE_ARGV2} ${COTIRE_ARGV3} ${COTIRE_ARGV4} ${COTIRE_ARGV5}") + endif() + + if (NOT COTIRE_BUILD_TYPE) + set (COTIRE_BUILD_TYPE "None") + endif() + string (TOUPPER "${COTIRE_BUILD_TYPE}" _upperConfig) + set (_includeDirs ${COTIRE_TARGET_INCLUDE_DIRECTORIES_${_upperConfig}}) + set (_systemIncludeDirs ${COTIRE_TARGET_SYSTEM_INCLUDE_DIRECTORIES_${_upperConfig}}) + set (_compileDefinitions ${COTIRE_TARGET_COMPILE_DEFINITIONS_${_upperConfig}}) + set (_compileFlags ${COTIRE_TARGET_COMPILE_FLAGS_${_upperConfig}}) + # check if target has been cotired for actual build type COTIRE_BUILD_TYPE + list (FIND COTIRE_TARGET_CONFIGURATION_TYPES "${COTIRE_BUILD_TYPE}" _index) + if (_index GREATER -1) + set (_sources ${COTIRE_TARGET_SOURCES}) + set (_sourcesDefinitions ${COTIRE_TARGET_SOURCES_COMPILE_DEFINITIONS_${_upperConfig}}) + else() + if (COTIRE_DEBUG) + message (STATUS "COTIRE_BUILD_TYPE=${COTIRE_BUILD_TYPE} not cotired (${COTIRE_TARGET_CONFIGURATION_TYPES})") + endif() + set (_sources "") + set (_sourcesDefinitions "") + endif() + set (_targetPreUndefs ${COTIRE_TARGET_PRE_UNDEFS}) + set (_targetPostUndefs ${COTIRE_TARGET_POST_UNDEFS}) + set (_sourcesPreUndefs ${COTIRE_TARGET_SOURCES_PRE_UNDEFS}) + set (_sourcesPostUndefs ${COTIRE_TARGET_SOURCES_POST_UNDEFS}) + + if ("${COTIRE_ARGV1}" STREQUAL "unity") + + if (XCODE) + # executing pre-build action under Xcode, check dependency on target script + set (_dependsOption DEPENDS "${COTIRE_ARGV2}") + else() + # executing custom command, no need to re-check for dependencies + set (_dependsOption "") + endif() + + cotire_select_unity_source_files("${COTIRE_ARGV3}" _sources ${_sources}) + + cotire_generate_unity_source( + "${COTIRE_ARGV3}" ${_sources} + LANGUAGE "${COTIRE_TARGET_LANGUAGE}" + SOURCES_COMPILE_DEFINITIONS ${_sourcesDefinitions} + PRE_UNDEFS ${_targetPreUndefs} + POST_UNDEFS ${_targetPostUndefs} + SOURCES_PRE_UNDEFS ${_sourcesPreUndefs} + SOURCES_POST_UNDEFS ${_sourcesPostUndefs} + ${_dependsOption}) + + elseif ("${COTIRE_ARGV1}" STREQUAL "prefix") + + if (XCODE) + # executing pre-build action under Xcode, check dependency on unity file and prefix dependencies + set (_dependsOption DEPENDS "${COTIRE_ARGV4}" ${COTIRE_TARGET_PREFIX_DEPENDS}) + else() + # executing custom command, no need to re-check for dependencies + set (_dependsOption "") + endif() + + set (_files "") + foreach (_index RANGE 4 ${COTIRE_ARGC}) + if (COTIRE_ARGV${_index}) + list (APPEND _files "${COTIRE_ARGV${_index}}") + endif() + endforeach() + + cotire_generate_prefix_header( + "${COTIRE_ARGV3}" ${_files} + COMPILER_EXECUTABLE "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}" + COMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1} + COMPILER_ID "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}" + COMPILER_VERSION "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_VERSION}" + LANGUAGE "${COTIRE_TARGET_LANGUAGE}" + IGNORE_PATH "${COTIRE_TARGET_IGNORE_PATH};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH}" + INCLUDE_PATH ${COTIRE_TARGET_INCLUDE_PATH} + IGNORE_EXTENSIONS "${CMAKE_${COTIRE_TARGET_LANGUAGE}_SOURCE_FILE_EXTENSIONS};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS}" + INCLUDE_PRIORITY_PATH ${COTIRE_TARGET_INCLUDE_PRIORITY_PATH} + INCLUDE_DIRECTORIES ${_includeDirs} + SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs} + COMPILE_DEFINITIONS ${_compileDefinitions} + COMPILE_FLAGS ${_compileFlags} + ${_dependsOption}) + + elseif ("${COTIRE_ARGV1}" STREQUAL "precompile") + + set (_files "") + foreach (_index RANGE 5 ${COTIRE_ARGC}) + if (COTIRE_ARGV${_index}) + list (APPEND _files "${COTIRE_ARGV${_index}}") + endif() + endforeach() + + cotire_precompile_prefix_header( + "${COTIRE_ARGV3}" "${COTIRE_ARGV4}" "${COTIRE_ARGV5}" + COMPILER_EXECUTABLE "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}" + COMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1} + COMPILER_ID "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}" + COMPILER_VERSION "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_VERSION}" + LANGUAGE "${COTIRE_TARGET_LANGUAGE}" + INCLUDE_DIRECTORIES ${_includeDirs} + SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs} + COMPILE_DEFINITIONS ${_compileDefinitions} + COMPILE_FLAGS ${_compileFlags}) + + elseif ("${COTIRE_ARGV1}" STREQUAL "combine") + + if (COTIRE_TARGET_LANGUAGE) + set (_combinedFile "${COTIRE_ARGV3}") + set (_startIndex 4) + else() + set (_combinedFile "${COTIRE_ARGV2}") + set (_startIndex 3) + endif() + set (_files "") + foreach (_index RANGE ${_startIndex} ${COTIRE_ARGC}) + if (COTIRE_ARGV${_index}) + list (APPEND _files "${COTIRE_ARGV${_index}}") + endif() + endforeach() + + if (XCODE) + # executing pre-build action under Xcode, check dependency on files to be combined + set (_dependsOption DEPENDS ${_files}) + else() + # executing custom command, no need to re-check for dependencies + set (_dependsOption "") + endif() + + if (COTIRE_TARGET_LANGUAGE) + cotire_generate_unity_source( + "${_combinedFile}" ${_files} + LANGUAGE "${COTIRE_TARGET_LANGUAGE}" + ${_dependsOption}) + else() + cotire_generate_unity_source("${_combinedFile}" ${_files} ${_dependsOption}) + endif() + + elseif ("${COTIRE_ARGV1}" STREQUAL "cleanup") + + cotire_cleanup("${COTIRE_ARGV2}" "${COTIRE_ARGV3}" "${COTIRE_ARGV4}") + + else() + message (FATAL_ERROR "cotire: unknown command \"${COTIRE_ARGV1}\".") + endif() + +else() + + # cotire is being run in include mode + # set up all variable and property definitions + + if (NOT DEFINED COTIRE_DEBUG_INIT) + if (DEFINED COTIRE_DEBUG) + set (COTIRE_DEBUG_INIT ${COTIRE_DEBUG}) + else() + set (COTIRE_DEBUG_INIT FALSE) + endif() + endif() + option (COTIRE_DEBUG "Enable cotire debugging output?" ${COTIRE_DEBUG_INIT}) + + if (NOT DEFINED COTIRE_VERBOSE_INIT) + if (DEFINED COTIRE_VERBOSE) + set (COTIRE_VERBOSE_INIT ${COTIRE_VERBOSE}) + else() + set (COTIRE_VERBOSE_INIT FALSE) + endif() + endif() + option (COTIRE_VERBOSE "Enable cotire verbose output?" ${COTIRE_VERBOSE_INIT}) + + set (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS "inc;inl;ipp" CACHE STRING + "Ignore headers with the listed file extensions from the generated prefix header.") + + set (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH "" CACHE STRING + "Ignore headers from these directories when generating the prefix header.") + + set (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS "m;mm" CACHE STRING + "Ignore sources with the listed file extensions from the generated unity source.") + + set (COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES "3" CACHE STRING + "Minimum number of sources in target required to enable use of precompiled header.") + + if (NOT DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT) + if (DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES) + set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT ${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES}) + elseif ("${CMAKE_GENERATOR}" MATCHES "JOM|Ninja|Visual Studio") + # enable parallelization for generators that run multiple jobs by default + set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT "-j") + else() + set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT "0") + endif() + endif() + set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES "${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT}" CACHE STRING + "Maximum number of source files to include in a single unity source file.") + + if (NOT COTIRE_PREFIX_HEADER_FILENAME_SUFFIX) + set (COTIRE_PREFIX_HEADER_FILENAME_SUFFIX "_prefix") + endif() + if (NOT COTIRE_UNITY_SOURCE_FILENAME_SUFFIX) + set (COTIRE_UNITY_SOURCE_FILENAME_SUFFIX "_unity") + endif() + if (NOT COTIRE_INTDIR) + set (COTIRE_INTDIR "cotire") + endif() + if (NOT COTIRE_PCH_ALL_TARGET_NAME) + set (COTIRE_PCH_ALL_TARGET_NAME "all_pch") + endif() + if (NOT COTIRE_UNITY_BUILD_ALL_TARGET_NAME) + set (COTIRE_UNITY_BUILD_ALL_TARGET_NAME "all_unity") + endif() + if (NOT COTIRE_CLEAN_ALL_TARGET_NAME) + set (COTIRE_CLEAN_ALL_TARGET_NAME "clean_cotire") + endif() + if (NOT COTIRE_CLEAN_TARGET_SUFFIX) + set (COTIRE_CLEAN_TARGET_SUFFIX "_clean_cotire") + endif() + if (NOT COTIRE_PCH_TARGET_SUFFIX) + set (COTIRE_PCH_TARGET_SUFFIX "_pch") + endif() + if (MSVC) + # MSVC default PCH memory scaling factor of 100 percent (75 MB) is too small for template heavy C++ code + # use a bigger default factor of 170 percent (128 MB) + if (NOT DEFINED COTIRE_PCH_MEMORY_SCALING_FACTOR) + set (COTIRE_PCH_MEMORY_SCALING_FACTOR "170") + endif() + endif() + if (NOT COTIRE_UNITY_BUILD_TARGET_SUFFIX) + set (COTIRE_UNITY_BUILD_TARGET_SUFFIX "_unity") + endif() + if (NOT DEFINED COTIRE_TARGETS_FOLDER) + set (COTIRE_TARGETS_FOLDER "cotire") + endif() + if (NOT DEFINED COTIRE_UNITY_OUTPUT_DIRECTORY) + if ("${CMAKE_GENERATOR}" MATCHES "Ninja") + # generated Ninja build files do not work if the unity target produces the same output file as the cotired target + set (COTIRE_UNITY_OUTPUT_DIRECTORY "unity") + else() + set (COTIRE_UNITY_OUTPUT_DIRECTORY "") + endif() + endif() + + # define cotire cache variables + + define_property( + CACHED_VARIABLE PROPERTY "COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH" + BRIEF_DOCS "Ignore headers from these directories when generating the prefix header." + FULL_DOCS + "The variable can be set to a semicolon separated list of include directories." + "If a header file is found in one of these directories or sub-directories, it will be excluded from the generated prefix header." + "If not defined, defaults to empty list." + ) + + define_property( + CACHED_VARIABLE PROPERTY "COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS" + BRIEF_DOCS "Ignore includes with the listed file extensions from the generated prefix header." + FULL_DOCS + "The variable can be set to a semicolon separated list of file extensions." + "If a header file extension matches one in the list, it will be excluded from the generated prefix header." + "Includes with an extension in CMAKE__SOURCE_FILE_EXTENSIONS are always ignored." + "If not defined, defaults to inc;inl;ipp." + ) + + define_property( + CACHED_VARIABLE PROPERTY "COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS" + BRIEF_DOCS "Exclude sources with the listed file extensions from the generated unity source." + FULL_DOCS + "The variable can be set to a semicolon separated list of file extensions." + "If a source file extension matches one in the list, it will be excluded from the generated unity source file." + "Source files with an extension in CMAKE__IGNORE_EXTENSIONS are always excluded." + "If not defined, defaults to m;mm." + ) + + define_property( + CACHED_VARIABLE PROPERTY "COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES" + BRIEF_DOCS "Minimum number of sources in target required to enable use of precompiled header." + FULL_DOCS + "The variable can be set to an integer > 0." + "If a target contains less than that number of source files, cotire will not enable the use of the precompiled header for the target." + "If not defined, defaults to 3." + ) + + define_property( + CACHED_VARIABLE PROPERTY "COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES" + BRIEF_DOCS "Maximum number of source files to include in a single unity source file." + FULL_DOCS + "This may be set to an integer >= 0." + "If 0, cotire will only create a single unity source file." + "If a target contains more than that number of source files, cotire will create multiple unity source files for it." + "Can be set to \"-j\" to optimize the count of unity source files for the number of available processor cores." + "Can be set to \"-j jobs\" to optimize the number of unity source files for the given number of simultaneous jobs." + "Is used to initialize the target property COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES." + "Defaults to \"-j\" for the generators Visual Studio, JOM or Ninja. Defaults to 0 otherwise." + ) + + # define cotire directory properties + + define_property( + DIRECTORY PROPERTY "COTIRE_ENABLE_PRECOMPILED_HEADER" + BRIEF_DOCS "Modify build command of cotired targets added in this directory to make use of the generated precompiled header." + FULL_DOCS + "See target property COTIRE_ENABLE_PRECOMPILED_HEADER." + ) + + define_property( + DIRECTORY PROPERTY "COTIRE_ADD_UNITY_BUILD" + BRIEF_DOCS "Add a new target that performs a unity build for cotired targets added in this directory." + FULL_DOCS + "See target property COTIRE_ADD_UNITY_BUILD." + ) + + define_property( + DIRECTORY PROPERTY "COTIRE_ADD_CLEAN" + BRIEF_DOCS "Add a new target that cleans all cotire generated files for cotired targets added in this directory." + FULL_DOCS + "See target property COTIRE_ADD_CLEAN." + ) + + define_property( + DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_IGNORE_PATH" + BRIEF_DOCS "Ignore headers from these directories when generating the prefix header." + FULL_DOCS + "See target property COTIRE_PREFIX_HEADER_IGNORE_PATH." + ) + + define_property( + DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PATH" + BRIEF_DOCS "Honor headers from these directories when generating the prefix header." + FULL_DOCS + "See target property COTIRE_PREFIX_HEADER_INCLUDE_PATH." + ) + + define_property( + DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH" + BRIEF_DOCS "Header paths matching one of these directories are put at the top of the prefix header." + FULL_DOCS + "See target property COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH." + ) + + define_property( + DIRECTORY PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" + BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of each source file." + FULL_DOCS + "See target property COTIRE_UNITY_SOURCE_PRE_UNDEFS." + ) + + define_property( + DIRECTORY PROPERTY "COTIRE_UNITY_SOURCE_POST_UNDEFS" + BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file after the inclusion of each source file." + FULL_DOCS + "See target property COTIRE_UNITY_SOURCE_POST_UNDEFS." + ) + + define_property( + DIRECTORY PROPERTY "COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES" + BRIEF_DOCS "Maximum number of source files to include in a single unity source file." + FULL_DOCS + "See target property COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES." + ) + + define_property( + DIRECTORY PROPERTY "COTIRE_UNITY_LINK_LIBRARIES_INIT" + BRIEF_DOCS "Define strategy for setting up the unity target's link libraries." + FULL_DOCS + "See target property COTIRE_UNITY_LINK_LIBRARIES_INIT." + ) + + # define cotire target properties + + define_property( + TARGET PROPERTY "COTIRE_ENABLE_PRECOMPILED_HEADER" INHERITED + BRIEF_DOCS "Modify this target's build command to make use of the generated precompiled header." + FULL_DOCS + "If this property is set to TRUE, cotire will modify the build command to make use of the generated precompiled header." + "Irrespective of the value of this property, cotire will setup custom commands to generate the unity source and prefix header for the target." + "For makefile based generators cotire will also set up a custom target to manually invoke the generation of the precompiled header." + "The target name will be set to this target's name with the suffix _pch appended." + "Inherited from directory." + "Defaults to TRUE." + ) + + define_property( + TARGET PROPERTY "COTIRE_ADD_UNITY_BUILD" INHERITED + BRIEF_DOCS "Add a new target that performs a unity build for this target." + FULL_DOCS + "If this property is set to TRUE, cotire creates a new target of the same type that uses the generated unity source file instead of the target sources." + "Most of the relevant target properties will be copied from this target to the new unity build target." + "Target dependencies and linked libraries have to be manually set up for the new unity build target." + "The unity target name will be set to this target's name with the suffix _unity appended." + "Inherited from directory." + "Defaults to TRUE." + ) + + define_property( + TARGET PROPERTY "COTIRE_ADD_CLEAN" INHERITED + BRIEF_DOCS "Add a new target that cleans all cotire generated files for this target." + FULL_DOCS + "If this property is set to TRUE, cotire creates a new target that clean all files (unity source, prefix header, precompiled header)." + "The clean target name will be set to this target's name with the suffix _clean_cotire appended." + "Inherited from directory." + "Defaults to FALSE." + ) + + define_property( + TARGET PROPERTY "COTIRE_PREFIX_HEADER_IGNORE_PATH" INHERITED + BRIEF_DOCS "Ignore headers from these directories when generating the prefix header." + FULL_DOCS + "The property can be set to a list of directories." + "If a header file is found in one of these directories or sub-directories, it will be excluded from the generated prefix header." + "Inherited from directory." + "If not set, this property is initialized to \${CMAKE_SOURCE_DIR};\${CMAKE_BINARY_DIR}." + ) + + define_property( + TARGET PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PATH" INHERITED + BRIEF_DOCS "Honor headers from these directories when generating the prefix header." + FULL_DOCS + "The property can be set to a list of directories." + "If a header file is found in one of these directories or sub-directories, it will be included in the generated prefix header." + "If a header file is both selected by COTIRE_PREFIX_HEADER_IGNORE_PATH and COTIRE_PREFIX_HEADER_INCLUDE_PATH," + "the option which yields the closer relative path match wins." + "Inherited from directory." + "If not set, this property is initialized to the empty list." + ) + + define_property( + TARGET PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH" INHERITED + BRIEF_DOCS "Header paths matching one of these directories are put at the top of prefix header." + FULL_DOCS + "The property can be set to a list of directories." + "Header file paths matching one of these directories will be inserted at the beginning of the generated prefix header." + "Header files are sorted according to the order of the directories in the property." + "If not set, this property is initialized to the empty list." + ) + + define_property( + TARGET PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" INHERITED + BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of each target source file." + FULL_DOCS + "This may be set to a semicolon-separated list of preprocessor symbols." + "cotire will add corresponding #undef directives to the generated unit source file before each target source file." + "Inherited from directory." + "Defaults to empty string." + ) + + define_property( + TARGET PROPERTY "COTIRE_UNITY_SOURCE_POST_UNDEFS" INHERITED + BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file after the inclusion of each target source file." + FULL_DOCS + "This may be set to a semicolon-separated list of preprocessor symbols." + "cotire will add corresponding #undef directives to the generated unit source file after each target source file." + "Inherited from directory." + "Defaults to empty string." + ) + + define_property( + TARGET PROPERTY "COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES" INHERITED + BRIEF_DOCS "Maximum number of source files to include in a single unity source file." + FULL_DOCS + "This may be set to an integer > 0." + "If a target contains more than that number of source files, cotire will create multiple unity build files for it." + "If not set, cotire will only create a single unity source file." + "Inherited from directory." + "Defaults to empty." + ) + + define_property( + TARGET PROPERTY "COTIRE__UNITY_SOURCE_INIT" + BRIEF_DOCS "User provided unity source file to be used instead of the automatically generated one." + FULL_DOCS + "If set, cotire will only add the given file(s) to the generated unity source file." + "If not set, cotire will add all the target source files to the generated unity source file." + "The property can be set to a user provided unity source file." + "Defaults to empty." + ) + + define_property( + TARGET PROPERTY "COTIRE__PREFIX_HEADER_INIT" + BRIEF_DOCS "User provided prefix header file to be used instead of the automatically generated one." + FULL_DOCS + "If set, cotire will add the given header file(s) to the generated prefix header file." + "If not set, cotire will generate a prefix header by tracking the header files included by the unity source file." + "The property can be set to a user provided prefix header file (e.g., stdafx.h)." + "Defaults to empty." + ) + + define_property( + TARGET PROPERTY "COTIRE_UNITY_LINK_LIBRARIES_INIT" INHERITED + BRIEF_DOCS "Define strategy for setting up unity target's link libraries." + FULL_DOCS + "If this property is empty or set to NONE, the generated unity target's link libraries have to be set up manually." + "If this property is set to COPY, the unity target's link libraries will be copied from this target." + "If this property is set to COPY_UNITY, the unity target's link libraries will be copied from this target with considering existing unity targets." + "Inherited from directory." + "Defaults to empty." + ) + + define_property( + TARGET PROPERTY "COTIRE__UNITY_SOURCE" + BRIEF_DOCS "Read-only property. The generated unity source file(s)." + FULL_DOCS + "cotire sets this property to the path of the generated single computation unit source file for the target." + "Defaults to empty string." + ) + + define_property( + TARGET PROPERTY "COTIRE__PREFIX_HEADER" + BRIEF_DOCS "Read-only property. The generated prefix header file." + FULL_DOCS + "cotire sets this property to the full path of the generated language prefix header for the target." + "Defaults to empty string." + ) + + define_property( + TARGET PROPERTY "COTIRE__PRECOMPILED_HEADER" + BRIEF_DOCS "Read-only property. The generated precompiled header file." + FULL_DOCS + "cotire sets this property to the full path of the generated language precompiled header binary for the target." + "Defaults to empty string." + ) + + define_property( + TARGET PROPERTY "COTIRE_UNITY_TARGET_NAME" + BRIEF_DOCS "The name of the generated unity build target corresponding to this target." + FULL_DOCS + "This property can be set to the desired name of the unity target that will be created by cotire." + "If not set, the unity target name will be set to this target's name with the suffix _unity appended." + "After this target has been processed by cotire, the property is set to the actual name of the generated unity target." + "Defaults to empty string." + ) + + # define cotire source properties + + define_property( + SOURCE PROPERTY "COTIRE_EXCLUDED" + BRIEF_DOCS "Do not modify source file's build command." + FULL_DOCS + "If this property is set to TRUE, the source file's build command will not be modified to make use of the precompiled header." + "The source file will also be excluded from the generated unity source file." + "Source files that have their COMPILE_FLAGS property set will be excluded by default." + "Defaults to FALSE." + ) + + define_property( + SOURCE PROPERTY "COTIRE_DEPENDENCY" + BRIEF_DOCS "Add this source file to dependencies of the automatically generated prefix header file." + FULL_DOCS + "If this property is set to TRUE, the source file is added to dependencies of the generated prefix header file." + "If the file is modified, cotire will re-generate the prefix header source upon build." + "Defaults to FALSE." + ) + + define_property( + SOURCE PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" + BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of this source file." + FULL_DOCS + "This may be set to a semicolon-separated list of preprocessor symbols." + "cotire will add corresponding #undef directives to the generated unit source file before this file is included." + "Defaults to empty string." + ) + + define_property( + SOURCE PROPERTY "COTIRE_UNITY_SOURCE_POST_UNDEFS" + BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file after the inclusion of this source file." + FULL_DOCS + "This may be set to a semicolon-separated list of preprocessor symbols." + "cotire will add corresponding #undef directives to the generated unit source file after this file is included." + "Defaults to empty string." + ) + + define_property( + SOURCE PROPERTY "COTIRE_START_NEW_UNITY_SOURCE" + BRIEF_DOCS "Start a new unity source file which includes this source file as the first one." + FULL_DOCS + "If this property is set to TRUE, cotire will complete the current unity file and start a new one." + "The new unity source file will include this source file as the first one." + "This property essentially works as a separator for unity source files." + "Defaults to FALSE." + ) + + define_property( + SOURCE PROPERTY "COTIRE_TARGET" + BRIEF_DOCS "Read-only property. Mark this source file as cotired for the given target." + FULL_DOCS + "cotire sets this property to the name of target, that the source file's build command has been altered for." + "Defaults to empty string." + ) + + message (STATUS "cotire ${COTIRE_CMAKE_MODULE_VERSION} loaded.") + +endif() diff -Nru mysql-workbench-6.3.6+dfsg/build/cmake/Modules/FindVSqlite.cmake mysql-workbench-6.3.8+dfsg/build/cmake/Modules/FindVSqlite.cmake --- mysql-workbench-6.3.6+dfsg/build/cmake/Modules/FindVSqlite.cmake 2015-12-10 13:46:07.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/build/cmake/Modules/FindVSqlite.cmake 2016-10-14 12:12:04.000000000 +0000 @@ -15,11 +15,35 @@ FIND_PATH(VSQLITE_INCLUDE_DIR sqlite/connection.hpp) SET(VSQLITE_NAMES vsqlitepp) -IF (VSQLITE_LIBRARIES) - FIND_LIBRARY(VSQLITE_LIBRARY NAMES ${VSQLITE_NAMES} HINTS ${VSQLITE_LIBRARIES}) -ELSE() - FIND_LIBRARY(VSQLITE_LIBRARY NAMES ${VSQLITE_NAMES} ) -ENDIF() +# IF (VSQLITE_LIBRARIES) +# FIND_LIBRARY(VSQLITE_LIBRARY NAMES ${VSQLITE_NAMES} HINTS ${VSQLITE_LIBRARIES}) +# ELSE() +# FIND_LIBRARY(VSQLITE_LIBRARY NAMES ${VSQLITE_NAMES} ) +# ENDIF() + +if(VSQLITE_LIBRARIES) + # Converto to a list of library argments + string(REPLACE " " ";" VSQLITE_LIB_ARGS ${VSQLITE_LIBRARIES}) + + # Parse the list in order to find the library path + foreach(VSQLITE_LIB_ARG ${VSQLITE_LIB_ARGS}) + string(REPLACE "-L" "" VSQLITE_LIB_ARG_CLEAR ${VSQLITE_LIB_ARG}) + if(NOT ${VSQLITE_LIB_ARG_CLEAR} STREQUAL ${VSQLITE_LIB_ARG}) + set(VSQLITE_SUPPLIED_LIB_DIR ${VSQLITE_LIB_ARG_CLEAR}) + endif() + endforeach(VSQLITE_LIB_ARG) + find_library(VSQLITE_LIBRARY NAMES ${VSQLITE_NAMES} HINTS ${VSQLITE_SUPPLIED_LIB_DIR}) + + unset(VSQLITE_LIB_ARG_CLEAR) + unset(VSQLITE_LIB_ARG) + unset(VSQLITE_LIB_ARGS) +else() + find_library(VSQLITE_LIBRARY NAMES ${VSQLITE_NAMES}) +endif() + +get_filename_component(VSQLITE_LIB_FILENAME ${VSQLITE_LIBRARY} NAME_WE) +get_filename_component(VSQLITE_LIB_DIRECTORY ${VSQLITE_LIBRARY} PATH) +get_filename_component(VSQLITE_LIB_BASE_DIRECTORY ${VSQLITE_LIB_DIRECTORY} PATH) # handle the QUIETLY and REQUIRED arguments and set VSQLITE_FOUND to TRUE if # all listed variables are TRUE @@ -27,11 +51,14 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(VSQLITE DEFAULT_MSG VSQLITE_LIBRARY VSQLITE_INCLUDE_DIR) IF(VSQLITE_FOUND) - SET( VSQLITE_LIBRARIES ${VSQLITE_LIBRARY} ) + SET( VSQLITE_LIBRARIES "-L${VSQLITE_LIB_DIRECTORY} -l${VSQLITE_NAMES}" ) SET( VSQLITE_INCLUDE_DIRS ${VSQLITE_INCLUDE_DIR} ) ELSE(VSQLITE_FOUND) SET( VSQLITE_LIBRARIES ) SET( VSQLITE_INCLUDE_DIRS ) ENDIF(VSQLITE_FOUND) +message("VSQLITE INCLUDE DIR: ${VSQLITE_INCLUDE_DIRS}") +message("VSQLITE LIB DIR: ${VSQLITE_LIBRARIES}") + MARK_AS_ADVANCED( VSQLITE_LIBRARIES VSQLITE_INCLUDE_DIRS ) diff -Nru mysql-workbench-6.3.6+dfsg/build/debian.in/changelog mysql-workbench-6.3.8+dfsg/build/debian.in/changelog --- mysql-workbench-6.3.6+dfsg/build/debian.in/changelog 2015-12-10 13:46:07.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/build/debian.in/changelog 2016-10-14 12:12:04.000000000 +0000 @@ -1,3 +1,15 @@ +mysql-workbench-@edition@ (6.3.8-1@distrov@) @distro@; urgency=low + + * New release + + -- Mike Lischke (mike.lischke@oracle.com) Di, 14 Jun 2016 11:14:47 +0200 + +mysql-workbench-@edition@ (6.3.7-1@distrov@) @distro@; urgency=low + + * New release + + -- Milosz Bodzek Mon, 09 May 2016 14:54:36 +0200 + mysql-workbench-@edition@ (6.3.6-1@distrov@) @distro@; urgency=low * New release diff -Nru mysql-workbench-6.3.6+dfsg/build/debian.in/rules mysql-workbench-6.3.8+dfsg/build/debian.in/rules --- mysql-workbench-6.3.6+dfsg/build/debian.in/rules 2015-12-10 13:46:07.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/build/debian.in/rules 2016-10-14 12:12:04.000000000 +0000 @@ -60,20 +60,22 @@ configure-stamp: dh_testdir # Add here commands to configure the package. +@ifversion >= 1604 + CXXFLAGS="-std=c++11 $(CXXFLAGS)" \ +@endif cmake . -DCMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX) -DCMAKE_BUILD_TYPE=Release \ -DMySQL_CONFIG_PATH=$(MYSQL_HOME)/bin/mysql_config -DUSE_BUNDLED_MYSQLDUMP=1 \ -DMYSQLCPPCONN_LIBRARY="-L$(CPPCONN_HOME)/lib -lmysqlcppconn" \ -DMYSQLCPPCONN_INCLUDE_DIR=$(CPPCONN_HOME)/include \ -DGDAL_INCLUDE_DIR=$(GDAL_HOME)/include -DGDAL_LIBRARY=$(GDAL_HOME)/lib/libgdal.so \ + -DCTemplate_INCLUDE_DIR=${CTEMPLATE_HOME}/include \ + -DCTemplate_LIBRARIES="-L${CTEMPLATE_HOME}/lib -lctemplate"\ @ifdef community -DIODBC_CONFIG_PATH=$(ODBC_HOME)/bin/iodbc-config @else -DIODBC_CONFIG_PATH=$(ODBC_HOME)/bin/iodbc-config \ -DVSQLITE_INCLUDE_DIR=$(VSQLITE_HOME)/include \ - -DVSQLITE_LIBRARIES="-L$(VSQLITE_HOME)/lib -lvsqlitepp" \ - -DCTemplate_INCLUDE_DIR=${CTEMPLATE_HOME}/include \ - -DCTemplate_LIBRARIES="-L${CTEMPLATE_HOME}/lib -lctemplate" - + -DVSQLITE_LIBRARIES="-L$(VSQLITE_HOME)/lib -lvsqlitepp" @endif touch configure-stamp diff -Nru mysql-workbench-6.3.6+dfsg/build/gen_deb_sources.py mysql-workbench-6.3.8+dfsg/build/gen_deb_sources.py --- mysql-workbench-6.3.6+dfsg/build/gen_deb_sources.py 2015-12-10 13:46:07.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/build/gen_deb_sources.py 2016-10-14 12:12:04.000000000 +0000 @@ -4,7 +4,7 @@ # from the input debian.in directory contents -output_distros = [("wily", "ubu1510", ""), ("vivid", "ubu1504", ""), ("utopic", "ubu1410", 'paramiko'), ("trusty", "ubu1404",'paramiko'), ("precise", "ubu1204", 'paramiko')] +output_distros = [("xenial", "ubu1604", ""), ("wily", "ubu1510", ""), ("vivid", "ubu1504", ""), ("utopic", "ubu1410", 'paramiko'), ("trusty", "ubu1404",'paramiko'), ("precise", "ubu1204", 'paramiko')] editions = ["community", "commercial"] @@ -18,8 +18,13 @@ # @endif # Where variable is the name of the distro or of the edition - def evaluate(options, distro, edition, bundle): - return distro in options or edition in options or bundle in options + def evaluate(options, distro, edition, bundle, version): + return distro in options or edition in options or bundle in options or version in options + + def evaluate_version(options, vars): + version = int(vars['version']) + eval_command = 'version' + ''.join(options) + return eval(eval_command) conditions = [True] @@ -31,11 +36,14 @@ if line.startswith("@") and not line.startswith("@@"): d, _, args = line.strip().partition(" ") conds = [s.strip() for s in args.split()] + if d == "@ifversion": + conditions.append(evaluate_version(conds, vars)) + continue if d == "@ifdef": - conditions.append(evaluate(conds, vars['distro'], vars['edition'], vars['bundle'])) + conditions.append(evaluate(conds, vars['distro'], vars['edition'], vars['bundle'], vars['version'])) continue elif d == "@ifndef": - conditions.append(not evaluate(conds, vars['distro'], vars['edition'], vars['bundle'])) + conditions.append(not evaluate(conds, vars['distro'], vars['edition'], vars['bundle'], vars['version'])) continue elif d == "@else": conditions[-1] = not conditions[-1] @@ -86,5 +94,6 @@ vars['distrov'] = distro_version vars['edition'] = edition vars['bundle'] = bundle + vars['version'] = distro_version.replace('ubu', '') generate_distro("debian.in", vars) diff -Nru mysql-workbench-6.3.6+dfsg/build/mysql-workbench.spec mysql-workbench-6.3.8+dfsg/build/mysql-workbench.spec --- mysql-workbench-6.3.6+dfsg/build/mysql-workbench.spec 2015-12-10 13:46:21.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/build/mysql-workbench.spec 2016-10-14 12:12:05.000000000 +0000 @@ -8,7 +8,7 @@ # Here's a usage example: # rpmbuild -ba mysql-workbench.spec --target=`arch` \ # --define='edition community' \ -# --define='version 6.3.6' \ +# --define='version 6.3.8' \ # --define='release 1' #################################################################### %bcond_with paramiko @@ -17,7 +17,7 @@ %undefine _missing_build_ids_terminate_build %if !%{defined version} -%define version 6.3.6 +%define version 6.3.8 %endif # whether at least Python 2.6 is available @@ -132,11 +132,11 @@ # Filtering: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering %if 0%{?fedora} %if 0%{?commercial} -%global __requires_exclude ^lib(antlr3c_wb|cdbc|grt|linux_utilities|mdcanvasgtk|mdcanvas|mforms|mysqlparser|sqlparser|sqlide|wbbase|wbpublic|wbprivate|wbscintilla|mysqlcppconn|iodbc|iodbcadm|iodbcinst|mysqlclient|gdal|sqlite3)\\.so.*$ +%global __requires_exclude ^lib(antlr3c_wb|cdbc|grt|linux_utilities|mdcanvasgtk|mdcanvas|mforms|mysqlparser|sqlparser|sqlide|wbbase|wbpublic|wbprivate|wbscintilla|mysqlcppconn|iodbc|iodbcadm|iodbcinst|mysqlclient|gdal|sqlite3|ctemplate)\\.so.*$ %global __requires_exclude %{__requires_exclude}|db.*)\\.so.*$ %global __requires_exclude %{__requires_exclude}|wb.*)\\.so.*$ %else -%global __requires_exclude ^lib(antlr3c_wb|cdbc|grt|linux_utilities|mdcanvasgtk|mdcanvas|mforms|mysqlparser|sqlparser|sqlide|wbbase|wbpublic|wbprivate|wbscintilla|mysqlcppconn|iodbc|iodbcadm|iodbcinst|mysqlclient|gdal|wb.*|db.*)\\.so.*$ +%global __requires_exclude ^lib(antlr3c_wb|cdbc|grt|linux_utilities|mdcanvasgtk|mdcanvas|mforms|mysqlparser|sqlparser|sqlide|wbbase|wbpublic|wbprivate|wbscintilla|mysqlcppconn|iodbc|iodbcadm|iodbcinst|mysqlclient|gdal|wb.*|db.*|ctemplate)\\.so.*$ %global __requires_exclude %{__requires_exclude}|db.*)\\.so.*$ %global __requires_exclude %{__requires_exclude}|wb.*)\\.so.*$ %endif diff -Nru mysql-workbench-6.3.6+dfsg/build/mysql-workbench.spec.in mysql-workbench-6.3.8+dfsg/build/mysql-workbench.spec.in --- mysql-workbench-6.3.6+dfsg/build/mysql-workbench.spec.in 2015-12-10 13:46:07.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/build/mysql-workbench.spec.in 2016-10-14 12:12:05.000000000 +0000 @@ -8,7 +8,7 @@ # Here's a usage example: # rpmbuild -ba mysql-workbench.spec --target=`arch` \ # --define='edition community' \ -# --define='version 6.3.6' \ +# --define='version 6.3.8' \ # --define='release 1' #################################################################### %bcond_with paramiko @@ -132,11 +132,11 @@ # Filtering: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering %if 0%{?fedora} %if 0%{?commercial} -%global __requires_exclude ^lib(antlr3c_wb|cdbc|grt|linux_utilities|mdcanvasgtk|mdcanvas|mforms|mysqlparser|sqlparser|sqlide|wbbase|wbpublic|wbprivate|wbscintilla|mysqlcppconn|iodbc|iodbcadm|iodbcinst|mysqlclient|gdal|sqlite3)\\.so.*$ +%global __requires_exclude ^lib(antlr3c_wb|cdbc|grt|linux_utilities|mdcanvasgtk|mdcanvas|mforms|mysqlparser|sqlparser|sqlide|wbbase|wbpublic|wbprivate|wbscintilla|mysqlcppconn|iodbc|iodbcadm|iodbcinst|mysqlclient|gdal|sqlite3|ctemplate)\\.so.*$ %global __requires_exclude %{__requires_exclude}|db.*)\\.so.*$ %global __requires_exclude %{__requires_exclude}|wb.*)\\.so.*$ %else -%global __requires_exclude ^lib(antlr3c_wb|cdbc|grt|linux_utilities|mdcanvasgtk|mdcanvas|mforms|mysqlparser|sqlparser|sqlide|wbbase|wbpublic|wbprivate|wbscintilla|mysqlcppconn|iodbc|iodbcadm|iodbcinst|mysqlclient|gdal|wb.*|db.*)\\.so.*$ +%global __requires_exclude ^lib(antlr3c_wb|cdbc|grt|linux_utilities|mdcanvasgtk|mdcanvas|mforms|mysqlparser|sqlparser|sqlide|wbbase|wbpublic|wbprivate|wbscintilla|mysqlcppconn|iodbc|iodbcadm|iodbcinst|mysqlclient|gdal|wb.*|db.*|ctemplate)\\.so.*$ %global __requires_exclude %{__requires_exclude}|db.*)\\.so.*$ %global __requires_exclude %{__requires_exclude}|wb.*)\\.so.*$ %endif diff -Nru mysql-workbench-6.3.6+dfsg/build/mysql-workbench.spec.in.bak mysql-workbench-6.3.8+dfsg/build/mysql-workbench.spec.in.bak --- mysql-workbench-6.3.6+dfsg/build/mysql-workbench.spec.in.bak 1970-01-01 00:00:00.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/build/mysql-workbench.spec.in.bak 2016-10-14 12:12:04.000000000 +0000 @@ -0,0 +1,360 @@ + +# This is the SPEC file to build RPM packages for MySQL Workbench +# +# To use this file, you should define several macros when calling +# rpmbuild, in order to specify the edition, version and release +# numbers of the current build. +# +# Here's a usage example: +# rpmbuild -ba mysql-workbench.spec --target=`arch` \ +# --define='edition community' \ +# --define='version 6.3.8' \ +# --define='release 1' +#################################################################### +%bcond_with paramiko + +# Allow to continue when a binary with no build-id was found +%undefine _missing_build_ids_terminate_build + +%if !%{defined version} +%define version @VERSION@ +%endif + +# whether at least Python 2.6 is available +%define have_python26 1 +%include %{_rpmconfigdir}/macros.python + +# Directory where iodbc and pyodbc binaries are located. Build both using the build_iodbc.sh script +# If using distribution provided ODBC manager lib and pyodbc, then comment out this +%define linuxres_home $HOME/linux-res +%define linuxres_binaries %{linuxres_home}/builds + +%define odbc_home %{linuxres_binaries}/odbc/usr/local +%define ctemplate_dir %{linuxres_binaries}/ctemplate/usr/local +%define sqlite_dir %{linuxres_binaries}/sqlite +%define pysqlite_dir %{linuxres_binaries}/pysqlite2 +%define python_dir %{linuxres_home}/python +%define pyodbc_dir %{linuxres_binaries}/pyodbc + + +%if "%{edition}" == "commercial" +%define commercial 1 +%define mysqlcppconn_dir %{linuxres_binaries}/cppconn-com/usr/local +%define gdal_dir %{linuxres_binaries}/gdal-com/usr/local +%define vsqlite_dir %{linuxres_binaries}/vsqlite-com/usr/local +%define mysql_home $HOME/mysql-server-advanced + +%define edition commercial +%define license_type Commercial +%define license_file LICENSE.mysql +%else +%define community 1 +%define mysqlcppconn_dir %{linuxres_binaries}/cppconn-gpl/usr/local +%define gdal_dir %{linuxres_binaries}/gdal-gpl/usr/local +%define vsqlite_dir %{linuxres_binaries}/vsqlite-gpl/usr/local +%define mysql_home $HOME/mysql-server + +%define edition community +%define license_type GPLv2 +%define license_file COPYING +%endif + +Summary: A MySQL visual database modeling, administration, development and migration tool +Name : mysql-workbench-%{edition} +Version: %{version} +Release: %{release}%{?dist} +Group : Applications/Databases +Vendor : Oracle Corporation +License: %{license_type} +URL : http://wb.mysql.com +Source : %{name}-%{version}-src.tar.gz + +BuildRoot : %{_tmppath}/%{name}-%{version}-root +BuildRequires: pcre-devel >= 3.9 +%if 0%{?fedora} >= 20 +BuildRequires: mysql-devel >= 5.1 +%endif +BuildRequires: cmake >= 2.8 +BuildRequires: libzip-devel libxml2-devel +BuildRequires: python-devel >= 2.5 +%if 0%{?rhel} == 6 +BuildRequires: boost148-devel +%else +BuildRequires: boost-devel +%endif +BuildRequires: gtk2-devel >= 2.20 +BuildRequires: gtkmm24-devel +BuildRequires: mesa-libGL-devel +BuildRequires: sqlite-devel +BuildRequires: make +BuildRequires: tar +BuildRequires: gcc-c++ +BuildRequires: swig >= 1.3 +BuildRequires: proj-devel + +%if 0%{?fedora} >= 18 +BuildRequires: libgnome-keyring-devel libuuid-devel tinyxml-devel vsqlite++-devel ctemplate-devel +%else +BuildRequires: gnome-keyring-devel +%endif +%if 0%{?rhel} == 6 +BuildRequires: redhat-rpm-config +%endif + +Provides: mysql-workbench = %{version}-%{release} +Provides: mysql-workbench%{?_isa} = %{version}-%{release} +Requires: tinyxml +Requires: libzip +%if %{without paramiko} +Requires: python-paramiko >= 1.15.1 +%endif +Requires: gnome-keyring +Requires: proj +Requires: glib2 >= 2.28 +Requires: gtk2 >= 2.20 + +# our old package names +Obsoletes: mysql-workbench < 6.1 +Conflicts: mysql-workbench-oss +Conflicts: mysql-workbench-com-se +Conflicts: mysql-workbench-gpl + +%if 0%{?commercial} +Obsoletes: mysql-workbench-com-se +Conflicts: mysql-workbench-community +%else +Obsoletes: mysql-workbench-oss +Obsoletes: mysql-workbench-gpl +Conflicts: mysql-workbench-commercial +%endif + + +# Filtering: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering +%if 0%{?fedora} +%if 0%{?commercial} +%global __requires_exclude ^lib(antlr3c_wb|cdbc|grt|linux_utilities|mdcanvasgtk|mdcanvas|mforms|mysqlparser|sqlparser|sqlide|wbbase|wbpublic|wbprivate|wbscintilla|mysqlcppconn|iodbc|iodbcadm|iodbcinst|mysqlclient|gdal|sqlite3|ctemplate)\\.so.*$ +%global __requires_exclude %{__requires_exclude}|db.*)\\.so.*$ +%global __requires_exclude %{__requires_exclude}|wb.*)\\.so.*$ +%else +%global __requires_exclude ^lib(antlr3c_wb|cdbc|grt|linux_utilities|mdcanvasgtk|mdcanvas|mforms|mysqlparser|sqlparser|sqlide|wbbase|wbpublic|wbprivate|wbscintilla|mysqlcppconn|iodbc|iodbcadm|iodbcinst|mysqlclient|gdal|wb.*|db.*|ctemplate)\\.so.*$ +%global __requires_exclude %{__requires_exclude}|db.*)\\.so.*$ +%global __requires_exclude %{__requires_exclude}|wb.*)\\.so.*$ +%endif +%global __provides_exclude_from ^(%{_libdir}/mysql.workbench/.*\\.so.*|%{_libdir}/mysql/libmysqlclient\\.so.*|%{mysqlcppconn_dir}/lib/libmysqlcppconn\\.so.*|%{odbc_home}/lib/libiodbc\\.so.*)$ +%endif + +%if 0%{?rhel} +%{?filter_setup: + %filter_provides_in %{_libdir}/mysql/libmysqlclient/.*\.so.*$ + %filter_provides_in %{mysqlcppconn_dir}/lib/libmysqlcppconn/.*\.so.*$ + %filter_provides_in %{_libdir}/mysql.workbench/.*\.so.*$ + %filter_requires_in %{_libdir}/mysql.workbench/modules/.*\.so.*$ + %filter_requires_in %{_libdir}/mysql.workbench/plugins/.*\.so.*$ + %filter_from_requires /libantlr3c_wb/d + %filter_from_requires /libcdbc/d + %filter_from_requires /libgrt/d + %filter_from_requires /liblinux_utilities/d + %filter_from_requires /libmdcanvasgtk/d + %filter_from_requires /libmdcanvas/d + %filter_from_requires /libmforms/d + %filter_from_requires /libmysqlparser/d + %filter_from_requires /libsqlparser/d + %filter_from_requires /libsqlide/d + %filter_from_requires /libwbbase/d + %filter_from_requires /libwbpublic/d + %filter_from_requires /libwbprivate/d + %filter_from_requires /libwbscintilla/d + %filter_from_requires /libmysqlcppconn/d + %filter_from_requires /libmysqlcppconn/d + %filter_from_requires /libiodbc/d + %filter_from_requires /libiodbcadm/d + %filter_from_requires /libiodbcinst/d + %filter_from_requires /libvsqlitepp/d + %filter_from_requires /libmysqlclient/d + %filter_from_requires /libgdal/d + %filter_from_requires /libctemplate/d +# +# Don't bundle libzip.so neither libtinyxml.so. Those can be found in EPEL. +# +# %filter_from_requires /libzip/d +# %filter_from_requires /libtinyxml/d + %{?commercial:%filter_from_requires /libsqlite3/d} + %filter_setup +} +%endif + + + + +%description +MySQL Workbench is a unified visual tool for database architects, developers, +and DBAs. MySQL Workbench provides data modeling, SQL development, and +comprehensive administration tools for server configuration, user +administration, backup, and much more. MySQL Workbench is available on +Windows, Linux and Mac OS X. + + +%prep + +# Add the -D flag if you don't want to delete the source root on each build +%setup -q -n %{name}-%{version}-src + + +%build +%if 0%{?fedora} > 22 +CXXFLAGS="-std=c++11 $CXXFLAGS" \ +%undefine _hardened_build #need to undefine because of some memory problems +%endif +%cmake -DCMAKE_BUILD_TYPE=Release \ + -DREAL_EXECUTABLE_DIR=%{_libexecdir}/mysql-workbench \ + -DMySQL_CONFIG_PATH=%{mysql_home}/bin/mysql_config \ + -DMYSQLCPPCONN_LIBRARY="-L%{mysqlcppconn_dir}/lib -lmysqlcppconn" \ + -DMYSQLCPPCONN_INCLUDE_DIR=%{mysqlcppconn_dir}/include \ + -DIODBC_CONFIG_PATH=%{odbc_home}/bin/iodbc-config \ + -DGDAL_INCLUDE_DIR=%{gdal_dir}/include -DGDAL_LIBRARY=%{gdal_dir}/lib/libgdal.so \ + -DCTemplate_INCLUDE_DIR=%{ctemplate_dir}/include \ + -DCTemplate_LIBRARIES="-L%{ctemplate_dir}/lib -lctemplate" \ +%if 0%{?rhel} == 6 + -DVSQLITE_INCLUDE_DIR=%{vsqlite_dir}/include \ + -DVSQLITE_LIBRARIES="-L%{vsqlite_dir}/lib -lvsqlitepp" \ +%endif + -DUSE_BUNDLED_MYSQLDUMP=1 + +make %{?_smp_mflags} + + +%install +make install DESTDIR=%{buildroot} +rm -fr %{buildroot}/usr/share/doc/mysql-workbench + +%if %{defined mysqlcppconn_dir} + cp -a %{mysqlcppconn_dir}/lib/libmysqlcppconn.so.7* %{buildroot}%{_libdir}/mysql-workbench +%endif + +if [ -f %{vsqlite_dir}/lib/libvsqlitepp.so.3 ]; then + cp -a %{vsqlite_dir}/lib/libvsqlitepp.so.3* %{buildroot}%{_libdir}/mysql-workbench +fi + +# Bundle client programs and lib +%if %{defined mysql_home} + cp -a %{mysql_home}/lib/libmysqlclient.so.* %{buildroot}%{_libdir}/mysql-workbench/ + cp -a %{mysql_home}/bin/mysql %{buildroot}%{_libexecdir}/mysql-workbench/ + cp -a %{mysql_home}/bin/mysqldump %{buildroot}%{_libexecdir}/mysql-workbench/ +%endif + +# +# Don't bundle libzip.so neither libtinyxml.so. Those can be found in EPEL. +# +#%if 0%{?rhel} +# cp -a /usr/lib64/libzip.so* %{buildroot}%{_libdir}/mysql-workbench/ +# cp -a /usr/lib64/libtinyxml.so* %{buildroot}%{_libdir}/mysql-workbench/ +#%endif + + +%if 0%{?fedora} + cp -a /usr/lib64/libctemplate.so* %{buildroot}%{_libdir}/mysql-workbench +%else +%if 0%{?rhel} <= 7 + cp -a %{ctemplate_dir}/lib/libctemplate.so* %{buildroot}%{_libdir}/mysql-workbench +%endif +%if 0%{?rhel} > 7 + cp -a /usr/lib64/libctemplate.so* %{buildroot}%{_libdir}/mysql-workbench +%endif +%endif + + +find %{buildroot}%{_libdir}/mysql-workbench -name \*.a -exec rm {} \; -print +find %{buildroot}%{_libdir}/mysql-workbench -name \*.la -exec rm {} \; -print + +# Bundle pre-built libs +%if %{defined odbc_home} + for l in %{odbc_home}/lib/libiodbc.so.* %{odbc_home}/lib/libiodbcinst.so.* %{odbc_home}/lib/libiodbcadm.so.*; do + cp -a $l %{buildroot}%{_libdir}/mysql-workbench + /usr/sbin/prelink -u %{buildroot}%{_libdir}/mysql-workbench/`basename $l` || true + done + cp -a %{odbc_home}/bin/iodbcadm-gtk %{buildroot}%{_libexecdir}/mysql-workbench/ +%endif + +if [ %{pyodbc_dir} ]; then + cp -a %{pyodbc_dir}/pyodbc.so %{buildroot}%{_libdir}/mysql-workbench/modules +%if 0%{?commercial} + # Bundle libs only needed in commercial edition + cp -a %{sqlite_dir}/libsqlite3.so %{buildroot}%{_libdir}/mysql-workbench/ + cp -a %{pysqlite_dir} %{buildroot}%{_libdir}/mysql-workbench/modules +%endif +fi + +%if %{with paramiko} + cp -a %{python_dir}/paramiko %{buildroot}%{_libdir}/mysql-workbench/modules/ + cp -a %{python_dir}/ecdsa %{buildroot}%{_libdir}/mysql-workbench/modules/ +%endif + +cp -a %{gdal_dir}/lib/libgdal.so.* %{buildroot}%{_libdir}/mysql-workbench/ + +%post +touch --no-create %{_datadir}/icons/hicolor || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +fi + +if [ -x %{_bindir}/update-desktop-database ]; then + %{_bindir}/update-desktop-database +fi + +if [ -x %{_bindir}/update-mime-database ]; then + %{_bindir}/update-mime-database %{_datadir}/mime 2>&1 > /dev/null || : +fi + + +%postun +touch --no-create %{_datadir}/icons/hicolor || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +fi + +if [ -x %{_bindir}/update-desktop-database ]; then + %{_bindir}/update-desktop-database +fi + +if [ -x %{_bindir}/update-mime-database ]; then + %{_bindir}/update-mime-database %{_datadir}/mime 2>&1 > /dev/null || : +fi + + +%clean +rm -rf %{buildroot} +rm -rf %{_builddir}/%{name}-%{version}-src + + +%files +%defattr(0644, root, root, 0755) +%doc %{license_file} README + +%attr(0755,root,root) %{_bindir}/mysql-workbench +%attr(0755,root,root) %{_bindir}/wbcopytables + +%dir %{_libexecdir}/mysql-workbench +%attr(0755,root,root) %{_libexecdir}/mysql-workbench/mysql-workbench-bin +%attr(0755,root,root) %{_libexecdir}/mysql-workbench/wbcopytables-bin +%attr(0755,root,root) %{_libexecdir}/mysql-workbench/iodbcadm-gtk +%attr(0755,root,root) %{_libexecdir}/mysql-workbench/mysql +%attr(0755,root,root) %{_libexecdir}/mysql-workbench/mysqldump + +%{_libdir}/mysql-workbench + +%{_datadir}/mysql-workbench +%attr(0755,root,root) %{_datadir}/mysql-workbench/extras/*.sh + +%{_datadir}/icons/hicolor/*/mimetypes/* +%{_datadir}/icons/hicolor/*/apps/* +%{_datadir}/mime-info/* +%{_datadir}/mime/packages/* +%{_datadir}/applications/*.desktop + + +%if 0%{?fedora} == 19 +%debug_package +%endif + +%changelog + diff -Nru mysql-workbench-6.3.6+dfsg/ChangeLog mysql-workbench-6.3.8+dfsg/ChangeLog --- mysql-workbench-6.3.6+dfsg/ChangeLog 2015-12-10 02:37:56.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/ChangeLog 2016-10-12 23:30:31.000000000 +0000 @@ -6,7 +6,7 @@ release of MySQL Workbench. For additional MySQL Workbench documentation, see MySQL - Workbench (http://dev.mysql.com/doc/workbench/en/index.html). + Workbench (http://dev.mysql.com/doc/workbench/en/). Updates to these notes occur as new product features are added, so that everybody can follow the development process. @@ -33,7 +33,7 @@ and PDF formats, see the MySQL Documentation Library (http://dev.mysql.com/doc). - Document generated on: 2015-12-10 (revision: 7782) + Document generated on: 2016-10-13 (revision: 10056) ________________________________________________________ Preface and Legal Notices @@ -43,7 +43,7 @@ Legal Notices - Copyright (c) 2006, 2015, Oracle and/or its affiliates. All + Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a @@ -151,7 +151,398 @@ Changes in MySQL Workbench 6.3 -Changes in MySQL Workbench 6.3.6 (Not yet released) +Changes in MySQL Workbench 6.3.8 (Not yet released) + + Bugs Fixed + + * Using the -->> operator in a valid SQL statement within a + stored procedure returned the following error: The + object's DDL statement contains syntax errors. (Bug + #24693021, Bug #83043) + + * The Columns tab of the table editor displayed an + incorrect tooltip description for the G flag. (Bug + #24558804) + + * For macOS, the table-partition model transposed column + values leading to an incorrect CREATE TABLE statement. + Thanks to Kit Yam Tse for the patch. (Bug #24517322, Bug + #82716) + + * Conversions between character sets failed during the + migration of Microsoft SQL Server tables. (Bug #24452016) + References: See also: Bug #23549089. + + * The migration script could not successfully convert UCS-2 + strings to UTF-8 in a table when migrating the table from + Microsoft SQL Server to MySQL Workbench. (Bug #23751080) + + * Database migration from Microsoft SQL Server 2000 emitted + errors and stopped when the operation failed to locate + the required schema list associated with the database + version. (Bug #23747299, Bug #82069) + + * A CASE statement with WHEN clauses in a stored procedure + emitted syntax errors. (Bug #23746795, Bug #82114) + + * On Windows, migrating a table with an empty string in a + column of type ntext failed and displayed the "Could not + successfully convert UCS-2 string to UTF-8 ..." error + message. (Bug #23630604, Bug #81967) + + * When migrating a table with a column of type + nvarchar(max) from Microsoft SQL Server, MySQL Workbench + found the record to be bigger than the server's + max_allowed_packet value and failed to copy the record to + the server. (Bug #23623191, Bug #81944) + + * The usage graph under InnoDB Status in the Performance + Dashboard consistently underreported the actual usage of + the InnoDB buffer pool as reported on the server. This + fix implements a new formula to represent the InnoDB + buffer pool. (Bug #23584042, Bug #81837) + + * Index comments were improperly generated within the index + section of an SQL script when using the Forward Engineer + SQL Script wizard to create and export the script. (Bug + #19896276, Bug #74530) + +Changes in MySQL Workbench 6.3.7 (2016-06-13) + + + * Functionality Added or Changed + + * Bugs Fixed + + Functionality Added or Changed + + * The Default target MySQL version model preference is now + an open text field instead of a dropdown select box. For + example, rather than choosing a version such as "5.7", + you can now enter a specific version such as 5.7.12. (Bug + #23080421, Bug #81023) + + Bugs Fixed + + * A typo was fixed on the Configure Server Management page. + (Bug #23534786, Bug #81738) + + * On OS X, after creating a new model, and new diagram, + right-clicking on the empty diagram background would + freeze Workbench. (Bug #23512126) + + * Executing Data Import/Restore would emit an unhandled + exception with Import from Self-Contained File enabled. + (Bug #23505226) + + * On Linux, the Table Data Export wizard failed to complete + the export process. (Bug #23477814) + + * The MySQL Enterprise Backup Restore functionality could + emit an unhandled exception under some circumstances. + (Bug #23472573) + + * Editing a remote MySQL options file via the Options File + management tool would emit an unhandled exception after + clicking Apply. (Bug #23307191) + + * Exporting data to JSON was exporting NULL values as NULL + instead of null, thus breaking the JSON output. (Bug + #23241155, Bug #81331) + + * Under Users and Privileges, Workbench did not allow + hyphens for host names in the "limit to hosts matching" + field. (Bug #23224606, Bug #81301) + + * When viewing the code for an existing view (SQL to create + the view), hexadecimal values were truncated. (Bug + #23187761, Bug #81208) + + * Migrating a MySQL source to a MySQL target database would + fail for tables that had generated columns, as the target + server rejected attempts to insert data into generated + columns. (Bug #23128380, Bug #81100) + + * Selecting "5.7" from Default target MySQL version did not + take into account changes to newer versions, as 5.7 + behaved like 5.7.0 instead of a newer version. For + example, it was not possible to use the JSON data type + for variables inside the stored procedure editor as JSON + was added in MySQL 5.7.7. (Bug #23080421, Bug #81023) + + * The Schema filter was slow (poor performance) when a lot + (1000+) of schemas were present. (Bug #23047787, Bug + #80946) + + * The database migration wizard database field was + described as "Leave blank to select it later" but this + text was updated to read as "Cannot be blank" because it + is a required field. (Bug #22896342) + + * The generated SQL generated by the forward engineering + wizard would incorrectly output "VIRTUALCOMMENT" instead + of "VIRTUAL COMMENT". (Bug #22880159, Bug #80618) + + * An new option is available to specify a path to the SSH + configuration and/or known hosts file. This option + overwrites the defaults. (Bug #22866791, Bug #80605) + + * Workbench's Alter Table functionality did not behave + correctly when a column was defined using a TIMESTAMP + with fractional seconds, such as TIMESTAMP(1). In this + case, some columns would be hidden from the editor. (Bug + #22839982, Bug #80547) + + * Under Reverse Engineering, the information provided in + the wild card description to select objects contained a + typo. (Bug #22828056, Bug #80516) + + * After successfully executing the database migration + wizard, executing it a second time required Workbench to + be restarted. (Bug #22811588, Bug #80479) + + * When executing Data Export using a remote MySQL + connection, the error resulting from a missing mysqldump + binary was unclear. (Bug #22753693, Bug #80240) + + * The PostgreSQL migration wizard could fail to migrate + PostgreSQL databases that were generated with tryton. + (Bug #22747525, Bug #79217) + + * The Dashboard and Server Status reported different Select + per second values. The Server Status page reported + incorrect (inflated by about 3x) values. (Bug #22739583, + Bug #74822) + + * The PostgreSQL migration wizard could fail with an + "pg_catalog.pg_enum does not exist" error. (Bug + #22738451, Bug #71121) + + * The Workbench interface would incorrectly orient itself + to display as Right-To-Left (RTL) when a system's + language is set to a RTL language, despite Workbench not + being translated to that language. (Bug #22722701, Bug + #72126) + + * Attempting to test custom connection details (a + connection not yet created by Workbench) caused Workbench + to fail and exit. The Test Connection functionality only + functioned for existing or new connections. (Bug + #22698924, Bug #80325) + + * The "Limit to Hosts Matching" field in the user manager + would incorrectly report a "Host name contains incorrect + characters" error if the host named contained numeric + characters. (Bug #22670269) + + * Import and export to JSON format failed if the table had + column names that were keywords such as key or value. + (Bug #22668918, Bug #80272) + + * The Alter Table functionality did not detect a default + value change from no default value to an empty string. In + other words, adding a default value of "" resulted in + Workbench reporting "No changes detected". (Bug + #22664805, Bug #80267) + + * The DBMS connection keep-alive interval option did not + function properly. As a result, Workbench could lose the + connection and result in errors similar to "Error Code: + 2013. Lost connection to MySQL server during query". (Bug + #22642241, Bug #80225) + + * All generated paths now will use "/" as the directory + separator in order to avoid the "\s" being interpreted as + a space, such as "C:\path\to\certs\server-cert.pem" for + generated SSL certificates. (Bug #22636645, Bug #80087) + + * Importing CSV data with from a properly UTF-8 encoded + source would sometimes fail, and instead could result + with errors such as "'ascii' codec can't encode character + u'\xcf' at position 29: ordinal not in range(128)". (Bug + #22635390, Bug #80205) + + * With Fabric, Workbench cached the topology information + and did not update it when the topology changed, like + when switching to a new master. (Bug #22601466) + + * Code completion has been further improved to only show + relevant details, such as if a table is referenced in the + FROM clause then only show columns from that table and + not all from the default schema, and entries have been + reordered to show columns first (only preceded by + keywords). (Bug #22579426, Bug #80092) + + * Some stored procedure definitions were incorrectly + reported as having invalid syntax. (Bug #22552958, Bug + #80007) + + * Executing Alter Stored Procedure with a user lacking + SELECT privileges would crash MySQL Workbench. (Bug + #22509047, Bug #79871) + + * With the MySQL Firewall plugin enabled, having a user + name containing a single quote character (rare, but not + illegal) the queries would fail and produce an error in + the Users and Privileges area of Workbench. These checks + are now properly escaped. (Bug #22468850) + + * With the validate_password plugin enabled, when Workbench + attempted to check the strength of a new password by + sending a query to the server, the password was not + properly escaped in this query. In such cases, the + password was incorrectly reported as a strong or weak + password. The associated "SELECT + VALIDATE_PASSWORD_STRENGTH" query is now properly + escaped. (Bug #22468332) + + * Some internal Workbench queries failed to execute with + sql_mode set to ANSI_QUOTES. (Bug #22464406) + + * The Total Time field within the Recent Activity grid of + the Online Backup / MySQL Enterprise Backup section of + Workbench showed an incorrect duration value. (Bug + #22462974, Bug #73499) + + * With MySQL Server 5.5 and lower, executing Alter Table on + tables with partitions would fail with an error similar + to "Syntax error: 'PARTITION' (identifier) is not valid + input at this position". (Bug #22453898, Bug #79734) + + * MySQL Workbench lacked a CentOS profile, so could fail to + make remote connections to a CentOS machine. (Bug + #22453095, Bug #72205) + + * After opening the stored procedure editor from the object + browser, clicking Execute would execute a query that did + not take into account the IN parameters. (Bug #22378620) + + * On Windows, the "DEFAULT NULL" value could + unintentionally be removed from the "Alter Table" window + when clicking on it. (Bug #22375946, Bug #79661) + + * The Database Migration migration link on the home page + was not functioning immediately after a successful + migration. (Bug #22271448) + + * Several grammar and spelling corrections were implemented + into the GUI. (Bug #22251496, Bug #79373) + + * Under certain circumstances, sub-queries were reported as + syntax errors. (Bug #22251347, Bug #79371) + + * Several SQL Server 2014 database migration improvements. + (Bug #22243141, Bug #79299) + + * While modeling, pressing the Enter key while editing a + document's properties would close the document properties + window instead of adding a new line. (Bug #22204168) + + * When copying tables, Workbench makes one connection at + the start to disable triggers, makes a separate + connection to do the data copy, then returns to the first + connection to re-enable triggers. If the copy takes + longer than the server's wait_timeout, the first + connection timed out. (Bug #22190703, Bug #79242) + + * The Driver sends Unicode data as UTF-8 advanced database + migration option that is available when using an ODBC + driver is now disabled by default. Also, connections + could hang when this option was enabled. (Bug #22149342, + Bug #76382) + + * Executing Delete Row(s) after selecting more than six + rows from the results grid would not delete all of the + selected rows. (Bug #21909625, Bug #78560) + + * Adding a DATETIME with precision (such as DATETIME(3)) + from the Table Editor would eventually get reverted to + DATETIME (without precision). (Bug #21666012, Bug #78153) + + * The search (magnifying glass) icon in the schema search + field was misplaced after the left sidebar was resized. + (Bug #21329109, Bug #77507) + + * Workbench will now prompt to continue the execution of + operations containing loops in stored procedures, instead + of just canceling it after ~200 executions. (Bug + #21310357, Bug #77470) + + * The Performance Schema installation procedure in + Workbench failed to check user privileges before + attempting the installation. For example, if the user had + all privileges except "ALTER ROUTINE", it would update + sys.version but fail to complete the installation, and + also fail to back out thereby leaving the sys.version as + current but none of the functions were updated. (Bug + #21261239, Bug #77360) + + * On Linux and OS X, the Options File viewer shortened + (cut) long option names in the GUI, although editing + their values changed the correct options. (Bug #21167521, + Bug #77179) + + * MySQL connections were leaked when connecting and + disconnecting to MySQL databases. It leaked one + connection per re-connect to a database. (Bug #20996606) + + * A large database caused the size reported under the + Schema Inspector to wrap around and display a negative + number. (Bug #20990435) + + * From the Options File management feature, clicking + Discard with the Advanced tab open would always revert + the thread_handling option value to + "one-thread-per-connection" even if it was set to "no + threads". (Bug #20956570) + + * The print preview icon dialog was missing the Workbench + icon. (Bug #20309812, Bug #75422) + + * Changes to the modeling Appearance font preference did + not save properly, or have an effect. (Bug #20196073, Bug + #75173) + + * On Windows, the Query Stats graph would not render with + MySQL Server 5.7. (Bug #20141414, Bug #75100) + + * The Query Stats information tab was populated even when + the Performance Schema was disabled. (Bug #20141262, Bug + #75101) + + * The Toggle whether execution of SQL script should + continue after failed statements button was updated to + better indicate when the option is enabled or disabled. + (Bug #20093801, Bug #74982) + + * On Windows, after closing and reopening Workbench with + several SQL Editor tabs open, the tabs names were hash + values (instead of MySQL connection names) if the + connection names contained non-standard text. (Bug + #20086117, Bug #74966) + + * In the Table Editor, if a column has NN checked, and NN + is then unchecked, then a default NULL value is + automatically added to the CREATE TABLE statement when + Apply is clicked. The column then shows a default value + of NULL in the Table Editor. (Bug #19890571, Bug #74558) + + * If a setting is (incorrectly) defined twice in my.ini, + Workbench separates its values with a newline ("\n"). For + example, if sort_buffer_size is defined twice, Workbench + displays it as "sort_buffer_size=256K\n256K". Workbench + now follows MySQL Server behavior, and uses the last + defined option. (Bug #19769849) + + * The cursor could seemingly disappear after executing a + query, as it could remain at its last position when the + query started to execute. (Bug #19703074, Bug #74128) + + * The model Page setup... functionality was not always + preserved when choosing a size for printing. (Bug + #11766583, Bug #59724) + +Changes in MySQL Workbench 6.3.6 (2015-12-15) * Functionality Added or Changed @@ -166,6 +557,18 @@ * On Linux, Fedora 23 is now supported. (Bug #22146526, Bug #79101) + * The "mysql_old_password + (http://dev.mysql.com/doc/refman/5.7/en/old-client.html)" + protocol is no longer supported by Workbench, as its + support was removed in MySQL Server 5.7. For this reason, + the Use the old authentication protocol option was + removed. That option did not function in Workbench 6.3.5. + For information about updating a user's password from the + old to new format, see Updating Old Authentication + Protocol Passwords + (http://dev.mysql.com/doc/workbench/en/wb-mysql-connectio + ns-secure-auth.html). (Bug #22093548, Bug #78947) + * Management operations when using an SSH MySQL Server connection that authenticated using a password (and not SSH keys) would not function. (Bug #22047602) @@ -178,6 +581,15 @@ Bugs Fixed + * The results grid remained empty after executing SELECT + queries. A new GTK2 prerequisite was added, which is + checked by the Yum repository. This affected Enterprise + Linux variants, such as the Oracle Linux and CentOS + distributions. + This fix was released (pushed) after version 6.3.6 was + initially released. Current users of 6.3.6 must reinstall + Workbench. (Bug #22376818, Bug #79495) + * Setting the MySQL Firewall mode to "PROTECTING" for a user without defined rules would emit an unhandled exception. (Bug #22294174) @@ -194,12 +606,17 @@ object. (Bug #22269199) * The JSON Data Field Value Editor functionality was - improved. (Bug #22265214) + improved, and bugs were fixed. Workbench 6.3.5 had known + limitations. (Bug #22265214, Bug #22337871) * On Linux, the MySQL Firewall installation checked the path /usr/share/ instead of /usr/share/mysql/. (Bug #22263249) + * For Online Backup, the Fix Grants for MEB function would + not create the MySQL Enterprise Backup user account. (Bug + #22258080) + * The SSL results page listed the "-" character as "_" for the SSL certificate file names. (Bug #22243210) @@ -221,6 +638,10 @@ digit if it was preceded by a dot. (Bug #22193758, Bug #79247) + * After creating a table, editing the table in the same tab + would yield an error after clicking Apply. (Bug + #22178996, Bug #79199) + * Clicking Apply a second time while performing an Alter Table operation would emit a "No Changes Detected" message, despite changes being present. (Bug #22169405, @@ -257,6 +678,14 @@ button within the community edition. (Bug #22139172, Bug #79082) + * Attempting to install MySQL Enterprise Firewall would + fail with the following error: "Unhandled exception: type + object 'FileUtils' has no attribute + 'check_file_readable'". + As a workaround, execute a xyz_install_firewall.sql + script that is bundled with MySQL Server. (Bug #22138989, + Bug #79083) + * The Alter Table tool did not function with partitioned tables. (Bug #22135172, Bug #79070) @@ -321,6 +750,10 @@ fail with invalid syntax errors. (Bug #21941439, Bug #78683) + * The Action Output auto-scrolling failed to function after + clicking inside the action log. (Bug #21930774, Bug + #78648) + * The Table Data Import wizard failed to import large integers. They are now properly detected and assigned as BIGINT. (Bug #21896324) @@ -338,6 +771,9 @@ * The Copy All Field Names action would insert extra (repeated) column names. (Bug #21760124, Bug #78280) + * The SYS Schema could not be installed using a remote + MySQL Server connection. (Bug #21661235) + * The SHOW GRANTS statement would be seen as invalid syntax. (Bug #21520434, Bug #77868) @@ -345,6 +781,9 @@ fully supported in the SQL editor, Table Editor, nor Modeling interface. (Bug #21505058, Bug #77837) + * The bundled OpenSSL library was upgraded to version + 1.0.1p. (Bug #21438134) + * When adding stored procedures to a Routine Group, Workbench would sometimes append "_SYNTAX_ERROR" to the procedures. (Bug #21174637, Bug #77197) @@ -356,6 +795,10 @@ * SQL auto-completion would sometimes show unavailable columns. (Bug #21046868, Bug #76954) + * MySQL Workbench sometimes wrongly detected a syntax error + when creating stored procedures in the SQL editor. (Bug + #21031036, Bug #76934) + * Including a model (via File, Include Model) generated a window that was too small. (Bug #20956593) @@ -363,10 +806,29 @@ under Server Connection, Advanced, Others, could shutdown Workbench. (Bug #20930014) + * On Windows, the Vertical Output tab failed to close. (Bug + #20834266, Bug #76590) + + * The performance_schema_max_sql_text_length and + max_digest_length options were not displayed under the + Options File tab. These variables dictate how queries + under Statement Analysis are truncated. (Bug #20671061, + Bug #76223) + * Resizing the New Job window in the Online Backup management tool would show a floating text box. (Bug #20631601, Bug #76110) + * On Fedora 21, Locate Log Files and Show Log File did not + function due to an underlining Fedora 21 glib issue. (Bug + #20609499, Bug #76066) + + * On OS X with multiple displays present, the SQL + auto-complete box would always show on the main display, + even if Workbench was on the secondary display. The + underlining Scintilla library was updated to solve this + problem. (Bug #20341650, Bug #75460) + * Workbench would report SQL syntax errors for subqueries using multiple parentheses. (Bug #20330840, Bug #75462) @@ -375,13 +837,28 @@ non-ASCII characters would rename the file using the .bak file extension. (Bug #20328493, Bug #75455) + * On Windows, the MySQL Workbench application is now + associated to files with the .sql extension. (Bug + #20326058, Bug #75453) + * Scheduled incremental backups would not function if the file path contained spaces. (Bug #20254772, Bug #75092) + * The Check for Update functionality did not detect newer + Workbench versions for the commercial edition. (Bug + #20167571, Bug #75132) + * With incremental backups, TTS usage was attempted with the Use Transportable Tablespaces option disabled. This resulted in an error. (Bug #20098272) + * Workbench's Alter Table functionality did not detect + changes to fractional seconds. (Bug #19774377, Bug + #74254) + + * The Forward Engineering SQL output sometimes contained a + BOM character. (Bug #19495516, Bug #73693) + Changes in MySQL Workbench 6.3.5 (2015-10-21) Known limitations: @@ -568,7 +1045,7 @@ fingerprint was not in the known_hosts file, clicking Test Connection under Remote Management would freeze MySQL Workbench. (Bug #21264620) - References: This bug was introduced by Bug #21122128. + References: This issue is a regression of: Bug #21122128. * The Data Export wizard failed to include date information when the JSON export type was used instead of CSV. (Bug @@ -635,7 +1112,7 @@ * On OS X, the Shift + Alt + Arrow combination would select individual characters instead of whole words. (Bug #20797766, Bug #76526) - References: This bug is a regression of Bug #50085. + References: This issue is a regression of: Bug #50085. * When executing Start Command Line Client, entering the incorrect MySQL password would immediately close the @@ -882,7 +1359,7 @@ * Triggers could not be edited after applying changes to a different trigger. Attempting to do this multiple times could also have caused MySQL Workbench to crash. (Bug - #20678160, Bug #76234) + #20678160, Bug #19916370, Bug #76234, Bug #74624) * While creating or altering a table, the ENUM type handler would remove parentheses and quotes. For example, @@ -913,6 +1390,10 @@ ~/.ssh/ssh_config or ~/.ssh/config. (Bug #20653285, Bug #75764) + * Connections to MySQL Server 5.7 and higher now use + mysql_real_escape_string_quote instead of + mysql_real_escape_string. (Bug #20637587) + * On Linux, the >Check for updates functionality reported a "Name or service not know" error when an Internet connection was not available, and now it emits "No @@ -991,8 +1472,9 @@ Functionality Added or Changed - * Fabric 1.5 is now supported. Older versions of Fabric are - no longer supported due to incompatible protocol changes. + * Platforms support changes: Fedora 21 and Ubuntu 14.10 + support was added, while Ubuntu 12.10 support was + dropped. * 64-bit architecture support: For OS X, the build architecture changed from 32-bit to @@ -1001,15 +1483,8 @@ but users are encouraged to use the 64-bit builds. 32-bit support is deprecated. - * A new table data import/export wizard was added. This - feature enhances the current CSV import and export - feature found in the SQL editor's result set viewer. It - supports import and export of CSV and JSON files, and - allows a more flexible configuration (separators, column - selection, encoding selection, and more). This new wizard - does not require an executed statement on a table for a - result set to be operated on, as it can now work directly - on tables. + * Fabric 1.5 is now supported. Older versions of Fabric are + no longer supported due to incompatible protocol changes. * A new "fast migration" option was added to the migration wizard. This is another way to transfer data from one @@ -1028,13 +1503,6 @@ server. You unzip it and execute the provided script to perform the data import. - * Code completion support was improved. Code suggestions - are more precise and work with additional statement - types, when before only SELECT statements were fully - supported. Additional database features are also - supported including table engines, log file groups, table - spaces, character sets, and more. - * A new SSL certificate generation wizard was added. This new wizard helps create proper SSL certificates for both MySQL clients and MySQL servers. Connections in MySQL @@ -1042,15 +1510,28 @@ wizard. This wizard requires OpenSSL to create the certificates. + * A new table data import/export wizard was added. This + feature enhances the current CSV import and export + feature found in the SQL editor's result set viewer. It + supports import and export of CSV and JSON files, and + allows a more flexible configuration (separators, column + selection, encoding selection, and more). This new wizard + does not require an executed statement on a table for a + result set to be operated on, as it can now work directly + on tables. + + * Code completion support was improved. Code suggestions + are more precise and work with additional statement + types, when before only SELECT statements were fully + supported. Additional database features are also + supported including table engines, log file groups, table + spaces, character sets, and more. + * The Test Connection panel was restructured. The Host, Port, User, and SSL entries are now listed separately on their own lines. Before, the text "SSL not enabled" confused some users as being a possible error. - * Platforms support changes: Fedora 21 and Ubuntu 14.10 - support was added, while Ubuntu 12.10 support was - dropped. - Bugs Fixed * On Linux, the Saved password in keychain functionality @@ -1900,25 +2381,19 @@ the forward engineer and synchronization wizards. (Bug #11748756, Bug #37299) - * The migration wizard now supports migration from - Microsoft Access. - - * The MySQL 5.7 SQL syntax and configuration options are - now supported. + * Visual Explain now allows you to "drill down" into large + to very large explain plans. * The result set panel now integrates Visual Explain, and offers an execution plan for all executed queries. - * The Run SQL Script command can now be executed on SQL - scripts, without first loading the scripts. - * Database modeling was updated to allow changes to the formatting of note objects, and attached SQL scripts can now be included in the forward engineering and synchronization scripts. - * Visual Explain now allows you to "drill down" into large - to very large explain plans. + * The Run SQL Script command can now be executed on SQL + scripts, without first loading the scripts. * The result tabs can now be "pinned" for persistent data views. @@ -1927,12 +2402,18 @@ auto-sizing and saved width preferences. The fonts can also be customized. - * The Metadata Locks view shows the locked connections that - are blocked or being waiting on. + * The migration wizard now supports migration from + Microsoft Access. * MySQL Fabric cluster connectivity: Browse, view status, and connect to any MySQL instance in a Fabric Cluster. + * The Metadata Locks view shows the locked connections that + are blocked or being waiting on. + + * The MySQL 5.7 SQL syntax and configuration options are + now supported. + * A new spatial data viewer that offers graphical views of result sets containing GEOMETRY data. This utilizes the GIS capabilities in MySQL 5.7+. @@ -2029,16 +2510,16 @@ assigning privileges to a role. (Bug #11763614, Bug #56346) + * On Microsoft Windows, the Microsoft visual C++ 2013 + redistributable package is now used instead of the 2010 + version. + * The Lua scripting language is no longer supported in the Scripting Shell. For additional information about Python support, see Extending Workbench (http://dev.mysql.com/doc/workbench/en/wb-extending.html) . - * On Microsoft Windows, the Microsoft visual C++ 2013 - redistributable package is now used instead of the 2010 - version. - Changes in MySQL Workbench 6.1 For detailed information about the new features, see What's @@ -2268,7 +2749,7 @@ variable names, so that "@foo" would become "@ foo". (Bug #18502104, Bug #72193) - * Rapidly clicking Execute in a SQL session too frequently + * Rapidly clicking Execute in an SQL session too frequently sometimes caused MySQL Workbench to crash. (Bug #18491041) @@ -2371,15 +2852,15 @@ step of the Forward Engineering wizard did not move the objects. (Bug #18454428) + * Executing Backup recovery after a full Online backup + could cause a crash. + * With MySQL Enterprise Backup, validation was added when backing up schemas without tables. * On Microsoft Windows, several ".pyc" files remained after uninstalling MySQL Workbench. - * Executing Backup recovery after a full Online backup - could cause a crash. - Changes in MySQL Workbench 6.1.3 (2014-03-24, Release Candidate) @@ -3083,18 +3564,18 @@ which affects the Snap To Grid option in the EER Diagram editor. (Bug #11754669, Bug #46306) - * A new Performance Reports page was added to the - Navigator. It provides a list of Performance Schema based - server-wide performance reports. + * The 'Visual Explain' feature was rewritten with a new + layout. The raw EXPLAIN output and JSON output are also + displayed. * A new Performance Dashboard was added to the Navigator. It is a graphical representation of the data/query flow of the connected MySQL server that shows status info from SHOW STATUS, P_S and other places. - * The 'Visual Explain' feature was rewritten with a new - layout. The raw EXPLAIN output and JSON output are also - displayed. + * A new Performance Reports page was added to the + Navigator. It provides a list of Performance Schema based + server-wide performance reports. * A Thread Stack view was added, and can be accessed by right-clicking a connection entry in the Client @@ -3452,7 +3933,7 @@ cause the new trigger edits to disappear. (Bug #17348212, Bug #70122) - * On Microsoft Windows, the mouse pointer inside a SQL + * On Microsoft Windows, the mouse pointer inside an SQL Editor tab would rapidly change from pointer to cursor when the mouse was moved, thus creating a repeatedly flashing event. (Bug #17347406, Bug #70119) @@ -3653,18 +4134,18 @@ * On OS X, an empty the Model Overview tab was empty. (Bug #16464436, Bug #68596) + * Reading a my.ini file that contained a non-commented line + before the first [section] would cause a crash. + + * On Microsoft Windows, the Print to File feature could + generate a corrupted PDF file. + * On Microsoft Windows, MySQL Workbench would only detect the connection settings when the list of locally installed instances was detected. It now also detects the instance settings, such as the service name and configuration file location. - * On Microsoft Windows, the Print to File feature could - generate a corrupted PDF file. - - * Reading a my.ini file that contained a non-commented line - before the first [section] would cause a crash. - Changes in MySQL Workbench 6.0.5 (2013-08-01, Release Candidate) This is the first RC release of 6.0. It is meant for testing @@ -3685,8 +4166,8 @@ dialog, did not report that the rename operation was successful. (Bug #14508931, Bug #66340) - * On Microsoft Windows, the log file viewer would emit an - exception when very long log entries were present. + * MySQL Workbench would crash after excessive Control + C + and Control + V operations on modeling objects. * On Microsoft Windows, code signing was enabled on the Windows executables. @@ -3699,8 +4180,8 @@ except in XP. This solves a potential freeze when opening the SQL editor in Microsoft Windows 8. - * MySQL Workbench would crash after excessive Control + C - and Control + V operations on modeling objects. + * On Microsoft Windows, the log file viewer would emit an + exception when very long log entries were present. * The mysql-workbench-gpl packages were renamed to mysql-workbench-community, and various RPM packaging @@ -4142,7 +4623,7 @@ selected by default. (Bug #16433144, Bug #68499) * After creating a table against a MySQL server with - lower_case_table_names enabled, the Object Browser would + lower_case_table_names set to 1, the Object Browser would display the new table name as the user entered it, instead of displaying how it was created with lower-case. The lowercase version is now displayed, and the user is @@ -4744,8 +5225,9 @@ includes the ability to search/replace within the Alter Table window. (Bug #11759599, Bug #51923) - * MySQL Workbench no longer bundles the μ, as they are - installed as separate packages. + * Added MySQL Enterprise Backup support. A GUI for the + MySQL Enterprise Backup command-line now exists inside + MySQL Workbench SE for Enterprise users. * Added a code editing toolbar for all SQL editors in both the modeling and query editor interfaces. @@ -4753,23 +5235,6 @@ * Added the ability to create tables from user templates, which includes a table template editor. - * Code completion now supports all query types, in addition - to SELECT statements. Suggestions are now displayed for - all database object types, such as triggers, event, and - indexes, in addition to schemas, tables and columns. - - * Added MySQL Enterprise Backup support. A GUI for the - MySQL Enterprise Backup command-line now exists inside - MySQL Workbench SE for Enterprise users. - - * On Microsoft Windows version 7 and above, support for - application color schemes was added, and they are - dynamically switchable via the MySQL Workbench - preferences. - - * Added schemata migration support for SQL Anywhere and - SQLite. - * Added plugins to build SQL queries for: + Cascading DELETE statements for selected tables. @@ -4781,10 +5246,26 @@ tables that automatically determine the intermediate tables by using the shortest path. + * Added the database search feature. + * Added a new Schema Manager feature, which is found under Schema, Schema Manager. - * Added the database search feature. + * Added schemata migration support for SQL Anywhere and + SQLite. + + * Code completion now supports all query types, in addition + to SELECT statements. Suggestions are now displayed for + all database object types, such as triggers, event, and + indexes, in addition to schemas, tables and columns. + + * On Microsoft Windows version 7 and above, support for + application color schemes was added, and they are + dynamically switchable via the MySQL Workbench + preferences. + + * MySQL Workbench no longer bundles the μ, as they are + installed as separate packages. Bugs Fixed @@ -5041,7 +5522,7 @@ * The ability to select code in the SQL Editor by clicking on line numbers was restored. (Bug #14483713, Bug #66139) - * On Mac OS X, and in the table editor, the schema name was + * On OS X, and in the table editor, the schema name was changed from a dropdown-box to a simple label. (Bug #14456213) @@ -5115,7 +5596,7 @@ * On Linux, a warning will now warn you after attempting to close the SQL Editor when unsaved INSERT changes still exist. - Also, all platforms (Linux, Mac OS X, Windows) are now + Also, all platforms (Linux, OS X, Windows) are now consistent, and will also warn you after attempting to close MySQL Workbench with any unsaved changes. (Bug #11758193, Bug #50363) @@ -5181,16 +5662,16 @@ changes with the Alter Table tool would not prompt the user with the save dialog. (Bug #14456136) - * OS X: On Mac OS X, the default column name and column - type model preferences + * OS X: On OS X, the default column name and column type + model preferences (http://dev.mysql.com/doc/workbench/en/wb-preferences-mod eling.html) did not function. Note that this feature does not function on Linux. (Bug #14399236, Bug #66090) * OS X: The ability to select multiple columns in the - models table editor did not function on Mac OS X. It is - now possible to use Shift, Command, and mouse dragging. - (Bug #11766291, Bug #59372) + models table editor did not function on OS X. It is now + possible to use Shift, Command, and mouse dragging. (Bug + #11766291, Bug #59372) * Microsoft Windows; Models: After opening and then closing a model file from the file manager, attempts to open a @@ -5506,7 +5987,7 @@ * Having multiple connections with TCP/IP over SSH could cause MySQL Workbench to not connect when exceeding MaxAuthTries. This may happen if an encryption type is - unknown. The bundled paramiko library (on Mac OS X, and + unknown. The bundled paramiko library (on OS X, and Windows) was updated to version 1.7.7.1, which helps solve this problem, as it adds known support for OpenSSL keys. (Bug #13919914, Bug #64802) @@ -5611,8 +6092,8 @@ * The object browser would not update the column order after a table was altered. (Bug #14495629, Bug #66232) - * On Mac OS X systems with the Retina display, the mouse - cursor would register incorrect mouse coordinates. (Bug + * On OS X systems with the Retina display, the mouse cursor + would register incorrect mouse coordinates. (Bug #14396939, Bug #65607) * Entering the caret ("^") character inside the SQL editor, @@ -5751,8 +6232,8 @@ correctly. Instead it would appear as an underline to the next character. (Bug #14467930, Bug #66248) - * On Mac OS X, code signing was added to MySQL Workbench so - it will now load when this condition is required. (Bug + * On OS X, code signing was added to MySQL Workbench so it + will now load when this condition is required. (Bug #14457847, Bug #66052) * On a table with a multiple field foreign key, attempts to @@ -5805,8 +6286,8 @@ GeneralQueryLog from within the MySQL Workbench scripting shell would result in an error. (Bug #14128312) - * On Mac OS X, new tabs could not be closed (via the [x]) - if ten or more tabs were already open, and if the total + * On OS X, new tabs could not be closed (via the [x]) if + ten or more tabs were already open, and if the total MySQL Workbench window width exceeded around 1200px. (Bug #14127281, Bug #65186) @@ -5828,7 +6309,7 @@ not function on Microsoft Windows, and only created one table on Linux. (Bug #14026694, Bug #14026709) - * On Mac OS X, hiding a window pane (such as the snippets) + * On OS X, hiding a window pane (such as the snippets) would cause the window pane to remain hidden, even after restarting MySQL Workbench. (Bug #14017268, Bug #65138) @@ -5887,8 +6368,8 @@ preference for SQL Queries did not function. (Bug #12612409) - * On Mac OS X, the Server Status tool would fail to find - the server. (Bug #11766286, Bug #59365) + * On OS X, the Server Status tool would fail to find the + server. (Bug #11766286, Bug #59365) * MySQL Workbench would not export data when using a remote server connection through SSL with certificates. (Bug @@ -5903,8 +6384,8 @@ and then adding it back. This only affected multiline SQL statements. (Bug #11763319, Bug #56015) - * On Mac OS X, the window to set up a Standard TCP/IP over - SSH connection contained incorrect descriptions. And the + * On OS X, the window to set up a Standard TCP/IP over SSH + connection contained incorrect descriptions. And the dialogue now behaves more intelligently. (Bug #11761555, Bug #54061) @@ -5985,9 +6466,8 @@ * Models that were temporarily saved as "Unsaved models" could not be deleted. (Bug #13742833) - * On Mac OS X, attempts to store a password into the - keychain could result in an error. (Bug #13387025, Bug - #62279) + * On OS X, attempts to store a password into the keychain + could result in an error. (Bug #13387025, Bug #62279) * A signal statement in a stored procedure was not supported, and would report a syntax error. (Bug @@ -6081,9 +6561,9 @@ Bug #65574) * It is now possible to select a range of rows using the - shift key. And on Mac OS X, the command key will now - allow the selection of individual rows (Bug #14177386, - Bug #65569) + shift key. And on OS X, the command key will now allow + the selection of individual rows (Bug #14177386, Bug + #65569) * An orphaned privileges tab would be shown in the table editor when switching tables. Now only the current @@ -6128,7 +6608,7 @@ * The Replace All option would not function when the replacement string was empty. (Bug #13919875, Bug #64818) - * On Linux and Mac OS X, it was not possible to select/copy + * On Linux and OS X, it was not possible to select/copy multiple rows from within the result set grid. (Bug #13895191) @@ -6195,15 +6675,15 @@ while a row is selected, then MySQL Workbench would delete the selected row. (Bug #13744346) - * On Mac OS X, the color dropdown in the object tool would - not display the color properly. It instead showed the - color code, and would not apply the color to the object. - (Bug #13742905) - - * On Mac OS X, the Option key did not behave like a - standard Mac OX application. For example, Option + Delete - would delete one character instead of one word. (Bug - #13702376, Bug #64217) + * On OS X, the color dropdown in the object tool would not + display the color properly. It instead showed the color + code, and would not apply the color to the object. (Bug + #13742905) + + * On OS X, the Option key did not behave like a standard + Mac OX application. For example, Option + Delete would + delete one character instead of one word. (Bug #13702376, + Bug #64217) * Added version dependent keyword list support for syntax highlighting. Supports MySQL Server 5.0, 5.1, 5.5, and @@ -6213,9 +6693,9 @@ cause MySQL Workbench to use an excessive amount of memory and CPU. (Bug #13642999, Bug #64077) - * On Mac OS X, and while working with mixed-case table - names, a foreign key could not be assigned to link two - InnoDB tables together. (Bug #13639162, Bug #64109) + * On OS X, and while working with mixed-case table names, a + foreign key could not be assigned to link two InnoDB + tables together. (Bug #13639162, Bug #64109) * The Model, Model Options, Diagram, Hide Captions option could not be altered (disabled) and would remain checked @@ -6284,8 +6764,8 @@ display an empty AUTO_INCREMENT value for tables using InnoDB. (Bug #13463458, Bug #63464) - * On Mac OS X, Command + A would not select all results - from the result set. (Bug #13463374, Bug #63461) + * On OS X, Command + A would not select all results from + the result set. (Bug #13463374, Bug #63461) * After synchronizing a database, refreshing a model would not refresh the stored procedure information. (Bug @@ -6366,7 +6846,7 @@ would not show all of the available partitions. (Bug #11933015, Bug #60235) - * On Mac OS X, having a large number of databases (1,000+) + * On OS X, having a large number of databases (1,000+) could cause performance issues where MySQL Workbench would load in several minutes, as opposed to a few seconds. (Bug #11869432, Bug #60420) @@ -6397,7 +6877,7 @@ SQL Editor GUI, as it was required to reopen the table editor to see the changes. (Bug #65411, Bug #14137775) - * On Mac OS X, MySQL Workbench would crash when changing + * On OS X, MySQL Workbench would crash when changing database engines if a database included a table with uppercase characters. (Bug #65376, Bug #14117038) @@ -6528,7 +7008,7 @@ Export to Self-Contained File option with a UNC path. (Bug #13701996, Bug #64267) - * On Mac OS X, the schema sidebar was missing a horizontal + * On OS X, the schema sidebar was missing a horizontal scrollbar. (Bug #13596326, Bug #64000) * Inserting a snippet into the SQL Editor could insert @@ -6589,10 +7069,10 @@ glib.h can be included directly. (Bug #63705, Bug #13500364) - * On Mac OS X, expanding the schema for a remote database - from within the SQL Editor tab would crash, if the SQL - editor tab was closed before the tables were done being - fetched. (Bug #63589, Bug #13500242) + * On OS X, expanding the schema for a remote database from + within the SQL Editor tab would crash, if the SQL editor + tab was closed before the tables were done being fetched. + (Bug #63589, Bug #13500242) * The minimum size of the MySQL Workbench window has been lowered to 980x600 pixels, although officially the @@ -6605,10 +7085,10 @@ Workbench attempting to access the mysql.event table. (Bug #63149, Bug #13496657) - * On Mac OS X, when viewing the results of a query that - would normally exceed the window width, the last column - would have a width of one character if the column type - was numeric. (Bug #62588, Bug #13365052) + * On OS X, when viewing the results of a query that would + normally exceed the window width, the last column would + have a width of one character if the column type was + numeric. (Bug #62588, Bug #13365052) * Database, Synchronize Model would not update the view after a new field was added. (Bug #62569, Bug #13051152) @@ -6798,9 +7278,9 @@ A workaround is to explicitly set the table engine to InnoDB. (Bug #63934, Bug #13562926) - * On Mac OS X, opening files saved from previous versions - of MySQL Workbench would result in an empty window, - without data being loaded. (Bug #63932, Bug #13571842) + * On OS X, opening files saved from previous versions of + MySQL Workbench would result in an empty window, without + data being loaded. (Bug #63932, Bug #13571842) * On Microsoft Windows, and when called from the home screen, opening and immediately closing the Manage Server @@ -6860,8 +7340,8 @@ pkgconfig files if present, to determine the location of GL/{gl,glx}.h and libGL.so. (Bug #63818, Bug #13538964) - * On Linux and Mac OS X, the Replace All search feature - would hang, and not function properly. (Bug #63764, Bug + * On Linux and OS X, the Replace All search feature would + hang, and not function properly. (Bug #63764, Bug #13520443) * MySQL Workbench would not work with paramiko 1.7+. (Bug @@ -6879,9 +7359,9 @@ on systems with dark backgrounds. (Bug #63715, Bug #13500349) - * On Mac OS X, exporting a database that has a stored - procedure resulted in an unhandled exception. (Bug - #63653, Bug #13476062) + * On OS X, exporting a database that has a stored procedure + resulted in an unhandled exception. (Bug #63653, Bug + #13476062) * On Microsoft Windows, changing or deleting a row or column within a model, could cause a crash. (Bug #63056, @@ -6920,10 +7400,10 @@ would sometimes crash MySQL Workbench. (Bug #62451, Bug #13014823) - * On Mac OS X 10.7+, the "Open File" panel would attempt to + * On OS X 10.7+, the "Open File" panel would attempt to show hidden files, which failed and cause no files to be shown. MySQL Workbench no longer attempts to display - hidden files on Mac OS X. (Bug #62172, Bug #12912085) + hidden files on OS X. (Bug #62172, Bug #12912085) * Pressing the Control + Enter key combination within the SQL editor would generate a recoverable error. (Bug @@ -7048,7 +7528,7 @@ screen, or if the schema tree was not expanded. (Bug #13466131) - * On Mac OS X, the File, Open Recent feature would open the + * On OS X, the File, Open Recent feature would open the incorrect script. (Bug #13028666) * Viewing the Server Logs on a MySQL server after it has @@ -7056,7 +7536,7 @@ #12908134) * Options unrelated to the SQL Editor would be available - under the View menu while a SQL editor window was open. + under the View menu while an SQL editor window was open. (Bug #11763150, Bug #55830) * Pasting from the clipboard would not work in the hostname @@ -7115,9 +7595,9 @@ using a 1024x768 screen resolution. (Bug #62341, Bug #12967541) - * On Mac OS X, clicking Apply within the Alter Table - dialogue on a table with foreign constraints would crash - MySQL Workbench. (Bug #62042, Bug #12844307) + * On OS X, clicking Apply within the Alter Table dialogue + on a table with foreign constraints would crash MySQL + Workbench. (Bug #62042, Bug #12844307) * MySQL Workbench required the Andale Mono font. (Bug #61782, Bug #12757325) @@ -7311,7 +7791,7 @@ * After right-clicking a cell within the insert grid of the model table editor, an unhandled exception was generated - on Microsoft Windows, and a fatal error on Mac OS X. (Bug + on Microsoft Windows, and a fatal error on OS X. (Bug #13029647) * The Manage Security window initially shows the first @@ -7475,9 +7955,8 @@ * The File, Open Recent feature would open the incorrect script. (Bug #61856, Bug #12912374) - * On Mac OS X, switching from the Model tab to the EER - Diagram tab caused an error sound. (Bug #61809, Bug - #12757337) + * On OS X, switching from the Model tab to the EER Diagram + tab caused an error sound. (Bug #61809, Bug #12757337) * File, Export, Forward Engineer SQL CREATE Script would append an extra space to TINYINT(1) after converting it @@ -7556,7 +8035,7 @@ * MySQL Workbench would sometimes crash while in Forward Engineering mode. (Bug #60950, Bug #12572071) - * On Linux and Mac OS X, using Tab and Shift+Tab to jump to + * On Linux and OS X, using Tab and Shift+Tab to jump to next/previous fields has been added to the query result view. It had previously only worked on Windows. Additionally, the Escape key will now cancel editing of @@ -7613,7 +8092,7 @@ * On Linux, viewing the embedded documentation required the python-sqlite2 package. (Bug #60336, Bug #11874507) - * On Mac OS X, Command+W will now close the active script + * On OS X, Command+W will now close the active script editor tab, and Command+Shift+W will now close the active connection tab. This is now consistent with behavior on other operating systems. Before, the Command+W @@ -7788,22 +8267,22 @@ Applied to the Database form, the second time, after selecting Go Back. (Bug #61632, Bug #12694149) - * On Mac OS X, an unchanged MWB file would prompt to save - after exiting, and then crash after selecting Yes. (Bug - #61547, Bug #12668099) - - * On Mac OS X, connecting to remote servers using SSH - tunnels failed to connect. The workaround was to manually - test the connection first, via the Manage Connections - menu. (Bug #61537, Bug #12674397) + * On OS X, an unchanged MWB file would prompt to save after + exiting, and then crash after selecting Yes. (Bug #61547, + Bug #12668099) + + * On OS X, connecting to remote servers using SSH tunnels + failed to connect. The workaround was to manually test + the connection first, via the Manage Connections menu. + (Bug #61537, Bug #12674397) * Viewing the Admin Management option Server Logs with an empty TABLE resulted in an unhandled exception. (Bug #61523, Bug #12674989) - * On Mac OS X, the Operation in progress dialogue would - stall when using database connections from older versions - of MySQL Workbench. The workaround was to move the mouse. + * On OS X, the Operation in progress dialogue would stall + when using database connections from older versions of + MySQL Workbench. The workaround was to move the mouse. (Bug #61416, Bug #12627853) * On Microsoft Windows, a MySQL Workbench Unexpected Error @@ -7811,9 +8290,9 @@ each with their own database connection to the same server. (Bug #61367, Bug #12612181) - * On Mac OS X, disabling the Enable data changes commit - wizard preference setting would not disable the wizard. - (Bug #61354, Bug #12616314) + * On OS X, disabling the Enable data changes commit wizard + preference setting would not disable the wizard. (Bug + #61354, Bug #12616314) * The SQL Editor Output, History window contained escaped characters. For example, a "'" was written as "'". @@ -8229,7 +8708,7 @@ mismanaged such that the proper set of tabs did not remain available. (Bug #57349, Bug #11764509) - * On Mac OS X, Option+Delete functioned as Undo rather than + * On OS X, Option+Delete functioned as Undo rather than deleting the word to the left of the cursor. (Bug #57184, Bug #11764360) @@ -8252,7 +8731,7 @@ display were not working, and the information was not formatted properly. (Bug #54191, Bug #11761676) - * On Mac OS X, two-finger scrolling did not work in query + * On OS X, two-finger scrolling did not work in query windows. (Bug #53678, Bug #11761211) * The TRIGGER privilege could not be assigned at the schema @@ -8269,7 +8748,7 @@ modifications to schema objects. (Bug #50424, Bug #11758248) - * On Mac OS X, the Shift+Alt + Arrow combination selected + * On OS X, the Shift+Alt + Arrow combination selected individual characters instead of words. (Bug #50085, Bug #11757963) @@ -9460,8 +9939,8 @@ replaced by the contents of the new view, even though the new view was created with a different name. (Bug #55661) - * MySQL Workbench application failed to start on Mac OS X. - (Bug #55412) + * MySQL Workbench application failed to start on OS X. (Bug + #55412) * MySQL Workbench exhibited a variety of crashes if, in the Model View, EER diagrams were repeatedly created and @@ -10391,7 +10870,7 @@ * MySQL Workbench now supports creating a new tab in tabbed interfaces by using Control+T on Windows and Command+T on - Mac OS X. (Bug #48798) + OS X. (Bug #48798) * MySQL Workbench now supports entering of expressions such as DEFAULT or CURRENT_TIMESTAMP into the inserts editor. @@ -10498,7 +10977,7 @@ schema name was entered, and changes applied, the schema name appeared to revert to the default name new_schema, rather than being changed to the newly specified name. - This only happened on Mac OS X. (Bug #53764) + This only happened on OS X. (Bug #53764) * In the SQL Editor, if two procedures were defined in a script, each proceded with a suitable DROP statement, @@ -10715,8 +11194,7 @@ (Bug #51091) * Inserts added to a model and saved on Windows were not - visible when that model was loaded on Mac OS X. (Bug - #51029) + visible when that model was loaded on OS X. (Bug #51029) * In the SQL Editor, carrying out a SELECT on a table containing more than 1000 columns resulted in the error @@ -10818,8 +11296,8 @@ password was stored in the keychain, MySQL Workbench could not connect to the server. (Bug #53355) - * On Mac OS X, the overlay text for NULL and BLOB fields - was missing from the results grid in the SQL editor. This + * On OS X, the overlay text for NULL and BLOB fields was + missing from the results grid in the SQL editor. This meant that those fields appeared empty if a query was executed that returned a BLOB, such as SELECT SHA1('hello');. (Bug #53335) @@ -12399,7 +12877,7 @@ * If text was entered into the search bar in the SQL Editor, and the sidebar button clicked twice, MySQL - Workbench crashed. This only happened on Mac OS X. (Bug + Workbench crashed. This only happened on OS X. (Bug #50560) * In the Columns tab of the Table Editor, attempting to @@ -12581,9 +13059,8 @@ * In the SQL Editor, if an object was created or renamed, that change was not reflected in the user interface. This - change fixes the problem for Linux and Mac OS X. (Bug - #49454) - References: See also Bug #50424. + change fixes the problem for Linux and OS X. (Bug #49454) + References: See also: Bug #50424. * Invalid values were written to the MySQL server configuration file by the configuration editor. MySQL @@ -12652,12 +13129,11 @@ engine type contained a reference to calpont. This should now be infinidb. (Bug #50159) - * In Mac OS X, the context-sensitive menu was missing from - the live editing tab of the SQL Editor. Right-clicking in - the editing tab simply displayed a Mac OS X menu, rather - than the context-sensitive menu to enable actions such as - copying, deletion and setting selections to NULL. (Bug - #50114) + * In OS X, the context-sensitive menu was missing from the + live editing tab of the SQL Editor. Right-clicking in the + editing tab simply displayed a OS X menu, rather than the + context-sensitive menu to enable actions such as copying, + deletion and setting selections to NULL. (Bug #50114) * Custom Python modules failed to load and were not displayed in the MySQL Workbench Plugins menu. @@ -12709,7 +13185,7 @@ Commands out of sync; you can't run this command now This problem only affected MySQL Workbench running on the - Mac OS X platform. (Bug #49553) + OS X platform. (Bug #49553) * Right-clicking a Routine Group and then selecting Copy SQL to Clipboard did not work. No code was copied to the @@ -13604,9 +14080,9 @@ editing window if a key was not pressed for a few seconds. Note - On Windows this issue was fixed in 5.1.18. On Mac OS X - this issue was fixed in 5.2.4. On Linux this issue was - fixed in 5.2.7. + On Windows this issue was fixed in 5.1.18. On OS X this + issue was fixed in 5.2.4. On Linux this issue was fixed + in 5.2.7. (Bug #48156) * Attempting to export the result of an SQL query to CSV @@ -13802,10 +14278,10 @@ * Some keyboard shortcuts have been changed. On Microsoft Windows and Linux Control+Y is now used for - Redo. Mac OS X continues to use Command+Shift+Z as its + Redo. OS X continues to use Command+Shift+Z as its default for Redo. For Synchronize Model, Control+Alt+Y is used on Windows and Linux, and Command+Control+Y is used - on Mac OS X. (Bug #46285) + on OS X. (Bug #46285) Bugs Fixed @@ -13814,9 +14290,9 @@ editing window if a key was not pressed for a few seconds. Note - On Windows this issue was fixed in 5.1.18. On Mac OS X - this issue was fixed in 5.2.4. On Linux this issue was - fixed in 5.2.7. + On Windows this issue was fixed in 5.1.18. On OS X this + issue was fixed in 5.2.4. On Linux this issue was fixed + in 5.2.7. (Bug #48156) * If a new empty EER diagram was created, then Model, @@ -13903,8 +14379,8 @@ (Bug #47044) - * On Mac OS X using cmd + backspace to delete a column in - the table editor did not work. (Bug #46613) + * On OS X using cmd + backspace to delete a column in the + table editor did not work. (Bug #46613) * In the Synchronize Model with Database dialog the text in the upper right area of the dialog did not wrap @@ -13962,8 +14438,8 @@ otherwise NULL will be interpreted as a string literal. (Bug #47122) - * MySQL Workbench crashed on launch on Mac OS X 10.6.0. - (Bug #46953) + * MySQL Workbench crashed on launch on OS X 10.6.0. (Bug + #46953) * If the Default Storage Engine was selected as MyISAM in the Model Options dialog, when a new table was created in @@ -13981,7 +14457,7 @@ * If the Table Editor had been invoked then the Text Boxes in the Tools, Preferences dialog became vertically misaligned. This only happened for MySQL Workbench - running on Mac OS X. (Bug #46255) + running on OS X. (Bug #46255) * When a connection was selected in the DB Connection Editor it appeared to flicker a number of times before @@ -13992,7 +14468,7 @@ Procedures were not displayed in the Routine Editor, and so could not be edited. (Bug #45704) - * When running MySQL Workbench on Mac OS X, if a table was + * When running MySQL Workbench on OS X, if a table was added to the model diagram and deleted the application crashed. This happened for a new diagram from a schema imported from a live database. (Bug #45692) @@ -14017,9 +14493,9 @@ Further, the spec file in the package had the incorrect suffix ".spec.in" instead of ".spec". (Bug #45515) - * On Mac OS X, it was not possible to resize a Text Object - on the EER Diagram canvas. (Bug #45472) - References: See also Bug #39887. + * On OS X, it was not possible to resize a Text Object on + the EER Diagram canvas. (Bug #45472) + References: See also: Bug #39887. * It was not possible to assign columns to indexes because the Column check boxes did not respond to mouse events. @@ -14068,8 +14544,7 @@ * MySQL Workbench 5.1.16 failed to create INSERTs in the exported DDL for some tables. (Bug #45920) - * MySQL Workbench crashed at startup on Mac OS X. (Bug - #45869) + * MySQL Workbench crashed at startup on OS X. (Bug #45869) * If MySQL Workbench gave the message that the MySQL Server was no longer available (because of timeout due to @@ -14186,9 +14661,9 @@ editing window if a key was not pressed for a few seconds. Note - On Windows this issue was fixed in 5.1.18. On Mac OS X - this issue was fixed in 5.2.4. On Linux this issue was - fixed in 5.2.7. + On Windows this issue was fixed in 5.1.18. On OS X this + issue was fixed in 5.2.4. On Linux this issue was fixed + in 5.2.7. (Bug #48156) * MySQL Workbench generated an unhandled exception when @@ -14201,8 +14676,8 @@ Editor wizard did not appear to have any effect. (Bug #47083) - * MySQL Workbench crashed on launch on Mac OS X 10.6.0. - (Bug #46953) + * MySQL Workbench crashed on launch on OS X 10.6.0. (Bug + #46953) * When the data type of a table column was changed in the Table Editor, it was not reflected in the EER Diagram, @@ -14518,7 +14993,7 @@ * If the Table Editor had been invoked then the Text Boxes in the Tools, Preferences dialog became vertically misaligned. This only happened for MySQL Workbench - running on Mac OS X. (Bug #46255) + running on OS X. (Bug #46255) * When an SQL Script was added and then its name changed, the name would erroneously revert back to "Script". (Bug @@ -14585,8 +15060,7 @@ * MySQL Workbench 5.1.16 failed to create INSERTs in the exported DDL for some tables. (Bug #45920) - * MySQL Workbench crashed at startup on Mac OS X. (Bug - #45869) + * MySQL Workbench crashed at startup on OS X. (Bug #45869) * When a model was synchronized with a live database, and only stored procedures needed to be synchronized, this @@ -14595,9 +15069,8 @@ (Bug #45867) - * In MySQL Workbench running on Mac OS X, if any changes - were made in the Page Setup dialog, this error was - generated: + * In MySQL Workbench running on OS X, if any changes were + made in the Page Setup dialog, this error was generated: builtin:wb.page_setup Type mismatch: expected object of type app.PaperType, but got app.Pape @@ -14669,9 +15142,9 @@ did load correctly using MySQL Workbench 5.1.12. (Bug #45491) - * On Mac OS X, it was not possible to resize a Text Object - on the EER Diagram canvas. (Bug #45472) - References: See also Bug #39887. + * On OS X, it was not possible to resize a Text Object on + the EER Diagram canvas. (Bug #45472) + References: See also: Bug #39887. * When synchronizing a model with a live database, clicking the Update Model actually caused the server to be updated @@ -14856,8 +15329,8 @@ tab of the Table Editor, a timer appeared to periodically fire, which caused the delimiter to be added while typing. - This only happened when using the Mac OS X version of - MySQL Workbench. (Bug #44264) + This only happened when using the OS X version of MySQL + Workbench. (Bug #44264) * In the Forward Engineer SQL Script wizard, the location opened by the Browse button defaulted to the MySQL @@ -14982,7 +15455,7 @@ Bugs Fixed - * On Mac OS X, MySQL Workbench crashed when creating a new + * On OS X, MySQL Workbench crashed when creating a new document after another one had been worked on. If editing a document, and then selecting to create a new document and not saving the current document when @@ -15026,7 +15499,7 @@ Open Editor facility has been used to add them. (Bug #45233) - * On Mac OS X, using the Forward Engineer to Database, or + * On OS X, using the Forward Engineer to Database, or Forward Engineer SQL Script wizards caused MySQL Workbench to generate this error message: The application MySQLWorkbench quit unexpectedly after it was relaunch @@ -15054,7 +15527,7 @@ (Bug #45139) - * On Mac OS X, if the mouse pointer was used to select an + * On OS X, if the mouse pointer was used to select an entity and then Command+Delete was pressed before the tooltip appeared, MySQL Workbench crashed when the delete was confirmed. (Bug #45042) @@ -15186,8 +15659,8 @@ an existing file without prompting the user for confirmation. (Bug #44437) - * On Mac OS X, an application window's red close button - should contain a solid circle if the current document is + * On OS X, an application window's red close button should + contain a solid circle if the current document is unsaved. However, for MySQL Workbench this did not work correctly. Although the circle was initially shown, it was not displayed after subsequent edits to the model. @@ -15434,9 +15907,9 @@ was not displayed in the Inserts tab, but was saved to the MWB file when the project was saved. The data could be viewed in MySQL Workbench running on platforms other - than Mac OS X, but the Mac OS X version of MySQL - Workbench did not display the data entered using the - Inserts tab. (Bug #43907) + than OS X, but the OS X version of MySQL Workbench did + not display the data entered using the Inserts tab. (Bug + #43907) * When a plugin was installed using the Tools, Install Plugin/Module File... menu option, MySQL Workbench copied @@ -15454,7 +15927,7 @@ dialogs were generated with this message: "AXDocument" attribute unsupported by - This occurred on the Mac OS X version of MySQL Workbench, + This occurred on the OS X version of MySQL Workbench, when a third-party usage monitoring utility was running. This error was due to the fact that custom exception reporting was disabled by default. (Bug #43872) @@ -15543,8 +16016,8 @@ Bugs Fixed - * MySQL Workbench 5.1.7 for Mac OS X crashed at startup. It - was looking for libmysqlclient.15, which was not found in + * MySQL Workbench 5.1.7 for OS X crashed at startup. It was + looking for libmysqlclient.15, which was not found in /usr/local/mysql/lib. The error generated was: Process: MySQLWorkbench [14915] Path: /Applications/MySQLWorkbench.app/Contents/MacOS/MySQL @@ -16779,7 +17252,7 @@ * MWB files were not saved properly if Workbench crashed. Reopening such files caused Workbench to crash. (Bug #34848) - References: See also Bug #34847. + References: See also: Bug #34847. * Workbench models created in version 5.0.13 crashed when used with version 5.0.14. The unscheduled Beta release, @@ -16808,16 +17281,6 @@ Workbench Improvements in this Version - * A System Information menu option has been added to the - Help menu. This option displays information about your - system that is useful when reporting a big. - - * A Fit Objects to Contents option has been added under the - Arrange menu option. This option expands an object on an - EER diagram. For example, if a table has a long column - name that is not fully displayed, using this menu option - will expand the table making the column name visible. - * Expand All and Collapse All menu options have been added under the Arrange menu. The Expand All option expands all objects on an EER. This option will display a table's @@ -16829,6 +17292,28 @@ Collapse All undoes the operation performed by Expand All. + * A Fit Objects to Contents option has been added under the + Arrange menu option. This option expands an object on an + EER diagram. For example, if a table has a long column + name that is not fully displayed, using this menu option + will expand the table making the column name visible. + + * A System Information menu option has been added to the + Help menu. This option displays information about your + system that is useful when reporting a big. + + * An Export as SVG menu option has been added under the + File, Export menu option. + + * Because of serious performance and display issues + Workbench no longer uses Mesa. For those users who don't + have native OpenGL support, Workbench now uses the + Windows GDI API. The command line switch for using this + mode is -swrendering. For more information about running + Workbench from the command line see Launching + (http://dev.mysql.com/doc/workbench/en/wb-launching-windo + ws.html). + * The GRT inspector has been improved to support new types. Namely: @@ -16846,18 +17331,6 @@ improved---you can easily change a value for several selected objects at once. - * An Export as SVG menu option has been added under the - File, Export menu option. - - * Because of serious performance and display issues - Workbench no longer uses Mesa. For those users who don't - have native OpenGL support, Workbench now uses the - Windows GDI API. The command line switch for using this - mode is -swrendering. For more information about running - Workbench from the command line see Launching - (http://dev.mysql.com/doc/workbench/en/wb-launching-windo - ws.html). - Bugs Fixed * When exporting an SQL CREATE script it was possible to diff -Nru mysql-workbench-6.3.6+dfsg/CMakeLists.txt mysql-workbench-6.3.8+dfsg/CMakeLists.txt --- mysql-workbench-6.3.6+dfsg/CMakeLists.txt 2015-12-10 13:46:20.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/CMakeLists.txt 2016-10-14 12:12:04.000000000 +0000 @@ -30,6 +30,10 @@ # Look for our custom modules in cmake/Modules: set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/build/cmake/Modules/") +if(ENABLE_COTIRE AND CMAKE_VERSION VERSION_GREATER "2.8.11") + include(cotire) + set_property(DIRECTORY PROPERTY COTIRE_UNITY_LINK_LIBRARIES_INIT "COPY_UNITY") +endif() find_package(PkgConfig REQUIRED) find_package(X11) @@ -74,7 +78,7 @@ # We need to be able to detect python module versions and packages hence this function -FIND_PROGRAM(PYTHON_EXEC "python") +FIND_PROGRAM(PYTHON_EXEC "python2") include(FindPackageHandleStandardArgs) function(find_python_module module minver) string(TOUPPER ${module} module_upper) @@ -105,6 +109,9 @@ if (UNIX) set(MYSQL_DEFINITIONS "-DBIG_JOINS=1" "-fno-strict-aliasing") endif() +set(PRECOMPILED_HEADERS_EXCLUDE_PATHS "/usr/include/gdal;/usr/include/arpa;${CMAKE_SOURCE_DIR};${PROJECT_SOURCE_DIR}/ext/antlr-runtime;${PROJECT_BINARY_DIR};${MySQL_INCLUDE_DIRS}") + + find_package(LibXml2 REQUIRED) @@ -266,6 +273,7 @@ add_definitions(-D__STDC_FORMAT_MACROS) set(BUILD_SHARED_LIBS ON) # By default all libs will be built as shared libs +SET(GCOV OFF CACHE BOOL "Add gcov flags") # Add some common compiler flags. TODO: Shouldn't this be done checking if whatever compiler # we use supports each flag to allow for non-gcc compilers in Linux (as above)? @@ -276,6 +284,11 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MY_CXXFLAGS}") endif() +if(GCOV) + set(MY_CXXFLAGS "${MY_CXXFLAGS} -fprofile-arcs -ftest-coverage") +endif() + + #----------------------------------------------------------------------- # Define some useful variables and options diff -Nru mysql-workbench-6.3.6+dfsg/debian/changelog mysql-workbench-6.3.8+dfsg/debian/changelog --- mysql-workbench-6.3.6+dfsg/debian/changelog 2016-07-14 14:12:34.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/changelog 2016-11-18 21:09:03.000000000 +0000 @@ -1,41 +1,36 @@ -mysql-workbench (6.3.6+dfsg-0ubuntu4) yakkety; urgency=medium +mysql-workbench (6.3.8+dfsg-1) unstable; urgency=medium - * Rebuild against gdal-abi-2-1-1. + * New upstream release [October 2016]. + * Removed obsolete "gtk.patch". + * Added new "projloc.patch". + * debhelper/compat to version 10. + * Recommends: mysql-client --> default-mysql-client. + * Standards-Version: 3.9.8; + * Do not install menu and .xpm files; + removed "imagemagick" from Build-Depends. + * Build-Depends += "dh-python"; invoke dh_python2 with "--no-ext-rename". + * Build-Depends: strict libmysqlcppconn-dev versioning (Closes: #844381). + + -- Dmitry Smirnov Sat, 19 Nov 2016 08:09:03 +1100 + +mysql-workbench (6.3.6+dfsg-1) unstable; urgency=medium + + * New upstream release [December 2015]. + + fixed "Unhandled exception on Data Export" (Closes: #822413). + + fixed "don't open files with same name but difference locations" + (Closes: #804774). + * Switch to "default-libmysqlclient-dev" + (Closes: #840786, #841584, #843457, #843887). + * Modernised Vcs URLs; copyright format URL to HTTPS. + * Removed traces of -dbg package. + * New patches: + + gtk.patch (Closes: #839356). + + mariadb-build.patch + + mariadb-version.patch + + no-MYSQL_TYPE_JSON.patch + * Removed obsolete "gcc5.patch". - -- Gianfranco Costamagna Thu, 14 Jul 2016 16:12:34 +0200 - -mysql-workbench (6.3.6+dfsg-0ubuntu3) yakkety; urgency=medium - - * No-change rebuild against libctemplate3 - - -- Steve Langasek Wed, 18 May 2016 23:06:51 +0000 - -mysql-workbench (6.3.6+dfsg-0ubuntu2) yakkety; urgency=medium - - * No-change rebuild for libpng soname change. - - -- Matthias Klose Fri, 29 Apr 2016 14:11:20 +0000 - -mysql-workbench (6.3.6+dfsg-0ubuntu1) xenial; urgency=medium - - [ Lars Tangvald ] - * New upstream release for MySQL 5.7 support (LP: #1568793). - * Disable patches (fixed upstream): - - d/p/gcc5.patch - - d/p/pythonlibs.patch - - d/p/wbcopytables-rpath.patch - - [ Robie Basak ] - * Bump libmysqlcppconn-dev versioned build dependency for the required - 5.7 support. - - -- Lars Tangvald Sun, 03 Apr 2016 14:04:26 +0200 - -mysql-workbench (6.3.4+dfsg-3build1) xenial; urgency=medium - - * Rebuild with the new gdal - - -- Sebastien Bacher Mon, 23 Nov 2015 15:30:29 +0100 + -- Dmitry Smirnov Mon, 14 Nov 2016 01:12:33 +1100 mysql-workbench (6.3.4+dfsg-3) unstable; urgency=medium diff -Nru mysql-workbench-6.3.6+dfsg/debian/clean mysql-workbench-6.3.8+dfsg/debian/clean --- mysql-workbench-6.3.6+dfsg/debian/clean 2016-04-11 09:41:03.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/clean 2016-11-18 03:54:56.000000000 +0000 @@ -1,5 +1,4 @@ CMakeCache.txt -debian/*.xpm ext/antlr-runtime/aclocal.m4 ext/antlr-runtime/antlr3config.h ext/antlr-runtime/antlr3config.h.in diff -Nru mysql-workbench-6.3.6+dfsg/debian/compat mysql-workbench-6.3.8+dfsg/debian/compat --- mysql-workbench-6.3.6+dfsg/debian/compat 2016-04-11 09:41:03.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/compat 2016-11-16 16:17:30.000000000 +0000 @@ -1 +1 @@ -9 +10 diff -Nru mysql-workbench-6.3.6+dfsg/debian/control mysql-workbench-6.3.8+dfsg/debian/control --- mysql-workbench-6.3.6+dfsg/debian/control 2016-04-11 14:17:12.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/control 2016-11-18 03:57:07.000000000 +0000 @@ -1,10 +1,10 @@ Source: mysql-workbench Section: database Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Dmitry Smirnov +Maintainer: Dmitry Smirnov Uploaders: Mateusz Kijowski -Build-Depends: debhelper (>= 9), dh-autoreconf, cmake, perl, imagemagick +Build-Depends: debhelper (>= 10) ,dh-autoreconf ,dh-python + ,cmake ,perl ,autoconf ,automake ,libtool ,bison ,flex ,swig ,doxygen @@ -20,9 +20,9 @@ ,libgnome-keyring-dev ,libgtkmm-2.4-dev ,liblua5.1-0-dev - ,libmysqlcppconn-dev (>= 1.1.7) + ,libmysqlcppconn-dev (>= 1.1.7-4~) ,libpng-dev - ,libmysqlclient-dev + ,default-libmysqlclient-dev ,libpcre3-dev ,libpixman-1-dev ,libsqlite3-dev @@ -34,10 +34,10 @@ ,unixodbc-dev ,uuid-dev ,xdg-utils -Standards-Version: 3.9.6 +Standards-Version: 3.9.8 Homepage: http://dev.mysql.com/workbench/ -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/mysql-workbench.git -Vcs-Git: git://anonscm.debian.org/collab-maint/mysql-workbench.git +Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/mysql-workbench.git +Vcs-Git: https://anonscm.debian.org/git/collab-maint/mysql-workbench.git Package: mysql-workbench Architecture: any @@ -49,7 +49,7 @@ ,python-pyodbc (>= 2.1.8) ,python-pysqlite2 Recommends: ttf-bitstream-vera, mysql-utilities - ,mysql-client | virtual-mysql-client + ,default-mysql-client | virtual-mysql-client Suggests: gnome-keyring Description: MySQL Workbench - a visual database modeling, administration and queuing tool MySQL Workbench is a modeling tool that allow to design @@ -68,19 +68,6 @@ . This package provides architecture independent files -#Package: mysql-workbench-dbg -#Section: debug -#Priority: extra -#Architecture: any -#Depends: mysql-workbench (= ${binary:Version}), ${misc:Depends} -#Description: MySQL Workbench -- debugging symbols -# MySQL Workbench is a modeling tool that allow to design -# and generate MySQL databases graphically. It also has administration -# and query development modules where you can manage MySQL server instances -# and execute SQL queries. -# . -# This package provides debugging symbols - #Package: mysql-workbench-docs #Architecture: all #Depends: ${misc:Depends}, libjs-jquery diff -Nru mysql-workbench-6.3.6+dfsg/debian/copyright mysql-workbench-6.3.8+dfsg/debian/copyright --- mysql-workbench-6.3.6+dfsg/debian/copyright 2016-04-11 09:41:03.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/copyright 2016-11-18 21:08:23.000000000 +0000 @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: MySQL Workbench Upstream-Contact: Alfredo Kojima Source: https://www.mysql.com/downloads/workbench/ @@ -6,7 +6,7 @@ License: GPL-2 Files: * -Copyright: 2000, 2004-2005, 2007-2015 Oracle and/or its affiliates. +Copyright: 2000, 2004-2005, 2007-2016 Oracle and/or its affiliates. License: GPL-2 Comment: All files without explicit license header are assumed to @@ -20,12 +20,18 @@ See list of contributors in file AUTHORS Files: images/* -Copyright: 2000, 2004-2005, 2007-2015 Oracle and/or its affiliates. +Copyright: 2000, 2004-2005, 2007-2016 Oracle and/or its affiliates. License: CC-BY-3.0 Comment: Please note that trademark restrictions do apply to selected images. Files: + build/cmake/Modules/cotire.cmake +Copyright: + 2012-2015 Sascha Kratky +License: Expat + +Files: plugins/wb.model.editors/backend/wb_editor_layer.h plugins/wb.model.tagging/backend/wb_tag_editor.cpp plugins/wb.model.tagging/backend/wb_tag_editor.h @@ -144,7 +150,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: ext/scintilla/* -Copyright: 1998-2013 Neil Hodgson +Copyright: 1998-2014 Neil Hodgson 1998-2001 Neil Hodgson 2003-2005 Angelo Mandato 1998-2001 Andre Arpin @@ -269,6 +275,28 @@ On Debian systems, the complete text of the GNU General Public License 3 can be found in "/usr/share/common-licenses/GPL-3". +License: Expat + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + . + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + License: CC-BY-3.0 Creative Commons . diff -Nru mysql-workbench-6.3.6+dfsg/debian/mysql-workbench.install mysql-workbench-6.3.8+dfsg/debian/mysql-workbench.install --- mysql-workbench-6.3.6+dfsg/debian/mysql-workbench.install 2016-04-11 09:41:03.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/mysql-workbench.install 2016-11-18 03:54:56.000000000 +0000 @@ -1,4 +1,3 @@ usr/lib/* usr/bin/* usr/lib/mysql-workbench usr/share/applications -debian/*.xpm usr/share/pixmaps diff -Nru mysql-workbench-6.3.6+dfsg/debian/mysql-workbench.menu mysql-workbench-6.3.8+dfsg/debian/mysql-workbench.menu --- mysql-workbench-6.3.6+dfsg/debian/mysql-workbench.menu 2016-04-11 09:41:03.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/mysql-workbench.menu 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -?package(mysql-workbench):needs="X11" \ - section="Applications/Programming" \ - title="MySQL Workbench" \ - command="/usr/bin/mysql-workbench" \ - icon="/usr/share/pixmaps/mysql-workbench.xpm" diff -Nru mysql-workbench-6.3.6+dfsg/debian/patches/antlr.patch mysql-workbench-6.3.8+dfsg/debian/patches/antlr.patch --- mysql-workbench-6.3.6+dfsg/debian/patches/antlr.patch 2016-04-11 09:41:03.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/patches/antlr.patch 2016-11-16 06:25:59.000000000 +0000 @@ -5,7 +5,7 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -195,9 +195,9 @@ +@@ -232,9 +232,9 @@ set(ANTLR3C_LIBRARIES "-L${PROJECT_BINARY_DIR}/antlr-wb -lantlr3c_wb") ExternalProject_Add(antlr-wb diff -Nru mysql-workbench-6.3.6+dfsg/debian/patches/gcc5.patch mysql-workbench-6.3.8+dfsg/debian/patches/gcc5.patch --- mysql-workbench-6.3.6+dfsg/debian/patches/gcc5.patch 2016-04-11 09:41:03.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/patches/gcc5.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -Last-Update: 2015-10-24 -Forwarded: not-needed -Bug-Upstream: https://bugs.mysql.com/bug.php?id=78668 -From: Marcin Szalowicz -Author: Dmitry Smirnov -Description: fix FTBFS - ~~~~ - library/forms/view.cpp:515:32: error: cannot convert 'boost::signals2::signal::result_type {aka boost::optional}' to 'bool' in return - return _signal_mouse_leave(); - ^ - library/forms/CMakeFiles/mforms.dir/build.make:1865: recipe for target 'library/forms/CMakeFiles/mforms.dir/view.cpp.o' failed - ~~~~ - ---- a/library/forms/swig/mforms.i -+++ b/library/forms/swig/mforms.i -@@ -532,9 +532,9 @@ - void add_##method(PyObject *callback) { signal->connect(pycall_void_toolbaritem_fun(callback)); } - - #define SWIG_ADD_SIGNAL_BOOL_INT_CALLBACK(method, signal)\ - void add_##method(PyObject *callback) { signal->connect(pycall_bool_int_fun(callback)); }\ -- bool call_##method(int i) { return (*signal)(i); } -+ bool call_##method(int i) { return *( (*signal)(i) ); } - - #define SWIG_ADD_SIGNAL_VOID_ENTRYACTION_CALLBACK(method, signal)\ - void add_##method(PyObject *callback) { signal->connect(pycall_void_entryaction_fun(callback)); } - ---- a/library/forms/view.cpp -+++ b/library/forms/view.cpp -@@ -511,9 +511,9 @@ - - bool View::mouse_leave() - { - if (_signal_mouse_leave.num_slots() > 0) -- return _signal_mouse_leave(); -+ return *_signal_mouse_leave(); - return false; - } - - //-------------------------------------------------------------------------------------------------- diff -Nru mysql-workbench-6.3.6+dfsg/debian/patches/mariadb-build.patch mysql-workbench-6.3.8+dfsg/debian/patches/mariadb-build.patch --- mysql-workbench-6.3.6+dfsg/debian/patches/mariadb-build.patch 1970-01-01 00:00:00.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/patches/mariadb-build.patch 2016-11-16 06:25:59.000000000 +0000 @@ -0,0 +1,28 @@ +Last-Update: 2016-11-16 +Forwarded: not-needed +Origin: https://packages.altlinux.org/en/p8/srpms/mysql-workbench-community/patches/mysql-workbench-mariadb-build.patch +Author: Dmitry Smirnov +Description: fix FTBFS with MariaDB. + mysql_real_escape_string_quote() has been implemented as a replacement + for mysql_real_escape_string() in MySQL 5.7.6 but is not implemented + in libmysqlclient of MariaDB 10.0.21 + +--- a/plugins/migration/copytable/copytable.cpp ++++ b/plugins/migration/copytable/copytable.cpp +@@ -2846,16 +2846,9 @@ + // This function is used to create a legal SQL string that you can use in an SQL statement + // This is needed because the escaping depends on the character set in use by the server + unsigned long ret_length = 0; + +- #if MYSQL_CHECK_VERSION(5, 7, 6) +- if (_target->is_mysql_version_at_least(5, 7, 6)) +- ret_length += mysql_real_escape_string_quote(_mysql, buffer + length, data, (unsigned long)dlength, '`'); +- else +- ret_length += mysql_real_escape_string(_mysql, buffer + length, data, (unsigned long)dlength); +- #else + ret_length += mysql_real_escape_string(_mysql, buffer + length, data, (unsigned long)dlength); +- #endif + + if( ret_length != (unsigned long) -1) + length += ret_length; + else diff -Nru mysql-workbench-6.3.6+dfsg/debian/patches/mariadb-version.patch mysql-workbench-6.3.8+dfsg/debian/patches/mariadb-version.patch --- mysql-workbench-6.3.6+dfsg/debian/patches/mariadb-version.patch 1970-01-01 00:00:00.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/patches/mariadb-version.patch 2016-11-16 06:25:59.000000000 +0000 @@ -0,0 +1,18 @@ +Last-Update: 2016-11-13 +Forwarded: not-needed +Author: Dmitry Smirnov +Description: fix FTBFS with MariaDB. + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -104,9 +104,9 @@ + find_python_module(paramiko 1.15.1 QUIET) + if(NOT PY_PARAMIKO) + message(WARNING "Paramiko wasn't found, you can still build Workbench, but may not work properly.") + endif() +-find_package(MySQL 5.6.0 REQUIRED) ++find_package(MySQL REQUIRED) + if (UNIX) + set(MYSQL_DEFINITIONS "-DBIG_JOINS=1" "-fno-strict-aliasing") + endif() + set(PRECOMPILED_HEADERS_EXCLUDE_PATHS "/usr/include/gdal;/usr/include/arpa;${CMAKE_SOURCE_DIR};${PROJECT_SOURCE_DIR}/ext/antlr-runtime;${PROJECT_BINARY_DIR};${MySQL_INCLUDE_DIRS}") diff -Nru mysql-workbench-6.3.6+dfsg/debian/patches/no-MYSQL_TYPE_JSON.patch mysql-workbench-6.3.8+dfsg/debian/patches/no-MYSQL_TYPE_JSON.patch --- mysql-workbench-6.3.6+dfsg/debian/patches/no-MYSQL_TYPE_JSON.patch 1970-01-01 00:00:00.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/patches/no-MYSQL_TYPE_JSON.patch 2016-11-16 06:25:59.000000000 +0000 @@ -0,0 +1,70 @@ +Last-Update: 2016-11-13 +Forwarded: not-needed +Author: Dmitry Smirnov +Description: fix FTBFS with MariaDB. + +--- a/plugins/migration/copytable/copytable.cpp ++++ b/plugins/migration/copytable/copytable.cpp +@@ -85,9 +85,9 @@ + case MYSQL_TYPE_BLOB: return "MYSQL_TYPE_BLOB"; + case MYSQL_TYPE_VAR_STRING: return "MYSQL_TYPE_VAR_STRING"; + case MYSQL_TYPE_STRING: return "MYSQL_TYPE_STRING"; + case MYSQL_TYPE_GEOMETRY: return "MYSQL_TYPE_GEOMETRY"; +- case MYSQL_TYPE_JSON: return "MYSQL_TYPE_JSON"; ++// case MYSQL_TYPE_JSON: return "MYSQL_TYPE_JSON"; + default: + return "UNKNOWN"; + } + } +@@ -247,9 +247,9 @@ + case MYSQL_TYPE_NEWDECIMAL: + case MYSQL_TYPE_STRING: + case MYSQL_TYPE_VAR_STRING: + case MYSQL_TYPE_BIT: +- case MYSQL_TYPE_JSON: ++// case MYSQL_TYPE_JSON: + if (!col->is_long_data) + bind.buffer_length = (unsigned)col->source_length+1; + + bind.length = (unsigned long*)malloc(sizeof(unsigned long)); +@@ -1469,10 +1469,10 @@ + rowbuffer[index].buffer_type == MYSQL_TYPE_MEDIUM_BLOB || + rowbuffer[index].buffer_type == MYSQL_TYPE_LONG_BLOB || + rowbuffer[index].buffer_type == MYSQL_TYPE_BLOB || + rowbuffer[index].buffer_type == MYSQL_TYPE_STRING || +- rowbuffer[index].buffer_type == MYSQL_TYPE_GEOMETRY || +- rowbuffer[index].buffer_type == MYSQL_TYPE_JSON) ++ rowbuffer[index].buffer_type == MYSQL_TYPE_GEOMETRY) ++// rowbuffer[index].buffer_type == MYSQL_TYPE_JSON) + { + if (rowbuffer[index].buffer_length) + free(rowbuffer[index].buffer); + +@@ -2341,9 +2341,9 @@ + case MYSQL_TYPE_VARCHAR: + case MYSQL_TYPE_STRING: + case MYSQL_TYPE_ENUM: + case MYSQL_TYPE_SET: +- case MYSQL_TYPE_JSON: ++// case MYSQL_TYPE_JSON: + _bulk_insert_record.append("'", 1); + ret_val = _bulk_insert_record.append_escaped((char*)(*_row_buffer)[col_index].buffer, *(*_row_buffer)[col_index].length); + _bulk_insert_record.append("'", 1); + break; +--- a/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp ++++ b/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp +@@ -360,11 +360,11 @@ + case sql::DataType::ENUM: + case sql::DataType::SET: + type= "string"; + break; +- case sql::DataType::JSON: +- type = "json"; +- break; ++// case sql::DataType::JSON: ++// type = "json"; ++// break; + case sql::DataType::SQLNULL: + type = "null"; + break; + } diff -Nru mysql-workbench-6.3.6+dfsg/debian/patches/projloc.patch mysql-workbench-6.3.8+dfsg/debian/patches/projloc.patch --- mysql-workbench-6.3.6+dfsg/debian/patches/projloc.patch 1970-01-01 00:00:00.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/patches/projloc.patch 2016-11-18 21:09:03.000000000 +0000 @@ -0,0 +1,28 @@ +Last-Update: 2016-11-19 +Forwarded: no +Author: Dmitry Smirnov +Description: improve/fix search for "libproj.so". + +--- a/frontend/linux/workbench/mysql-workbench.in ++++ b/frontend/linux/workbench/mysql-workbench.in +@@ -17,19 +17,9 @@ + wblibdir="$destdir@WB_INSTALL_LIB_DIR@" + + + # Set the PROJSO env variable so gdal can find proj cause it's using dlopen instead ld +-PROJLOC="" +-for lib in libproj.so.0 libproj.so.9 +-do +- for loc in /usr/lib /usr/lib64 /usr/lib/x86_64-linux-gnu +- do +- if test -f "$loc/$lib"; then +- PROJLOC="$loc/$lib" +- break 2 +- fi +- done +-done ++PROJLOC="$(ldd /usr/lib/mysql-workbench/mysql-workbench-bin | awk '/libproj.so/{print $3}')" + + if [ -z "$PROJLOC" ]; then + echo "Workbench can't find libproj.so, some options may be unavailable." + else diff -Nru mysql-workbench-6.3.6+dfsg/debian/patches/pythonlibs.patch mysql-workbench-6.3.8+dfsg/debian/patches/pythonlibs.patch --- mysql-workbench-6.3.6+dfsg/debian/patches/pythonlibs.patch 2016-04-11 09:41:03.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/patches/pythonlibs.patch 2016-11-16 06:25:59.000000000 +0000 @@ -5,7 +5,7 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -64,8 +64,11 @@ +@@ -68,8 +68,11 @@ unset(ANTLR3C_FOUND) endif () endif () diff -Nru mysql-workbench-6.3.6+dfsg/debian/patches/series mysql-workbench-6.3.8+dfsg/debian/patches/series --- mysql-workbench-6.3.6+dfsg/debian/patches/series 2016-04-11 09:41:15.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/patches/series 2016-11-18 21:09:03.000000000 +0000 @@ -1,5 +1,8 @@ antlr.patch -#gcc5.patch - fixed upstream -#pythonlibs.patch - fixed upstream +mariadb-build.patch +mariadb-version.patch +no-MYSQL_TYPE_JSON.patch +projloc.patch +pythonlibs.patch specify-char-signedness.patch -#wbcopytables-rpath.patch - fixed upstream +wbcopytables-rpath.patch diff -Nru mysql-workbench-6.3.6+dfsg/debian/patches/wbcopytables-rpath.patch mysql-workbench-6.3.8+dfsg/debian/patches/wbcopytables-rpath.patch --- mysql-workbench-6.3.6+dfsg/debian/patches/wbcopytables-rpath.patch 2016-04-11 09:41:03.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/patches/wbcopytables-rpath.patch 2016-11-16 06:25:59.000000000 +0000 @@ -1,4 +1,4 @@ -Last-Update: 2014-04-02 +Last-Update: 2015-12-22 Forwarded: no Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739515 Author: Dmitry Smirnov @@ -6,13 +6,13 @@ --- a/plugins/migration/CMakeLists.txt +++ b/plugins/migration/CMakeLists.txt -@@ -28,8 +28,9 @@ - copytable/main.cpp - copytable/converter.cpp - ) - -+ set_target_properties(wbcopytables PROPERTIES INSTALL_RPATH "$ORIGIN") - target_link_libraries(wbcopytables wbbase ${MYSQL_LIBRARIES} ${ODBC_LIBRARIES} ${PCRE_LIBRARIES} ${PYTHON_LIBRARIES}) - - install(TARGETS wbcopytables DESTINATION ${WB_INSTALL_BIN_DIR}) - endif() +@@ -45,8 +45,9 @@ + else() + set_target_properties(wbcopytables PROPERTIES COMPILE_FLAGS "-fPIE -pie") + endif() + ++ set_target_properties(wbcopytables PROPERTIES INSTALL_RPATH "$ORIGIN") + target_link_libraries(wbcopytables wbbase ${MySQL_LIBRARIES} ${ODBC_LIBRARIES} ${PCRE_LIBRARIES} ${PYTHON_LIBRARIES}) + if(COMMAND cotire) + set_target_properties(wbcopytables PROPERTIES + COTIRE_PREFIX_HEADER_IGNORE_PATH "${PRECOMPILED_HEADERS_EXCLUDE_PATHS};/usr/include/unixodbc_conf.h;/usr/include/sql.h;/usr/include/sqltypes.h;/usr/include/sqlext.h;/usr/include/sqlucode.h") diff -Nru mysql-workbench-6.3.6+dfsg/debian/rules mysql-workbench-6.3.8+dfsg/debian/rules --- mysql-workbench-6.3.6+dfsg/debian/rules 2016-04-11 09:41:03.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/debian/rules 2016-11-18 03:58:06.000000000 +0000 @@ -15,6 +15,9 @@ endif $(info Info: DEB_BUILD_OPTIONS:$(origin DEB_BUILD_OPTIONS)=$(DEB_BUILD_OPTIONS)) +## "bindnow" causes run-time errors: +#export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow + # minimise needless linking export DEB_LDFLAGS_MAINT_APPEND= -Wl,--as-needed @@ -38,8 +41,6 @@ cd library/sql.parser/yy_gen-tool/yy_gen-tool/ \ && bison -dl parser.yy \ && flex -B -oparser.lex.cc parser.lex - # generate icon - convert images/icons/MySQLWorkbench-32.png debian/mysql-workbench.xpm # generate documentation for mysql-workbench-docs package #cd doc && ./DoxygenRun.sh # build all the rest @@ -55,6 +56,9 @@ dh_link -p$(PKG) \ usr/lib/$(PKG)/mysql-workbench usr/bin/mysql-workbench +override_dh_python2: + dh_python2 --no-ext-rename + override_dh_compress: dh_compress --exclude=.mwb @@ -65,15 +69,6 @@ override_dh_shlibdeps: LD_LIBRARY_PATH="debian/$(PKG)/usr/lib/$(PKG):$(LD_LIBRARY_PATH)" dh_shlibdeps -# -dbg package will be over 150 MiB -override_dh_strip: - [ -d "$(CURDIR)/debian/$(PKG)-dbg" ] \ - && dh_strip --dbg-package=$(PKG)-dbg \ - || dh_strip - -override_dh_builddeb: - dh_builddeb -- -Zxz - ## semi-automated manpage generation (to invoke manually) MAN_NAME=mysql-workbench \\- MySQL Database Design, Administration and Development Tool mysql-workbench.1: @@ -127,6 +122,8 @@ MySQLWorkbench.xcodeproj \ plugins/wb.doclib/res/DocLibrary/* \ res/fonts \ + build/ms \ + ext/Aga.Controls \ #$(RM) -v $(PKG)_$(VER).orig.tar.* @echo "# Packing..." find -L "$(PKG)-$(VER)" -xdev -type f -print | LC_ALL=C sort \ diff -Nru mysql-workbench-6.3.6+dfsg/ext/scintilla/.bzrignore mysql-workbench-6.3.8+dfsg/ext/scintilla/.bzrignore --- mysql-workbench-6.3.6+dfsg/ext/scintilla/.bzrignore 2015-12-10 13:46:07.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/ext/scintilla/.bzrignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -cocoa/ScintillaTest/ScintillaTest.xcodeproj/Mike.mode2v3 -cocoa/ScintillaTest/ScintillaTest.xcodeproj/Mike.pbxuser -*.mode2v3 -*.pbxuser -.DS_Store -cocoa/ScintillaTest/build -bin -bin -*.perspectivev3 -cocoa/ScintillaFramework/build diff -Nru mysql-workbench-6.3.6+dfsg/ext/scintilla/cppcheck.suppress mysql-workbench-6.3.8+dfsg/ext/scintilla/cppcheck.suppress --- mysql-workbench-6.3.6+dfsg/ext/scintilla/cppcheck.suppress 2015-12-10 13:46:07.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/ext/scintilla/cppcheck.suppress 2016-10-14 12:12:03.000000000 +0000 @@ -26,11 +26,11 @@ variableScope:scintilla/lexers/LexOthers.cxx variableScope:scintilla/lexers/LexPB.cxx noCopyConstructor:scintilla/lexers/LexPerl.cxx -variableScope:scintilla/lexers/LexPS.cxx variableScope:scintilla/lexers/LexRuby.cxx uninitMemberVar:scintilla/lexers/LexRuby.cxx variableScope:scintilla/lexers/LexSpecman.cxx unreadVariable:scintilla/lexers/LexSpice.cxx +clarifyCalculation:scintilla/lexers/LexTADS3.cxx invalidscanf:scintilla/lexers/LexTCMD.cxx variableScope:scintilla/lexers/LexTeX.cxx variableScope:scintilla/lexers/LexVHDL.cxx diff -Nru mysql-workbench-6.3.6+dfsg/ext/scintilla/doc/index.html mysql-workbench-6.3.8+dfsg/ext/scintilla/doc/index.html --- mysql-workbench-6.3.6+dfsg/ext/scintilla/doc/index.html 2015-12-10 13:46:07.000000000 +0000 +++ mysql-workbench-6.3.8+dfsg/ext/scintilla/doc/index.html 2016-10-14 12:12:03.000000000 +0000 @@ -9,7 +9,7 @@ - +