diff --git a/src/bin/pg_autoctl/cli_common.c b/src/bin/pg_autoctl/cli_common.c index 08416e0c6..04c31165a 100644 --- a/src/bin/pg_autoctl/cli_common.c +++ b/src/bin/pg_autoctl/cli_common.c @@ -407,6 +407,14 @@ cli_common_keeper_getopts(int argc, char **argv, break; } + case 'G': + { + /* { "region", required_argument, NULL, 'G' } */ + strlcpy(LocalOptionConfig.region, optarg, NAMEDATALEN); + log_trace("--region %s", LocalOptionConfig.region); + break; + } + case 'V': { /* keeper_cli_print_version prints version and exits. */ diff --git a/src/bin/pg_autoctl/cli_create_node.c b/src/bin/pg_autoctl/cli_create_node.c index c8d9c8a02..39b3f4aab 100644 --- a/src/bin/pg_autoctl/cli_create_node.c +++ b/src/bin/pg_autoctl/cli_create_node.c @@ -343,6 +343,7 @@ cli_create_postgres_getopts(int argc, char **argv) { "candidate-priority", required_argument, NULL, 'P' }, { "replication-quorum", required_argument, NULL, 'r' }, { "maximum-backup-rate", required_argument, NULL, 'R' }, + { "region", required_argument, NULL, 'G' }, { "run", no_argument, NULL, 'x' }, { "no-ssl", no_argument, NULL, 'N' }, { "ssl-self-signed", no_argument, NULL, 's' }, @@ -356,7 +357,7 @@ cli_create_postgres_getopts(int argc, char **argv) int optind = cli_create_node_getopts(argc, argv, long_options, - "C:D:H:p:l:U:A:SLd:a:n:f:m:MI:W:w:RVvqhP:r:xsN", + "C:D:H:p:l:U:A:SLd:a:n:f:m:MI:W:w:RGVvqhP:r:xsN", &options); /* publish our option parsing in the global variable */ @@ -441,6 +442,7 @@ cli_create_coordinator_getopts(int argc, char **argv) { "citus-cluster", required_argument, NULL, 'Z' }, { "candidate-priority", required_argument, NULL, 'P' }, { "replication-quorum", required_argument, NULL, 'r' }, + { "region", required_argument, NULL, 'G' }, { "run", no_argument, NULL, 'x' }, { "no-ssl", no_argument, NULL, 'N' }, { "ssl-self-signed", no_argument, NULL, 's' }, @@ -454,7 +456,7 @@ cli_create_coordinator_getopts(int argc, char **argv) int optind = cli_create_node_getopts(argc, argv, long_options, - "C:D:H:p:l:U:A:SLd:a:n:f:m:MRVvqhzZ:P:r:xsN", + "C:D:H:p:l:U:A:SLd:a:n:f:m:MRGVvqhzZ:P:r:xsN", &options); options.groupId = 0; @@ -551,6 +553,7 @@ cli_create_worker_getopts(int argc, char **argv) { "citus-cluster", required_argument, NULL, 'Z' }, { "candidate-priority", required_argument, NULL, 'P' }, { "replication-quorum", required_argument, NULL, 'r' }, + { "region", required_argument, NULL, 'G' }, { "run", no_argument, NULL, 'x' }, { "no-ssl", no_argument, NULL, 'N' }, { "ssl-self-signed", no_argument, NULL, 's' }, @@ -564,7 +567,7 @@ cli_create_worker_getopts(int argc, char **argv) int optind = cli_create_node_getopts(argc, argv, long_options, - "C:D:H:p:l:y:zZ:U:A:SLd:a:n:f:m:MRVvqhzP:r:xsN", + "C:D:H:p:l:y:zZ:U:A:SLd:a:n:f:m:MRGVvqhzP:r:xsN", &options); if (options.groupId == 0) diff --git a/src/bin/pg_autoctl/defaults.h b/src/bin/pg_autoctl/defaults.h index dd4971421..7873f0d98 100644 --- a/src/bin/pg_autoctl/defaults.h +++ b/src/bin/pg_autoctl/defaults.h @@ -19,7 +19,7 @@ #define PG_AUTOCTL_VERSION GIT_VERSION /* version of the extension that we requite to talk to on the monitor */ -#define PG_AUTOCTL_EXTENSION_VERSION "2.2" +#define PG_AUTOCTL_EXTENSION_VERSION "2.3" /* environment variable to use to make DEBUG facilities available */ #define PG_AUTOCTL_DEBUG "PG_AUTOCTL_DEBUG" diff --git a/src/bin/pg_autoctl/keeper.c b/src/bin/pg_autoctl/keeper.c index 8ec85e9d9..26145c462 100644 --- a/src/bin/pg_autoctl/keeper.c +++ b/src/bin/pg_autoctl/keeper.c @@ -1670,6 +1670,7 @@ keeper_register_and_init(Keeper *keeper, NodeState initialState) config->pgSetup.settings.candidatePriority, config->pgSetup.settings.replicationQuorum, config->pgSetup.citusClusterName, + config->region, &mayRetry, &assignedState)) { @@ -1875,6 +1876,7 @@ keeper_register_again(Keeper *keeper) config->pgSetup.settings.candidatePriority, config->pgSetup.settings.replicationQuorum, DEFAULT_CITUS_CLUSTER_NAME, + config->region, &mayRetry, &assignedState)) { diff --git a/src/bin/pg_autoctl/keeper_config.c b/src/bin/pg_autoctl/keeper_config.c index 23815d28d..0d145b0ec 100644 --- a/src/bin/pg_autoctl/keeper_config.c +++ b/src/bin/pg_autoctl/keeper_config.c @@ -61,6 +61,10 @@ make_strbuf_option("pg_autoctl", "nodekind", NULL, false, NAMEDATALEN, \ config->nodeKind) +#define OPTION_AUTOCTL_REGION(config) \ + make_strbuf_option_default("pg_autoctl", "region", "region", \ + false, NAMEDATALEN, config->region, "") + #define OPTION_POSTGRESQL_PGDATA(config) \ make_strbuf_option("postgresql", "pgdata", "pgdata", true, MAXPGPATH, \ config->pgSetup.pgdata) @@ -227,6 +231,7 @@ OPTION_AUTOCTL_HOSTNAME(config), \ OPTION_AUTOCTL_NODENAME(config), \ OPTION_AUTOCTL_NODEKIND(config), \ + OPTION_AUTOCTL_REGION(config), \ OPTION_POSTGRESQL_PGDATA(config), \ OPTION_POSTGRESQL_PG_CTL(config), \ OPTION_POSTGRESQL_USERNAME(config), \ diff --git a/src/bin/pg_autoctl/keeper_config.h b/src/bin/pg_autoctl/keeper_config.h index 0c71a65e0..0ed9af1d4 100644 --- a/src/bin/pg_autoctl/keeper_config.h +++ b/src/bin/pg_autoctl/keeper_config.h @@ -46,6 +46,7 @@ typedef struct KeeperConfig char name[_POSIX_HOST_NAME_MAX]; char hostname[_POSIX_HOST_NAME_MAX]; char nodeKind[NAMEDATALEN]; + char region[NAMEDATALEN]; /* PostgreSQL setup */ PostgresSetup pgSetup; diff --git a/src/bin/pg_autoctl/monitor.c b/src/bin/pg_autoctl/monitor.c index af532917a..7eee544f6 100644 --- a/src/bin/pg_autoctl/monitor.c +++ b/src/bin/pg_autoctl/monitor.c @@ -861,19 +861,20 @@ monitor_register_node(Monitor *monitor, char *formation, NodeState initialState, PgInstanceKind kind, int candidatePriority, bool quorum, char *citusClusterName, + char *region, bool *mayRetry, MonitorAssignedState *assignedState) { PGSQL *pgsql = &monitor->pgsql; const char *sql = "SELECT * FROM pgautofailover.register_node($1, $2, $3, $4, $5, $6, $7, " - "$8, $9::pgautofailover.replication_state, $10, $11, $12, $13)"; - int paramCount = 13; - Oid paramTypes[13] = { + "$8, $9::pgautofailover.replication_state, $10, $11, $12, $13, $14)"; + int paramCount = 14; + Oid paramTypes[14] = { TEXTOID, TEXTOID, INT4OID, NAMEOID, TEXTOID, INT8OID, - INT8OID, INT4OID, TEXTOID, TEXTOID, INT4OID, BOOLOID, TEXTOID + INT8OID, INT4OID, TEXTOID, TEXTOID, INT4OID, BOOLOID, TEXTOID, TEXTOID }; - const char *paramValues[13]; + const char *paramValues[14]; MonitorAssignedStateParseContext parseContext = { { 0 }, assignedState, false }; const char *nodeStateString = NodeStateToString(initialState); @@ -899,6 +900,10 @@ monitor_register_node(Monitor *monitor, char *formation, IS_EMPTY_STRING_BUFFER(citusClusterName) ? DEFAULT_CITUS_CLUSTER_NAME : citusClusterName; + paramValues[13] = + IS_EMPTY_STRING_BUFFER(region) + ? "default" + : region; if (!pgsql_execute_with_params(pgsql, sql, paramCount, paramTypes, paramValues, @@ -1950,7 +1955,7 @@ monitor_get_current_state(Monitor *monitor, char *formation, int group, " current_group_state, assigned_group_state, " " candidate_priority, replication_quorum, " " reported_tli, reported_lsn, health, nodecluster, " - " healthlag, reportlag" + " noderegion, healthlag, reportlag" " FROM pgautofailover.current_state($1) cs " " JOIN (" " select nodeid, " @@ -1976,7 +1981,7 @@ monitor_get_current_state(Monitor *monitor, char *formation, int group, " current_group_state, assigned_group_state, " " candidate_priority, replication_quorum, " " reported_tli, reported_lsn, health, nodecluster, " - " healthlag, reportlag" + " noderegion, healthlag, reportlag" " FROM pgautofailover.current_state($1, $2) cs " " JOIN (" " select nodeid, " @@ -2029,7 +2034,7 @@ parseCurrentNodeState(PGresult *result, int rowNumber, int errors = 0; /* we don't expect any of the column to be NULL */ - for (colNumber = 0; colNumber < 16; colNumber++) + for (colNumber = 0; colNumber < 17; colNumber++) { if (PQgetisnull(result, rowNumber, 0)) { @@ -2054,8 +2059,9 @@ parseCurrentNodeState(PGresult *result, int rowNumber, * 11 - OUT reported_lsn pg_lsn, * 12 - OUT health integer * 13 - OUT nodecluster text - * 14 - healthlag int (extract epoch from interval) - * 15 - reportlag int (extract epoch from interval) + * 14 - OUT noderegion text + * 15 - healthlag int (extract epoch from interval) + * 16 - reportlag int (extract epoch from interval) * * We need the groupId to parse the formation kind into a nodeKind, so we * begin at column 1 and get back to column 0 later, after column 4. @@ -2191,6 +2197,16 @@ parseCurrentNodeState(PGresult *result, int rowNumber, } value = PQgetvalue(result, rowNumber, 14); + length = strlcpy(nodeState->region, value, NAMEDATALEN); + if (length >= NAMEDATALEN) + { + log_error("Region \"%s\" returned by monitor is %d characters, " + "the maximum supported by pg_autoctl is %d", + value, length, NAMEDATALEN - 1); + ++errors; + } + + value = PQgetvalue(result, rowNumber, 15); if (!stringToDouble(value, &(nodeState->healthLag))) { @@ -2198,7 +2214,7 @@ parseCurrentNodeState(PGresult *result, int rowNumber, ++errors; } - value = PQgetvalue(result, rowNumber, 15); + value = PQgetvalue(result, rowNumber, 16); if (!stringToDouble(value, &(nodeState->reportLag))) { diff --git a/src/bin/pg_autoctl/monitor.h b/src/bin/pg_autoctl/monitor.h index aa1d64de8..01285aac4 100644 --- a/src/bin/pg_autoctl/monitor.h +++ b/src/bin/pg_autoctl/monitor.h @@ -140,6 +140,7 @@ bool monitor_register_node(Monitor *monitor, int candidatePriority, bool quorum, char *citusClusterName, + char *region, bool *mayRetry, MonitorAssignedState *assignedState); bool monitor_node_active(Monitor *monitor, diff --git a/src/bin/pg_autoctl/nodespec.c b/src/bin/pg_autoctl/nodespec.c index 835ab7d56..c83921389 100644 --- a/src/bin/pg_autoctl/nodespec.c +++ b/src/bin/pg_autoctl/nodespec.c @@ -114,6 +114,9 @@ nodespec_read(const char *path, NodeSpec *spec) make_strbuf_option_default("settings", "replication_quorum", NULL, false, sizeof(replicationQuorumStr), replicationQuorumStr, "true"), + make_strbuf_option_default("settings", "region", NULL, false, + sizeof(spec->region), spec->region, + ""), /* [options] — immutable, used only at create time */ make_strbuf_option_default("options", "ssl", NULL, false, @@ -694,6 +697,13 @@ nodespec_create_argv(const NodeSpec *spec, PUSH("false"); } + /* region label (omit when empty — monitor defaults to "default") */ + if (!IS_EMPTY_STRING_BUFFER(spec->region)) + { + PUSH("--region"); + PUSH(spec->region); + } + /* Citus secondary/read-replica cluster settings */ if (spec->citusSecondary) { diff --git a/src/bin/pg_autoctl/nodespec.h b/src/bin/pg_autoctl/nodespec.h index 38b7e852b..c561469f3 100644 --- a/src/bin/pg_autoctl/nodespec.h +++ b/src/bin/pg_autoctl/nodespec.h @@ -71,6 +71,7 @@ typedef struct NodeSpec /* [settings] — mutable; applied on SIGHUP / file change */ int candidate_priority; /* 0-100, default 50 */ bool replication_quorum; /* sync quorum participant, default true */ + char region[NAMEDATALEN]; /* data-centre / availability zone label */ /* [options] — immutable; used only at pg_autoctl create time */ char ssl[32]; /* self-signed | verify-ca | verify-full | off */ diff --git a/src/bin/pg_autoctl/nodestate_utils.h b/src/bin/pg_autoctl/nodestate_utils.h index a6cabdd0b..fbdf79f4b 100644 --- a/src/bin/pg_autoctl/nodestate_utils.h +++ b/src/bin/pg_autoctl/nodestate_utils.h @@ -25,6 +25,7 @@ typedef struct CurrentNodeState char formation[NAMEDATALEN]; char citusClusterName[NAMEDATALEN]; + char region[NAMEDATALEN]; int groupId; PgInstanceKind pgKind; diff --git a/src/bin/pg_autoctl/watch.c b/src/bin/pg_autoctl/watch.c index fea9bbeb9..3fccaf927 100644 --- a/src/bin/pg_autoctl/watch.c +++ b/src/bin/pg_autoctl/watch.c @@ -898,6 +898,12 @@ compute_column_size(ColumnType type, NodeAddressHeaders *headers) return headers->maxStateSize; } + case COLUMN_TYPE_REGION: + { + /* "default" is 7 chars; most region names fit in 12 */ + return 12; + } + default: { log_fatal("BUG: compute_column_size(%d)", type); @@ -1085,6 +1091,12 @@ print_node_state(WatchContext *context, ColPolicy *policy, break; } + case COLUMN_TYPE_REGION: + { + mvprintw(r, cc, "%*s", len, nodeState->region); + break; + } + default: { log_fatal("BUG: print_node_state(%d)", cType); diff --git a/src/bin/pg_autoctl/watch_colspecs.h b/src/bin/pg_autoctl/watch_colspecs.h index ad45c7519..f3726581f 100644 --- a/src/bin/pg_autoctl/watch_colspecs.h +++ b/src/bin/pg_autoctl/watch_colspecs.h @@ -27,6 +27,7 @@ typedef enum COLUMN_TYPE_CONN_REPORT_LAG, COLUMN_TYPE_REPORTED_STATE, COLUMN_TYPE_ASSIGNED_STATE, + COLUMN_TYPE_REGION, COLUMN_TYPE_LAST } ColumnType; @@ -38,7 +39,7 @@ typedef struct ColSpec int len; } ColSpec; -#define MAX_COL_SPECS 12 +#define MAX_COL_SPECS 14 typedef struct ColPolicy { @@ -134,6 +135,7 @@ ColPolicy ColumnPolicies[] = { { { COLUMN_TYPE_NAME, "Name", 0 }, { COLUMN_TYPE_ID, "Node", 0 }, + { COLUMN_TYPE_REGION, "Region", 0 }, { COLUMN_TYPE_REPLICATION_QUORUM, "Quorum", 0 }, { COLUMN_TYPE_CANDIDATE_PRIORITY, "Priority", 0 }, { COLUMN_TYPE_CONN_HEALTH_LAG, "Check", 0 }, @@ -150,6 +152,7 @@ ColPolicy ColumnPolicies[] = { { { COLUMN_TYPE_NAME, "Name", 0 }, { COLUMN_TYPE_ID, "Node", 0 }, + { COLUMN_TYPE_REGION, "Region", 0 }, { COLUMN_TYPE_REPLICATION_QUORUM, "Quorum", 0 }, { COLUMN_TYPE_CANDIDATE_PRIORITY, "Priority", 0 }, { COLUMN_TYPE_TLI_LSN, "TLI: LSN", 0 }, @@ -167,6 +170,7 @@ ColPolicy ColumnPolicies[] = { { { COLUMN_TYPE_NAME, "Name", 0 }, { COLUMN_TYPE_ID, "Node", 0 }, + { COLUMN_TYPE_REGION, "Region", 0 }, { COLUMN_TYPE_REPLICATION_QUORUM, "Quorum", 0 }, { COLUMN_TYPE_CANDIDATE_PRIORITY, "Priority", 0 }, { COLUMN_TYPE_HOST_PORT, "Host:Port", 0 }, @@ -185,6 +189,7 @@ ColPolicy ColumnPolicies[] = { { { COLUMN_TYPE_NAME, "Name", 0 }, { COLUMN_TYPE_ID, "Node", 0 }, + { COLUMN_TYPE_REGION, "Region", 0 }, { COLUMN_TYPE_REPLICATION_QUORUM, "Quorum", 0 }, { COLUMN_TYPE_CANDIDATE_PRIORITY, "Priority", 0 }, { COLUMN_TYPE_HOST_PORT, "Host:Port", 0 }, diff --git a/src/bin/pgaftest/cli_indent.c b/src/bin/pgaftest/cli_indent.c index ffea6bbc2..797e1990d 100644 --- a/src/bin/pgaftest/cli_indent.c +++ b/src/bin/pgaftest/cli_indent.c @@ -450,6 +450,10 @@ print_node(FILE *out, const TestNode *n, int baseIndent) sformat(numbuf, sizeof(numbuf), "%d", n->candidatePriority); ADD("candidate-priority", numbuf); } + if (n->region[0]) + { + ADD("region", n->region); + } if (!n->replicationQuorum) { ADD("replication-quorum", "false"); diff --git a/src/bin/pgaftest/compose_gen.c b/src/bin/pgaftest/compose_gen.c index bf7c93a1b..9c36dfeeb 100644 --- a/src/bin/pgaftest/compose_gen.c +++ b/src/bin/pgaftest/compose_gen.c @@ -1721,6 +1721,11 @@ compose_gen_write_node_ini(const TestCluster *cluster, node->candidatePriority, node->replicationQuorum ? "true" : "false"); + if (node->region[0]) + { + fformat(f, "region = %s\n", node->region); + } + /* Citus role/cluster settings live in their own [citus] section */ if (node->citusSecondary || node->citusClusterName[0]) { diff --git a/src/bin/pgaftest/test_spec.h b/src/bin/pgaftest/test_spec.h index b9fac6878..88260c33b 100644 --- a/src/bin/pgaftest/test_spec.h +++ b/src/bin/pgaftest/test_spec.h @@ -73,6 +73,7 @@ typedef struct TestNode char auth[32]; /* per-node auth override; "" = use cluster */ char replicationPassword[256]; /* replication.password written to node ini */ char monitorPassword[256]; /* pg_auto_failover.monitor_password written to node ini */ + char region[64]; /* --region NAME; "" = omit (defaults to "default" on monitor) */ /* Extra Docker named volumes: volume */ struct diff --git a/src/bin/pgaftest/test_spec_parse.c b/src/bin/pgaftest/test_spec_parse.c index bd6f67eda..df56a72d7 100644 --- a/src/bin/pgaftest/test_spec_parse.c +++ b/src/bin/pgaftest/test_spec_parse.c @@ -108,76 +108,77 @@ T_EXTENSION_VERSION = 297, T_BIND_SOURCE = 298, T_LEGACY_STARTUP = 299, - T_FS_INIT = 300, - T_FS_SINGLE = 301, - T_FS_PRIMARY = 302, - T_FS_WAIT_PRIMARY = 303, - T_FS_WAIT_STANDBY = 304, - T_FS_DEMOTED = 305, - T_FS_DEMOTE_TIMEOUT = 306, - T_FS_DRAINING = 307, - T_FS_SECONDARY = 308, - T_FS_CATCHINGUP = 309, - T_FS_PREP_PROMOTION = 310, - T_FS_STOP_REPLICATION = 311, - T_FS_MAINTENANCE = 312, - T_FS_JOIN_PRIMARY = 313, - T_FS_APPLY_SETTINGS = 314, - T_FS_PREPARE_MAINTENANCE = 315, - T_FS_WAIT_MAINTENANCE = 316, - T_FS_REPORT_LSN = 317, - T_FS_FAST_FORWARD = 318, - T_FS_JOIN_SECONDARY = 319, - T_FS_DROPPED = 320, - T_EXEC = 321, - T_EXEC_FAILS = 322, - T_RUN = 323, - T_PG_AUTOCTL = 324, - T_WAIT = 325, - T_UNTIL = 326, - T_TIMEOUT = 327, - T_AND = 328, - T_IS = 329, - T_WITH = 330, - T_ASSERT = 331, - T_SQL = 332, - T_EXPECT = 333, - T_ERROR = 334, - T_PROMOTE = 335, - T_PERFORM = 336, - T_FAILOVER = 337, - T_NETWORK = 338, - T_DISCONNECT = 339, - T_CONNECT = 340, - T_SLEEP = 341, - T_COMPOSE = 342, - T_DOWN = 343, - T_START = 344, - T_STOP = 345, - T_STOPPED = 346, - T_KILL = 347, - T_INJECT = 348, - T_STATE = 349, - T_ASSIGNED_STATE = 350, - T_IN = 351, - T_GROUP = 352, - T_LBRACE = 353, - T_RBRACE = 354, - T_COMMA = 355, - T_POSTGRES = 356, - T_STAYS = 357, - T_WHILE = 358, - T_THROUGH = 359, - T_SET = 360, - T_LOGS = 361, - T_NOT = 362, - T_CONTAINS = 363, - T_MATCHES = 364, - T_INTEGER = 365, - T_IDENT = 366, - T_STRING = 367, - T_BLOCK = 368, - T_SHELL_ARGS = 369 + T_REGION = 300, + T_FS_INIT = 301, + T_FS_SINGLE = 302, + T_FS_PRIMARY = 303, + T_FS_WAIT_PRIMARY = 304, + T_FS_WAIT_STANDBY = 305, + T_FS_DEMOTED = 306, + T_FS_DEMOTE_TIMEOUT = 307, + T_FS_DRAINING = 308, + T_FS_SECONDARY = 309, + T_FS_CATCHINGUP = 310, + T_FS_PREP_PROMOTION = 311, + T_FS_STOP_REPLICATION = 312, + T_FS_MAINTENANCE = 313, + T_FS_JOIN_PRIMARY = 314, + T_FS_APPLY_SETTINGS = 315, + T_FS_PREPARE_MAINTENANCE = 316, + T_FS_WAIT_MAINTENANCE = 317, + T_FS_REPORT_LSN = 318, + T_FS_FAST_FORWARD = 319, + T_FS_JOIN_SECONDARY = 320, + T_FS_DROPPED = 321, + T_EXEC = 322, + T_EXEC_FAILS = 323, + T_RUN = 324, + T_PG_AUTOCTL = 325, + T_WAIT = 326, + T_UNTIL = 327, + T_TIMEOUT = 328, + T_AND = 329, + T_IS = 330, + T_WITH = 331, + T_ASSERT = 332, + T_SQL = 333, + T_EXPECT = 334, + T_ERROR = 335, + T_PROMOTE = 336, + T_PERFORM = 337, + T_FAILOVER = 338, + T_NETWORK = 339, + T_DISCONNECT = 340, + T_CONNECT = 341, + T_SLEEP = 342, + T_COMPOSE = 343, + T_DOWN = 344, + T_START = 345, + T_STOP = 346, + T_STOPPED = 347, + T_KILL = 348, + T_INJECT = 349, + T_STATE = 350, + T_ASSIGNED_STATE = 351, + T_IN = 352, + T_GROUP = 353, + T_LBRACE = 354, + T_RBRACE = 355, + T_COMMA = 356, + T_POSTGRES = 357, + T_STAYS = 358, + T_WHILE = 359, + T_THROUGH = 360, + T_SET = 361, + T_LOGS = 362, + T_NOT = 363, + T_CONTAINS = 364, + T_MATCHES = 365, + T_INTEGER = 366, + T_IDENT = 367, + T_STRING = 368, + T_BLOCK = 369, + T_SHELL_ARGS = 370 }; #endif /* Tokens. */ @@ -223,76 +224,77 @@ #define T_EXTENSION_VERSION 297 #define T_BIND_SOURCE 298 #define T_LEGACY_STARTUP 299 -#define T_FS_INIT 300 -#define T_FS_SINGLE 301 -#define T_FS_PRIMARY 302 -#define T_FS_WAIT_PRIMARY 303 -#define T_FS_WAIT_STANDBY 304 -#define T_FS_DEMOTED 305 -#define T_FS_DEMOTE_TIMEOUT 306 -#define T_FS_DRAINING 307 -#define T_FS_SECONDARY 308 -#define T_FS_CATCHINGUP 309 -#define T_FS_PREP_PROMOTION 310 -#define T_FS_STOP_REPLICATION 311 -#define T_FS_MAINTENANCE 312 -#define T_FS_JOIN_PRIMARY 313 -#define T_FS_APPLY_SETTINGS 314 -#define T_FS_PREPARE_MAINTENANCE 315 -#define T_FS_WAIT_MAINTENANCE 316 -#define T_FS_REPORT_LSN 317 -#define T_FS_FAST_FORWARD 318 -#define T_FS_JOIN_SECONDARY 319 -#define T_FS_DROPPED 320 -#define T_EXEC 321 -#define T_EXEC_FAILS 322 -#define T_RUN 323 -#define T_PG_AUTOCTL 324 -#define T_WAIT 325 -#define T_UNTIL 326 -#define T_TIMEOUT 327 -#define T_AND 328 -#define T_IS 329 -#define T_WITH 330 -#define T_ASSERT 331 -#define T_SQL 332 -#define T_EXPECT 333 -#define T_ERROR 334 -#define T_PROMOTE 335 -#define T_PERFORM 336 -#define T_FAILOVER 337 -#define T_NETWORK 338 -#define T_DISCONNECT 339 -#define T_CONNECT 340 -#define T_SLEEP 341 -#define T_COMPOSE 342 -#define T_DOWN 343 -#define T_START 344 -#define T_STOP 345 -#define T_STOPPED 346 -#define T_KILL 347 -#define T_INJECT 348 -#define T_STATE 349 -#define T_ASSIGNED_STATE 350 -#define T_IN 351 -#define T_GROUP 352 -#define T_LBRACE 353 -#define T_RBRACE 354 -#define T_COMMA 355 -#define T_POSTGRES 356 -#define T_STAYS 357 -#define T_WHILE 358 -#define T_THROUGH 359 -#define T_SET 360 -#define T_LOGS 361 -#define T_NOT 362 -#define T_CONTAINS 363 -#define T_MATCHES 364 -#define T_INTEGER 365 -#define T_IDENT 366 -#define T_STRING 367 -#define T_BLOCK 368 -#define T_SHELL_ARGS 369 +#define T_REGION 300 +#define T_FS_INIT 301 +#define T_FS_SINGLE 302 +#define T_FS_PRIMARY 303 +#define T_FS_WAIT_PRIMARY 304 +#define T_FS_WAIT_STANDBY 305 +#define T_FS_DEMOTED 306 +#define T_FS_DEMOTE_TIMEOUT 307 +#define T_FS_DRAINING 308 +#define T_FS_SECONDARY 309 +#define T_FS_CATCHINGUP 310 +#define T_FS_PREP_PROMOTION 311 +#define T_FS_STOP_REPLICATION 312 +#define T_FS_MAINTENANCE 313 +#define T_FS_JOIN_PRIMARY 314 +#define T_FS_APPLY_SETTINGS 315 +#define T_FS_PREPARE_MAINTENANCE 316 +#define T_FS_WAIT_MAINTENANCE 317 +#define T_FS_REPORT_LSN 318 +#define T_FS_FAST_FORWARD 319 +#define T_FS_JOIN_SECONDARY 320 +#define T_FS_DROPPED 321 +#define T_EXEC 322 +#define T_EXEC_FAILS 323 +#define T_RUN 324 +#define T_PG_AUTOCTL 325 +#define T_WAIT 326 +#define T_UNTIL 327 +#define T_TIMEOUT 328 +#define T_AND 329 +#define T_IS 330 +#define T_WITH 331 +#define T_ASSERT 332 +#define T_SQL 333 +#define T_EXPECT 334 +#define T_ERROR 335 +#define T_PROMOTE 336 +#define T_PERFORM 337 +#define T_FAILOVER 338 +#define T_NETWORK 339 +#define T_DISCONNECT 340 +#define T_CONNECT 341 +#define T_SLEEP 342 +#define T_COMPOSE 343 +#define T_DOWN 344 +#define T_START 345 +#define T_STOP 346 +#define T_STOPPED 347 +#define T_KILL 348 +#define T_INJECT 349 +#define T_STATE 350 +#define T_ASSIGNED_STATE 351 +#define T_IN 352 +#define T_GROUP 353 +#define T_LBRACE 354 +#define T_RBRACE 355 +#define T_COMMA 356 +#define T_POSTGRES 357 +#define T_STAYS 358 +#define T_WHILE 359 +#define T_THROUGH 360 +#define T_SET 361 +#define T_LOGS 362 +#define T_NOT 363 +#define T_CONTAINS 364 +#define T_MATCHES 365 +#define T_INTEGER 366 +#define T_IDENT 367 +#define T_STRING 368 +#define T_BLOCK 369 +#define T_SHELL_ARGS 370 @@ -471,7 +473,7 @@ typedef union YYSTYPE TestCmd *cmd; } /* Line 193 of yacc.c. */ -#line 475 "test_spec_parse.c" +#line 477 "test_spec_parse.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -484,7 +486,7 @@ typedef union YYSTYPE /* Line 216 of yacc.c. */ -#line 488 "test_spec_parse.c" +#line 490 "test_spec_parse.c" #ifdef short # undef short @@ -699,20 +701,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 21 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 587 +#define YYLAST 594 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 115 +#define YYNTOKENS 116 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 63 /* YYNRULES -- Number of rules. */ -#define YYNRULES 205 +#define YYNRULES 207 /* YYNRULES -- Number of states. */ -#define YYNSTATES 334 +#define YYNSTATES 337 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 369 +#define YYMAXUTOK 370 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -756,7 +758,8 @@ static const yytype_uint8 yytranslate[] = 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114 + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115 }; #if YYDEBUG @@ -772,89 +775,89 @@ static const yytype_uint16 yyprhs[] = 135, 137, 139, 140, 141, 146, 147, 155, 156, 159, 161, 163, 165, 167, 169, 172, 175, 180, 183, 185, 187, 189, 192, 195, 198, 201, 204, 207, 210, 213, - 216, 219, 222, 225, 229, 233, 236, 239, 243, 247, - 248, 251, 253, 255, 257, 259, 261, 263, 265, 267, - 269, 271, 273, 275, 277, 279, 283, 286, 290, 293, - 297, 300, 304, 307, 309, 311, 313, 318, 323, 325, - 329, 330, 333, 335, 337, 341, 345, 346, 356, 357, - 367, 375, 383, 389, 395, 402, 404, 406, 410, 414, - 415, 418, 421, 426, 427, 430, 434, 441, 448, 455, - 462, 466, 469, 472, 476, 480, 483, 485, 489, 492, - 497, 503, 511, 515, 519, 522, 525, 529, 533, 537, - 542, 546, 550, 551, 557, 563, 567, 572, 578, 583, - 589, 592, 593, 596, 598, 600, 602, 604, 606, 608, - 610, 612, 614, 616, 618, 620, 622, 624, 626, 628, - 630, 632, 634, 636, 638, 640 + 216, 219, 222, 225, 228, 231, 235, 239, 242, 245, + 249, 253, 254, 257, 259, 261, 263, 265, 267, 269, + 271, 273, 275, 277, 279, 281, 283, 285, 289, 292, + 296, 299, 303, 306, 310, 313, 315, 317, 319, 324, + 329, 331, 335, 336, 339, 341, 343, 347, 351, 352, + 362, 363, 373, 381, 389, 395, 401, 408, 410, 412, + 416, 420, 421, 424, 427, 432, 433, 436, 440, 447, + 454, 461, 468, 472, 475, 478, 482, 486, 489, 491, + 495, 498, 503, 509, 517, 521, 525, 528, 531, 535, + 539, 543, 548, 552, 556, 557, 563, 569, 573, 578, + 584, 589, 595, 598, 599, 602, 604, 606, 608, 610, + 612, 614, 616, 618, 620, 622, 624, 626, 628, 630, + 632, 634, 636, 638, 640, 642, 644, 646 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 116, 0, -1, 117, -1, 116, 117, -1, 118, -1, - 140, -1, 141, -1, 142, -1, 174, -1, -1, 3, - 98, 119, 120, 99, -1, -1, 120, 121, -1, 122, - -1, 123, -1, 125, -1, 126, -1, 124, -1, 127, - -1, 43, -1, 44, -1, 4, -1, 4, 39, 111, - -1, 4, 14, 111, -1, 4, 35, 110, -1, 4, - 36, 112, -1, 4, 111, 24, 26, -1, 4, 111, - 30, 91, -1, 4, 111, 24, 26, 36, 112, -1, - 13, 112, -1, 13, 111, -1, 42, 111, -1, 42, - 112, -1, 15, 111, -1, 16, 111, -1, 17, 111, - -1, -1, 18, 128, 129, 98, 132, 99, -1, -1, - 129, 131, -1, 111, -1, 112, -1, 16, -1, 4, - -1, 5, -1, 130, -1, 19, 110, -1, 53, 28, - -1, -1, 132, 135, -1, 111, -1, 4, -1, -1, - -1, 133, 134, 136, 138, -1, -1, 5, 111, 134, - 137, 98, 138, 99, -1, -1, 138, 139, -1, 20, + 117, 0, -1, 118, -1, 117, 118, -1, 119, -1, + 141, -1, 142, -1, 143, -1, 175, -1, -1, 3, + 99, 120, 121, 100, -1, -1, 121, 122, -1, 123, + -1, 124, -1, 126, -1, 127, -1, 125, -1, 128, + -1, 43, -1, 44, -1, 4, -1, 4, 39, 112, + -1, 4, 14, 112, -1, 4, 35, 111, -1, 4, + 36, 113, -1, 4, 112, 24, 26, -1, 4, 112, + 30, 92, -1, 4, 112, 24, 26, 36, 113, -1, + 13, 113, -1, 13, 112, -1, 42, 112, -1, 42, + 113, -1, 15, 112, -1, 16, 112, -1, 17, 112, + -1, -1, 18, 129, 130, 99, 133, 100, -1, -1, + 130, 132, -1, 112, -1, 113, -1, 16, -1, 4, + -1, 5, -1, 131, -1, 19, 111, -1, 54, 28, + -1, -1, 133, 136, -1, 112, -1, 4, -1, -1, + -1, 134, 135, 137, 139, -1, -1, 5, 112, 135, + 138, 99, 139, 100, -1, -1, 139, 140, -1, 20, -1, 21, -1, 22, -1, 23, -1, 26, -1, 24, - 26, -1, 25, 26, -1, 25, 73, 24, 26, -1, + 26, -1, 25, 26, -1, 25, 74, 24, 26, -1, 24, 27, -1, 27, -1, 32, -1, 33, -1, 34, - 110, -1, 97, 110, -1, 35, 110, -1, 38, 111, - -1, 39, 111, -1, 15, 111, -1, 16, 111, -1, - 17, 111, -1, 40, 29, -1, 40, 28, -1, 41, - 112, -1, 37, 112, -1, 31, 111, 111, -1, 31, - 111, 112, -1, 8, 143, -1, 9, 143, -1, 10, - 177, 143, -1, 98, 144, 99, -1, -1, 144, 145, - -1, 146, -1, 152, -1, 159, -1, 160, -1, 161, - -1, 162, -1, 164, -1, 165, -1, 166, -1, 167, - -1, 168, -1, 171, -1, 172, -1, 173, -1, 66, - 111, 114, -1, 66, 111, -1, 67, 111, 114, -1, - 67, 111, -1, 68, 111, 114, -1, 68, 111, -1, - 69, 111, 114, -1, 69, 111, -1, 69, -1, 12, - -1, 74, -1, 111, 94, 147, 176, -1, 111, 94, - 147, 111, -1, 148, -1, 149, 73, 148, -1, -1, - 104, 151, -1, 176, -1, 111, -1, 151, 100, 176, - -1, 151, 100, 111, -1, -1, 70, 71, 111, 94, - 147, 176, 153, 150, 158, -1, -1, 70, 71, 111, - 94, 147, 111, 154, 150, 158, -1, 70, 71, 111, - 95, 147, 176, 158, -1, 70, 71, 111, 95, 147, - 111, 158, -1, 70, 71, 111, 91, 158, -1, 70, - 71, 155, 156, 158, -1, 70, 71, 148, 73, 149, - 158, -1, 176, -1, 111, -1, 155, 100, 176, -1, - 155, 100, 111, -1, -1, 96, 157, -1, 97, 110, - -1, 157, 100, 97, 110, -1, -1, 72, 110, -1, - 75, 72, 110, -1, 76, 111, 94, 147, 176, 158, - -1, 76, 111, 94, 147, 111, 158, -1, 76, 111, - 95, 147, 176, 158, -1, 76, 111, 95, 147, 111, - 158, -1, 77, 111, 113, -1, 78, 113, -1, 78, - 79, -1, 78, 79, 111, -1, 78, 79, 110, -1, - 80, 163, -1, 111, -1, 163, 100, 111, -1, 81, - 82, -1, 81, 82, 97, 110, -1, 81, 82, 96, - 18, 111, -1, 81, 82, 96, 18, 111, 97, 110, - -1, 83, 84, 111, -1, 83, 85, 111, -1, 86, - 110, -1, 87, 88, -1, 87, 89, 111, -1, 87, - 90, 111, -1, 87, 92, 111, -1, 87, 93, 111, - 114, -1, 90, 101, 133, -1, 89, 101, 133, -1, - -1, 103, 170, 98, 144, 99, -1, 76, 133, 102, - 176, 169, -1, 105, 111, 111, -1, 106, 111, 108, - 112, -1, 106, 111, 107, 108, 112, -1, 106, 111, - 109, 112, -1, 106, 111, 107, 109, 112, -1, 11, - 175, -1, -1, 175, 177, -1, 45, -1, 46, -1, - 47, -1, 48, -1, 49, -1, 50, -1, 51, -1, - 52, -1, 53, -1, 54, -1, 55, -1, 56, -1, - 57, -1, 58, -1, 59, -1, 60, -1, 61, -1, - 62, -1, 63, -1, 64, -1, 65, -1, 111, -1, - 112, -1 + 111, -1, 45, 112, -1, 45, 113, -1, 98, 111, + -1, 35, 111, -1, 38, 112, -1, 39, 112, -1, + 15, 112, -1, 16, 112, -1, 17, 112, -1, 40, + 29, -1, 40, 28, -1, 41, 113, -1, 37, 113, + -1, 31, 112, 112, -1, 31, 112, 113, -1, 8, + 144, -1, 9, 144, -1, 10, 178, 144, -1, 99, + 145, 100, -1, -1, 145, 146, -1, 147, -1, 153, + -1, 160, -1, 161, -1, 162, -1, 163, -1, 165, + -1, 166, -1, 167, -1, 168, -1, 169, -1, 172, + -1, 173, -1, 174, -1, 67, 112, 115, -1, 67, + 112, -1, 68, 112, 115, -1, 68, 112, -1, 69, + 112, 115, -1, 69, 112, -1, 70, 112, 115, -1, + 70, 112, -1, 70, -1, 12, -1, 75, -1, 112, + 95, 148, 177, -1, 112, 95, 148, 112, -1, 149, + -1, 150, 74, 149, -1, -1, 105, 152, -1, 177, + -1, 112, -1, 152, 101, 177, -1, 152, 101, 112, + -1, -1, 71, 72, 112, 95, 148, 177, 154, 151, + 159, -1, -1, 71, 72, 112, 95, 148, 112, 155, + 151, 159, -1, 71, 72, 112, 96, 148, 177, 159, + -1, 71, 72, 112, 96, 148, 112, 159, -1, 71, + 72, 112, 92, 159, -1, 71, 72, 156, 157, 159, + -1, 71, 72, 149, 74, 150, 159, -1, 177, -1, + 112, -1, 156, 101, 177, -1, 156, 101, 112, -1, + -1, 97, 158, -1, 98, 111, -1, 158, 101, 98, + 111, -1, -1, 73, 111, -1, 76, 73, 111, -1, + 77, 112, 95, 148, 177, 159, -1, 77, 112, 95, + 148, 112, 159, -1, 77, 112, 96, 148, 177, 159, + -1, 77, 112, 96, 148, 112, 159, -1, 78, 112, + 114, -1, 79, 114, -1, 79, 80, -1, 79, 80, + 112, -1, 79, 80, 111, -1, 81, 164, -1, 112, + -1, 164, 101, 112, -1, 82, 83, -1, 82, 83, + 98, 111, -1, 82, 83, 97, 18, 112, -1, 82, + 83, 97, 18, 112, 98, 111, -1, 84, 85, 112, + -1, 84, 86, 112, -1, 87, 111, -1, 88, 89, + -1, 88, 90, 112, -1, 88, 91, 112, -1, 88, + 93, 112, -1, 88, 94, 112, 115, -1, 91, 102, + 134, -1, 90, 102, 134, -1, -1, 104, 171, 99, + 145, 100, -1, 77, 134, 103, 177, 170, -1, 106, + 112, 112, -1, 107, 112, 109, 113, -1, 107, 112, + 108, 109, 113, -1, 107, 112, 110, 113, -1, 107, + 112, 108, 110, 113, -1, 11, 176, -1, -1, 176, + 178, -1, 46, -1, 47, -1, 48, -1, 49, -1, + 50, -1, 51, -1, 52, -1, 53, -1, 54, -1, + 55, -1, 56, -1, 57, -1, 58, -1, 59, -1, + 60, -1, 61, -1, 62, -1, 63, -1, 64, -1, + 65, -1, 66, -1, 112, -1, 113, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -867,20 +870,20 @@ static const yytype_uint16 yyrline[] = 413, 414, 415, 416, 417, 421, 426, 430, 436, 438, 457, 458, 467, 484, 483, 491, 490, 498, 500, 504, 509, 514, 518, 522, 528, 533, 537, 542, 546, 550, - 554, 558, 562, 566, 570, 576, 582, 587, 592, 597, - 601, 605, 611, 617, 631, 652, 659, 670, 688, 703, - 706, 714, 715, 716, 717, 718, 719, 720, 721, 722, - 723, 724, 725, 726, 727, 741, 748, 754, 761, 767, - 774, 780, 788, 794, 821, 821, 832, 847, 865, 866, - 881, 883, 887, 895, 903, 910, 922, 921, 933, 932, - 943, 952, 961, 968, 982, 997, 1003, 1010, 1016, 1029, - 1031, 1035, 1040, 1048, 1049, 1050, 1061, 1069, 1077, 1085, - 1103, 1118, 1125, 1129, 1135, 1148, 1156, 1164, 1185, 1192, - 1199, 1207, 1223, 1229, 1242, 1256, 1260, 1266, 1272, 1298, - 1332, 1338, 1355, 1355, 1360, 1379, 1404, 1413, 1422, 1431, - 1447, 1450, 1452, 1474, 1475, 1476, 1477, 1478, 1479, 1480, - 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, - 1491, 1492, 1493, 1494, 1502, 1503 + 554, 558, 562, 567, 572, 576, 580, 586, 592, 597, + 602, 607, 611, 615, 621, 627, 641, 662, 669, 680, + 698, 713, 716, 724, 725, 726, 727, 728, 729, 730, + 731, 732, 733, 734, 735, 736, 737, 751, 758, 764, + 771, 777, 784, 790, 798, 804, 831, 831, 842, 857, + 875, 876, 891, 893, 897, 905, 913, 920, 932, 931, + 943, 942, 953, 962, 971, 978, 992, 1007, 1013, 1020, + 1026, 1039, 1041, 1045, 1050, 1058, 1059, 1060, 1071, 1079, + 1087, 1095, 1113, 1128, 1135, 1139, 1145, 1158, 1166, 1174, + 1195, 1202, 1209, 1217, 1233, 1239, 1252, 1266, 1270, 1276, + 1282, 1308, 1342, 1348, 1365, 1365, 1370, 1389, 1414, 1423, + 1432, 1441, 1457, 1460, 1462, 1484, 1485, 1486, 1487, 1488, + 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, + 1499, 1500, 1501, 1502, 1503, 1504, 1512, 1513 }; #endif @@ -898,33 +901,33 @@ static const char *const yytname[] = "T_VOLUME", "T_LISTEN", "T_CITUS_SECONDARY", "T_CANDIDATE_PRIORITY", "T_PORT", "T_PASSWORD", "T_MONITOR_PASSWORD", "T_CITUS_CLUSTER_NAME", "T_DEBIAN_CLUSTER", "T_REPLICATION_QUORUM", "T_REPLICATION_PASSWORD", - "T_EXTENSION_VERSION", "T_BIND_SOURCE", "T_LEGACY_STARTUP", "T_FS_INIT", - "T_FS_SINGLE", "T_FS_PRIMARY", "T_FS_WAIT_PRIMARY", "T_FS_WAIT_STANDBY", - "T_FS_DEMOTED", "T_FS_DEMOTE_TIMEOUT", "T_FS_DRAINING", "T_FS_SECONDARY", - "T_FS_CATCHINGUP", "T_FS_PREP_PROMOTION", "T_FS_STOP_REPLICATION", - "T_FS_MAINTENANCE", "T_FS_JOIN_PRIMARY", "T_FS_APPLY_SETTINGS", - "T_FS_PREPARE_MAINTENANCE", "T_FS_WAIT_MAINTENANCE", "T_FS_REPORT_LSN", - "T_FS_FAST_FORWARD", "T_FS_JOIN_SECONDARY", "T_FS_DROPPED", "T_EXEC", - "T_EXEC_FAILS", "T_RUN", "T_PG_AUTOCTL", "T_WAIT", "T_UNTIL", - "T_TIMEOUT", "T_AND", "T_IS", "T_WITH", "T_ASSERT", "T_SQL", "T_EXPECT", - "T_ERROR", "T_PROMOTE", "T_PERFORM", "T_FAILOVER", "T_NETWORK", - "T_DISCONNECT", "T_CONNECT", "T_SLEEP", "T_COMPOSE", "T_DOWN", "T_START", - "T_STOP", "T_STOPPED", "T_KILL", "T_INJECT", "T_STATE", - "T_ASSIGNED_STATE", "T_IN", "T_GROUP", "T_LBRACE", "T_RBRACE", "T_COMMA", - "T_POSTGRES", "T_STAYS", "T_WHILE", "T_THROUGH", "T_SET", "T_LOGS", - "T_NOT", "T_CONTAINS", "T_MATCHES", "T_INTEGER", "T_IDENT", "T_STRING", - "T_BLOCK", "T_SHELL_ARGS", "$accept", "spec", "spec_item", - "cluster_block", "@1", "cluster_item_list", "cluster_item", - "monitor_line", "image_line", "extension_version_line", "ssl_line", - "auth_line", "formation_block", "@2", "formation_opt_list", "bare_name", - "formation_opt", "node_list", "node_name", "init_node_slot", "node_line", - "@3", "@4", "node_opt_list", "node_opt", "setup_block", "teardown_block", - "named_step", "cmd_block", "cmd_list", "step_cmd", "exec_cmd", - "state_op", "wait_multi_condition", "wait_multi_condition_list", - "opt_passing_through", "pass_state_list", "wait_cmd", "@5", "@6", - "state_name_list", "opt_in_group", "group_items", "opt_timeout", - "assert_cmd", "sql_cmd", "expect_cmd", "promote_cmd", "promote_list", - "perform_cmd", "network_cmd", "sleep_cmd", "compose_cmd", + "T_EXTENSION_VERSION", "T_BIND_SOURCE", "T_LEGACY_STARTUP", "T_REGION", + "T_FS_INIT", "T_FS_SINGLE", "T_FS_PRIMARY", "T_FS_WAIT_PRIMARY", + "T_FS_WAIT_STANDBY", "T_FS_DEMOTED", "T_FS_DEMOTE_TIMEOUT", + "T_FS_DRAINING", "T_FS_SECONDARY", "T_FS_CATCHINGUP", + "T_FS_PREP_PROMOTION", "T_FS_STOP_REPLICATION", "T_FS_MAINTENANCE", + "T_FS_JOIN_PRIMARY", "T_FS_APPLY_SETTINGS", "T_FS_PREPARE_MAINTENANCE", + "T_FS_WAIT_MAINTENANCE", "T_FS_REPORT_LSN", "T_FS_FAST_FORWARD", + "T_FS_JOIN_SECONDARY", "T_FS_DROPPED", "T_EXEC", "T_EXEC_FAILS", "T_RUN", + "T_PG_AUTOCTL", "T_WAIT", "T_UNTIL", "T_TIMEOUT", "T_AND", "T_IS", + "T_WITH", "T_ASSERT", "T_SQL", "T_EXPECT", "T_ERROR", "T_PROMOTE", + "T_PERFORM", "T_FAILOVER", "T_NETWORK", "T_DISCONNECT", "T_CONNECT", + "T_SLEEP", "T_COMPOSE", "T_DOWN", "T_START", "T_STOP", "T_STOPPED", + "T_KILL", "T_INJECT", "T_STATE", "T_ASSIGNED_STATE", "T_IN", "T_GROUP", + "T_LBRACE", "T_RBRACE", "T_COMMA", "T_POSTGRES", "T_STAYS", "T_WHILE", + "T_THROUGH", "T_SET", "T_LOGS", "T_NOT", "T_CONTAINS", "T_MATCHES", + "T_INTEGER", "T_IDENT", "T_STRING", "T_BLOCK", "T_SHELL_ARGS", "$accept", + "spec", "spec_item", "cluster_block", "@1", "cluster_item_list", + "cluster_item", "monitor_line", "image_line", "extension_version_line", + "ssl_line", "auth_line", "formation_block", "@2", "formation_opt_list", + "bare_name", "formation_opt", "node_list", "node_name", "init_node_slot", + "node_line", "@3", "@4", "node_opt_list", "node_opt", "setup_block", + "teardown_block", "named_step", "cmd_block", "cmd_list", "step_cmd", + "exec_cmd", "state_op", "wait_multi_condition", + "wait_multi_condition_list", "opt_passing_through", "pass_state_list", + "wait_cmd", "@5", "@6", "state_name_list", "opt_in_group", "group_items", + "opt_timeout", "assert_cmd", "sql_cmd", "expect_cmd", "promote_cmd", + "promote_list", "perform_cmd", "network_cmd", "sleep_cmd", "compose_cmd", "postgres_ctl_cmd", "while_body", "@7", "stays_while_cmd", "set_monitor_cmd", "logs_cmd", "sequence_block", "sequence_names", "fsm_state", "ident_or_string", 0 @@ -947,34 +950,34 @@ static const yytype_uint16 yytoknum[] = 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369 + 365, 366, 367, 368, 369, 370 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 115, 116, 116, 117, 117, 117, 117, 117, 119, - 118, 120, 120, 121, 121, 121, 121, 121, 121, 121, - 121, 122, 122, 122, 122, 122, 122, 122, 122, 123, - 123, 124, 124, 125, 126, 126, 128, 127, 129, 129, - 130, 130, 130, 130, 130, 131, 131, 131, 132, 132, - 133, 133, 134, 136, 135, 137, 135, 138, 138, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 140, 141, 142, 143, 144, - 144, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 147, 147, 148, 148, 149, 149, - 150, 150, 151, 151, 151, 151, 153, 152, 154, 152, - 152, 152, 152, 152, 152, 155, 155, 155, 155, 156, - 156, 157, 157, 158, 158, 158, 159, 159, 159, 159, - 160, 161, 161, 161, 161, 162, 163, 163, 164, 164, - 164, 164, 165, 165, 166, 167, 167, 167, 167, 167, - 168, 168, 170, 169, 171, 172, 173, 173, 173, 173, - 174, 175, 175, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 177, 177 + 0, 116, 117, 117, 118, 118, 118, 118, 118, 120, + 119, 121, 121, 122, 122, 122, 122, 122, 122, 122, + 122, 123, 123, 123, 123, 123, 123, 123, 123, 124, + 124, 125, 125, 126, 127, 127, 129, 128, 130, 130, + 131, 131, 131, 131, 131, 132, 132, 132, 133, 133, + 134, 134, 135, 137, 136, 138, 136, 139, 139, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 141, 142, 143, + 144, 145, 145, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 147, 147, 147, + 147, 147, 147, 147, 147, 147, 148, 148, 149, 149, + 150, 150, 151, 151, 152, 152, 152, 152, 154, 153, + 155, 153, 153, 153, 153, 153, 153, 156, 156, 156, + 156, 157, 157, 158, 158, 159, 159, 159, 160, 160, + 160, 160, 161, 162, 162, 162, 162, 163, 164, 164, + 165, 165, 165, 165, 166, 166, 167, 168, 168, 168, + 168, 168, 169, 169, 171, 170, 172, 173, 174, 174, + 174, 174, 175, 176, 176, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 178, 178 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -988,19 +991,19 @@ static const yytype_uint8 yyr2[] = 1, 1, 0, 0, 4, 0, 7, 0, 2, 1, 1, 1, 1, 1, 2, 2, 4, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 3, 3, 2, 2, 3, 3, 0, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 2, 3, 2, 3, - 2, 3, 2, 1, 1, 1, 4, 4, 1, 3, - 0, 2, 1, 1, 3, 3, 0, 9, 0, 9, - 7, 7, 5, 5, 6, 1, 1, 3, 3, 0, - 2, 2, 4, 0, 2, 3, 6, 6, 6, 6, - 3, 2, 2, 3, 3, 2, 1, 3, 2, 4, - 5, 7, 3, 3, 2, 2, 3, 3, 3, 4, - 3, 3, 0, 5, 5, 3, 4, 5, 4, 5, - 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 3, 3, 2, 2, 3, + 3, 0, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 2, 3, + 2, 3, 2, 3, 2, 1, 1, 1, 4, 4, + 1, 3, 0, 2, 1, 1, 3, 3, 0, 9, + 0, 9, 7, 7, 5, 5, 6, 1, 1, 3, + 3, 0, 2, 2, 4, 0, 2, 3, 6, 6, + 6, 6, 3, 2, 2, 3, 3, 2, 1, 3, + 2, 4, 5, 7, 3, 3, 2, 2, 3, 3, + 3, 4, 3, 3, 0, 5, 5, 3, 4, 5, + 4, 5, 2, 0, 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 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -1008,40 +1011,40 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 0, 0, 0, 0, 181, 0, 2, 4, 5, - 6, 7, 8, 9, 89, 85, 86, 204, 205, 0, - 180, 1, 3, 11, 0, 87, 182, 0, 0, 0, - 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 88, 0, 0, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 21, 0, 0, 0, 0, 36, 0, 19, 20, - 10, 12, 13, 14, 17, 15, 16, 18, 106, 108, - 110, 112, 0, 51, 50, 0, 0, 152, 151, 156, - 155, 158, 0, 0, 164, 165, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 183, 0, 2, 4, 5, + 6, 7, 8, 9, 91, 87, 88, 206, 207, 0, + 182, 1, 3, 11, 0, 89, 184, 0, 0, 0, + 0, 115, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 90, 0, 0, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 21, 0, 0, 0, 0, 36, 0, 19, 20, + 10, 12, 13, 14, 17, 15, 16, 18, 108, 110, + 112, 114, 0, 51, 50, 0, 0, 154, 153, 158, + 157, 160, 0, 0, 166, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, - 29, 33, 34, 35, 38, 31, 32, 105, 107, 109, - 111, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 136, 0, 139, 135, 0, 0, 0, 150, - 154, 153, 0, 0, 0, 162, 163, 166, 167, 168, - 0, 50, 171, 170, 175, 0, 0, 0, 23, 24, - 25, 22, 0, 0, 0, 143, 0, 0, 0, 0, - 0, 143, 114, 115, 0, 0, 0, 157, 0, 159, - 169, 0, 0, 176, 178, 26, 27, 43, 44, 42, - 0, 0, 48, 40, 41, 45, 39, 0, 0, 132, - 0, 0, 0, 118, 143, 0, 140, 138, 137, 133, - 143, 143, 143, 143, 172, 174, 160, 177, 179, 0, - 46, 47, 0, 144, 0, 128, 126, 143, 143, 0, - 0, 134, 141, 0, 147, 146, 149, 148, 0, 0, - 28, 0, 37, 52, 49, 145, 120, 120, 131, 130, - 0, 119, 0, 89, 161, 52, 53, 0, 143, 143, - 117, 116, 142, 0, 55, 57, 123, 121, 122, 129, - 127, 173, 0, 54, 0, 57, 0, 0, 0, 59, + 29, 33, 34, 35, 38, 31, 32, 107, 109, 111, + 113, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 138, 0, 141, 137, 0, 0, 0, 152, + 156, 155, 0, 0, 0, 164, 165, 168, 169, 170, + 0, 50, 173, 172, 177, 0, 0, 0, 23, 24, + 25, 22, 0, 0, 0, 145, 0, 0, 0, 0, + 0, 145, 116, 117, 0, 0, 0, 159, 0, 161, + 171, 0, 0, 178, 180, 26, 27, 43, 44, 42, + 0, 0, 48, 40, 41, 45, 39, 0, 0, 134, + 0, 0, 0, 120, 145, 0, 142, 140, 139, 135, + 145, 145, 145, 145, 174, 176, 162, 179, 181, 0, + 46, 47, 0, 146, 0, 130, 128, 145, 145, 0, + 0, 136, 143, 0, 149, 148, 151, 150, 0, 0, + 28, 0, 37, 52, 49, 147, 122, 122, 133, 132, + 0, 121, 0, 91, 163, 52, 53, 0, 145, 145, + 119, 118, 144, 0, 55, 57, 125, 123, 124, 131, + 129, 175, 0, 54, 0, 57, 0, 0, 0, 59, 60, 61, 62, 0, 0, 63, 68, 0, 69, 70, - 0, 0, 0, 0, 0, 0, 0, 0, 58, 125, - 124, 0, 76, 77, 78, 64, 67, 65, 0, 0, - 71, 73, 82, 74, 75, 80, 79, 81, 72, 56, - 0, 83, 84, 66 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, + 127, 126, 0, 78, 79, 80, 64, 67, 65, 0, + 0, 71, 75, 84, 76, 77, 82, 81, 83, 72, + 73, 74, 56, 0, 85, 86, 66 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1049,7 +1052,7 @@ static const yytype_int16 yydefgoto[] = { -1, 6, 7, 8, 23, 27, 71, 72, 73, 74, 75, 76, 77, 114, 174, 205, 206, 232, 85, 266, - 254, 275, 282, 283, 308, 9, 10, 11, 15, 24, + 254, 275, 282, 283, 309, 9, 10, 11, 15, 24, 46, 47, 184, 143, 214, 268, 277, 48, 257, 256, 144, 181, 216, 209, 49, 50, 51, 52, 90, 53, 54, 55, 56, 57, 225, 248, 58, 59, 60, 12, @@ -1061,223 +1064,225 @@ static const yytype_int16 yydefgoto[] = #define YYPACT_NINF -163 static const yytype_int16 yypact[] = { - 61, -84, -47, -47, -83, -163, 35, -163, -163, -163, - -163, -163, -163, -163, -163, -163, -163, -163, -163, -47, - -83, -163, -163, -163, 415, -163, -163, 6, -50, -34, - -32, -30, 29, 4, -19, -66, 3, 22, 9, 10, - -35, 24, 30, -163, 19, 23, -163, -163, -163, -163, + 56, -84, -61, -61, -68, -163, 43, -163, -163, -163, + -163, -163, -163, -163, -163, -163, -163, -163, -163, -61, + -68, -163, -163, -163, 425, -163, -163, 6, -30, -25, + -17, -2, 54, 3, 15, -67, 16, 46, -29, 19, + -10, 29, 30, -163, 22, 28, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, - -163, -9, -23, 39, 40, 41, -163, -16, -163, -163, - -163, -163, -163, -163, -163, -163, -163, -163, 18, 26, - 27, 44, 146, -163, 12, 33, 54, -12, -163, -163, - 68, 21, 66, 67, -163, -163, 74, 101, 102, 103, - 5, 5, 104, -22, 105, 69, 106, 109, 1, -163, + -163, -5, -42, 38, 39, 40, -163, -27, -163, -163, + -163, -163, -163, -163, -163, -163, -163, -163, 26, 53, + 62, 63, 150, -163, -6, 32, 44, -7, -163, -163, + 78, 0, 73, 79, -163, -163, 80, 81, 83, 105, + 4, 4, 106, -81, 107, 110, 131, 133, 9, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, - -163, -163, -11, 144, -40, -163, 8, 8, 522, -163, - -163, -163, 132, 226, 135, -163, -163, -163, -163, -163, - 133, -163, -163, -163, -163, 0, 136, 137, -163, -163, - -163, -163, 224, 160, -1, -33, 8, 8, 141, 156, - 177, -33, -163, -163, 213, 244, 151, -163, 145, -163, - -163, 143, 167, -163, -163, 245, -163, -163, -163, -163, - 170, 254, -163, -163, -163, -163, -163, 173, 212, -163, - 280, 311, 191, -163, -7, 176, 187, -163, -163, -163, - -33, -33, -33, -33, -163, -163, 214, -163, -163, 198, - -163, -163, 2, -163, 202, 240, 241, -33, -33, 8, - 141, -163, -163, 218, -163, -163, -163, -163, 219, 206, - -163, 207, -163, -163, -163, -163, 215, 215, -163, -163, - 347, -163, 210, -163, -163, -163, -163, 378, -33, -33, - -163, -163, -163, 460, -163, -163, -163, 221, -163, -163, - -163, -163, 225, 149, 414, -163, 211, 235, 236, -163, - -163, -163, -163, 97, -14, -163, -163, 237, -163, -163, - 239, 242, 238, 243, 266, 98, 267, 268, -163, -163, - -163, 122, -163, -163, -163, -163, -163, -163, 327, 17, - -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, - 354, -163, -163, -163 + -163, -163, -23, 172, -83, -163, 13, 13, 528, -163, + -163, -163, 136, 231, 139, -163, -163, -163, -163, -163, + 137, -163, -163, -163, -163, -8, 138, 140, -163, -163, + -163, -163, 228, 163, 1, -15, 13, 13, 144, 159, + 177, -15, -163, -163, 217, 244, 154, -163, 147, -163, + -163, 148, 171, -163, -163, 224, -163, -163, -163, -163, + 174, 258, -163, -163, -163, -163, -163, 176, 215, -163, + 284, 311, 216, -163, 20, 201, 212, -163, -163, -163, + -15, -15, -15, -15, -163, -163, 218, -163, -163, 202, + -163, -163, -1, -163, 203, 243, 245, -15, -15, 13, + 144, -163, -163, 220, -163, -163, -163, -163, 221, 210, + -163, 211, -163, -163, -163, -163, 219, 219, -163, -163, + 351, -163, 214, -163, -163, -163, -163, 378, -15, -15, + -163, -163, -163, 466, -163, -163, -163, 225, -163, -163, + -163, -163, 223, 149, 418, -163, 239, 240, 241, -163, + -163, -163, -163, 82, -14, -163, -163, 242, -163, -163, + 267, 268, 269, 271, 272, 89, 273, 8, 270, -163, + -163, -163, 122, -163, -163, -163, -163, -163, -163, 303, + 12, -163, -163, -163, -163, -163, -163, -163, -163, -163, + -163, -163, -163, 302, -163, -163, -163 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -163, -163, 375, -163, -163, -163, -163, -163, -163, -163, - -163, -163, -163, -163, -163, -163, -163, -163, -99, 88, - -163, -163, -163, 99, -163, -163, -163, -163, 14, 119, - -163, -163, -136, -162, -163, 126, -163, -163, -163, -163, - -163, -163, -163, -147, -163, -163, -163, -163, -163, -163, + -163, -163, 349, -163, -163, -163, -163, -163, -163, -163, + -163, -163, -163, -163, -163, -163, -163, -163, -99, 115, + -163, -163, -163, 100, -163, -163, -163, -163, 23, 124, + -163, -163, -136, -162, -163, 132, -163, -163, -163, -163, + -163, -163, -163, -146, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, - -163, -148, 365 + -163, -148, 368 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -118 +#define YYTABLE_NINF -120 static const yytype_int16 yytable[] = { - 186, 162, 163, 197, 198, 104, 83, 251, 83, 83, - 61, 185, 317, 87, 13, 199, 213, 16, 200, 62, - 182, 63, 64, 65, 66, 172, 105, 106, 17, 18, - 107, 173, 218, 25, 219, 21, 221, 223, 1, 207, - 210, 211, 208, 2, 3, 4, 5, 88, 67, 68, - 69, 14, 201, 95, 96, 97, 179, 98, 99, 318, - 180, 78, 236, 238, 1, 207, 240, 241, 208, 2, - 3, 4, 5, 244, 245, 246, 247, 79, 261, 80, - 175, 81, 183, 176, 177, 165, 166, 167, 109, 110, - 258, 259, 86, 92, 93, 115, 116, 202, 150, 151, - 82, 252, 108, 260, 91, 70, 146, 147, 191, 192, - 203, 204, 271, 161, 89, 84, 161, 153, 154, 278, - 94, 279, 280, 315, 316, 100, 325, 326, 331, 332, - 102, 101, 117, 253, 103, 148, 310, 286, 287, 288, - 118, 119, 289, 290, 291, 292, 293, 294, 295, 296, - 111, 112, 113, 297, 298, 299, 300, 301, 120, 302, - 303, 304, 305, 306, 286, 287, 288, 149, 152, 289, - 290, 291, 292, 293, 294, 295, 296, 155, 156, 169, - 297, 298, 299, 300, 301, 157, 302, 303, 304, 305, - 306, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 158, 159, 160, 164, 168, 178, 170, 307, - 171, 329, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 187, 188, 189, 307, 190, 193, 194, - 195, 196, 212, 215, 224, 227, 226, 142, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 228, - 230, 229, 231, 233, 234, 239, 242, 243, 217, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 250, 249, 255, -117, -116, 262, 264, 263, 265, 267, - 272, 284, 312, 285, 220, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 313, 314, 319, 320, - 322, 330, 321, 274, 323, 222, 121, 122, 123, 124, + 186, 162, 163, 83, 251, 197, 198, 83, 83, 104, + 61, 185, 318, 87, 179, 13, 213, 199, 180, 62, + 200, 63, 64, 65, 66, 182, 16, 165, 166, 167, + 105, 106, 218, 172, 107, 219, 221, 223, 14, 173, + 210, 211, 25, 21, 17, 18, 1, 88, 67, 68, + 69, 2, 3, 4, 5, 201, 92, 93, 207, 1, + 319, 208, 236, 238, 2, 3, 4, 5, 241, 175, + 109, 110, 176, 177, 244, 245, 246, 247, 261, 95, + 96, 97, 78, 98, 99, 115, 116, 79, 183, 146, + 147, 258, 259, 207, 240, 80, 208, 153, 154, 252, + 202, 191, 192, 260, 150, 151, 70, 108, 316, 317, + 81, 161, 271, 203, 204, 84, 161, 326, 327, 278, + 329, 330, 279, 280, 334, 335, 82, 86, 89, 91, + 94, 100, 101, 253, 102, 148, 311, 286, 287, 288, + 103, 117, 289, 290, 291, 292, 293, 294, 295, 296, + 111, 112, 113, 297, 298, 299, 300, 301, 149, 302, + 303, 304, 305, 306, 286, 287, 288, 307, 118, 289, + 290, 291, 292, 293, 294, 295, 296, 119, 120, 152, + 297, 298, 299, 300, 301, 155, 302, 303, 304, 305, + 306, 156, 157, 158, 307, 159, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 324, 328, 327, - 333, 22, 273, 269, 311, 26, 0, 0, 0, 0, - 0, 235, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 237, 121, 122, 123, 124, 125, 126, 127, + 135, 136, 137, 138, 139, 140, 141, 160, 164, 168, + 308, 169, 332, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 170, 171, 178, 308, 187, 188, + 189, 193, 190, 194, 195, 196, 212, 215, 224, 226, + 229, 227, 142, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 270, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 0, 28, 29, 30, 31, 32, 0, 0, 0, 276, - 0, 33, 34, 35, 0, 36, 37, 0, 38, 0, - 0, 39, 40, 0, 41, 42, 0, 0, 0, 0, - 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, - 44, 45, 0, 0, 0, 309, 28, 29, 30, 31, - 32, 0, 0, 0, 0, 0, 33, 34, 35, 0, - 36, 37, 0, 38, 0, 0, 39, 40, 0, 41, - 42, 0, 0, 0, 0, 0, 0, 0, 0, 281, - 0, 0, 0, 0, 0, 44, 45, 121, 122, 123, + 138, 139, 140, 141, 228, 230, 231, 233, 234, 217, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 239, 242, 243, 255, 250, 249, -119, 262, -118, + 263, 264, 285, 265, 267, 272, 284, 333, 336, 220, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 313, 314, 315, 320, 22, 222, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 321, 322, + 274, 331, 323, 324, 325, 312, 328, 273, 26, 269, + 0, 0, 0, 0, 0, 0, 235, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141 + 134, 135, 136, 137, 138, 139, 140, 141, 0, 0, + 0, 0, 0, 237, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 270, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 0, 0, 0, 0, 0, + 276, 0, 28, 29, 30, 31, 32, 0, 0, 0, + 0, 0, 33, 34, 35, 0, 36, 37, 0, 38, + 0, 0, 39, 40, 0, 41, 42, 0, 0, 0, + 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, + 310, 44, 45, 28, 29, 30, 31, 32, 0, 0, + 0, 0, 0, 33, 34, 35, 0, 36, 37, 0, + 38, 0, 0, 39, 40, 0, 41, 42, 0, 0, + 0, 0, 0, 0, 0, 0, 281, 0, 0, 0, + 0, 0, 44, 45, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141 }; static const yytype_int16 yycheck[] = { - 148, 100, 101, 4, 5, 14, 4, 5, 4, 4, - 4, 147, 26, 79, 98, 16, 178, 3, 19, 13, - 12, 15, 16, 17, 18, 24, 35, 36, 111, 112, - 39, 30, 180, 19, 181, 0, 184, 185, 3, 72, - 176, 177, 75, 8, 9, 10, 11, 113, 42, 43, - 44, 98, 53, 88, 89, 90, 96, 92, 93, 73, - 100, 111, 210, 211, 3, 72, 73, 214, 75, 8, - 9, 10, 11, 220, 221, 222, 223, 111, 240, 111, - 91, 111, 74, 94, 95, 107, 108, 109, 111, 112, - 237, 238, 111, 84, 85, 111, 112, 98, 110, 111, - 71, 99, 111, 239, 82, 99, 94, 95, 108, 109, - 111, 112, 260, 111, 111, 111, 111, 96, 97, 267, - 110, 268, 269, 26, 27, 101, 28, 29, 111, 112, - 111, 101, 114, 232, 111, 102, 284, 15, 16, 17, - 114, 114, 20, 21, 22, 23, 24, 25, 26, 27, - 111, 111, 111, 31, 32, 33, 34, 35, 114, 37, - 38, 39, 40, 41, 15, 16, 17, 113, 100, 20, - 21, 22, 23, 24, 25, 26, 27, 111, 111, 110, - 31, 32, 33, 34, 35, 111, 37, 38, 39, 40, - 41, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 111, 111, 111, 111, 111, 73, 112, 97, - 111, 99, 45, 46, 47, 48, 49, 50, 51, 52, + 148, 100, 101, 4, 5, 4, 5, 4, 4, 14, + 4, 147, 26, 80, 97, 99, 178, 16, 101, 13, + 19, 15, 16, 17, 18, 12, 3, 108, 109, 110, + 35, 36, 180, 24, 39, 181, 184, 185, 99, 30, + 176, 177, 19, 0, 112, 113, 3, 114, 42, 43, + 44, 8, 9, 10, 11, 54, 85, 86, 73, 3, + 74, 76, 210, 211, 8, 9, 10, 11, 214, 92, + 112, 113, 95, 96, 220, 221, 222, 223, 240, 89, + 90, 91, 112, 93, 94, 112, 113, 112, 75, 95, + 96, 237, 238, 73, 74, 112, 76, 97, 98, 100, + 99, 109, 110, 239, 111, 112, 100, 112, 26, 27, + 112, 112, 260, 112, 113, 112, 112, 28, 29, 267, + 112, 113, 268, 269, 112, 113, 72, 112, 112, 83, + 111, 102, 102, 232, 112, 103, 284, 15, 16, 17, + 112, 115, 20, 21, 22, 23, 24, 25, 26, 27, + 112, 112, 112, 31, 32, 33, 34, 35, 114, 37, + 38, 39, 40, 41, 15, 16, 17, 45, 115, 20, + 21, 22, 23, 24, 25, 26, 27, 115, 115, 101, + 31, 32, 33, 34, 35, 112, 37, 38, 39, 40, + 41, 112, 112, 112, 45, 112, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 112, 112, 112, + 98, 111, 100, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 113, 112, 74, 98, 112, 18, + 111, 113, 115, 113, 26, 92, 112, 98, 104, 112, + 36, 113, 112, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 111, 18, 110, 97, 114, 112, 112, - 26, 91, 111, 97, 103, 112, 111, 111, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 112, - 110, 36, 28, 110, 72, 94, 110, 100, 111, 45, + 63, 64, 65, 66, 113, 111, 28, 111, 73, 112, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 112, 97, 110, 73, 73, 97, 110, 98, 111, 104, - 110, 100, 111, 98, 111, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 111, 111, 111, 110, - 112, 24, 110, 265, 111, 111, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 111, 110, 112, - 26, 6, 263, 257, 285, 20, -1, -1, -1, -1, - -1, 111, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 111, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 111, 45, + 66, 95, 111, 101, 111, 113, 98, 74, 98, 74, + 99, 111, 99, 112, 105, 111, 101, 24, 26, 112, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - -1, 66, 67, 68, 69, 70, -1, -1, -1, 111, - -1, 76, 77, 78, -1, 80, 81, -1, 83, -1, - -1, 86, 87, -1, 89, 90, -1, -1, -1, -1, - -1, -1, -1, -1, 99, -1, -1, -1, -1, -1, - 105, 106, -1, -1, -1, 111, 66, 67, 68, 69, - 70, -1, -1, -1, -1, -1, 76, 77, 78, -1, - 80, 81, -1, 83, -1, -1, 86, 87, -1, 89, - 90, -1, -1, -1, -1, -1, -1, -1, -1, 99, - -1, -1, -1, -1, -1, 105, 106, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65 + 66, 112, 112, 112, 112, 6, 112, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 111, 111, + 265, 111, 113, 112, 112, 285, 113, 263, 20, 257, + -1, -1, -1, -1, -1, -1, 112, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, -1, -1, + -1, -1, -1, 112, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 112, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, + 112, -1, 67, 68, 69, 70, 71, -1, -1, -1, + -1, -1, 77, 78, 79, -1, 81, 82, -1, 84, + -1, -1, 87, 88, -1, 90, 91, -1, -1, -1, + -1, -1, -1, -1, -1, 100, -1, -1, -1, -1, + 112, 106, 107, 67, 68, 69, 70, 71, -1, -1, + -1, -1, -1, 77, 78, 79, -1, 81, 82, -1, + 84, -1, -1, 87, 88, -1, 90, 91, -1, -1, + -1, -1, -1, -1, -1, -1, 100, -1, -1, -1, + -1, -1, 106, 107, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 3, 8, 9, 10, 11, 116, 117, 118, 140, - 141, 142, 174, 98, 98, 143, 143, 111, 112, 177, - 175, 0, 117, 119, 144, 143, 177, 120, 66, 67, - 68, 69, 70, 76, 77, 78, 80, 81, 83, 86, - 87, 89, 90, 99, 105, 106, 145, 146, 152, 159, - 160, 161, 162, 164, 165, 166, 167, 168, 171, 172, - 173, 4, 13, 15, 16, 17, 18, 42, 43, 44, - 99, 121, 122, 123, 124, 125, 126, 127, 111, 111, - 111, 111, 71, 4, 111, 133, 111, 79, 113, 111, - 163, 82, 84, 85, 110, 88, 89, 90, 92, 93, - 101, 101, 111, 111, 14, 35, 36, 39, 111, 111, - 112, 111, 111, 111, 128, 111, 112, 114, 114, 114, - 114, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 111, 148, 155, 176, 94, 95, 102, 113, - 110, 111, 100, 96, 97, 111, 111, 111, 111, 111, - 111, 111, 133, 133, 111, 107, 108, 109, 111, 110, - 112, 111, 24, 30, 129, 91, 94, 95, 73, 96, - 100, 156, 12, 74, 147, 147, 176, 111, 18, 110, - 114, 108, 109, 112, 112, 26, 91, 4, 5, 16, - 19, 53, 98, 111, 112, 130, 131, 72, 75, 158, - 147, 147, 111, 148, 149, 97, 157, 111, 176, 158, - 111, 176, 111, 176, 103, 169, 111, 112, 112, 36, - 110, 28, 132, 110, 72, 111, 176, 111, 176, 94, - 73, 158, 110, 100, 158, 158, 158, 158, 170, 97, - 112, 5, 99, 133, 135, 110, 154, 153, 158, 158, - 147, 148, 97, 98, 110, 111, 134, 104, 150, 150, - 111, 176, 110, 144, 134, 136, 111, 151, 176, 158, - 158, 99, 137, 138, 100, 98, 15, 16, 17, 20, + 0, 3, 8, 9, 10, 11, 117, 118, 119, 141, + 142, 143, 175, 99, 99, 144, 144, 112, 113, 178, + 176, 0, 118, 120, 145, 144, 178, 121, 67, 68, + 69, 70, 71, 77, 78, 79, 81, 82, 84, 87, + 88, 90, 91, 100, 106, 107, 146, 147, 153, 160, + 161, 162, 163, 165, 166, 167, 168, 169, 172, 173, + 174, 4, 13, 15, 16, 17, 18, 42, 43, 44, + 100, 122, 123, 124, 125, 126, 127, 128, 112, 112, + 112, 112, 72, 4, 112, 134, 112, 80, 114, 112, + 164, 83, 85, 86, 111, 89, 90, 91, 93, 94, + 102, 102, 112, 112, 14, 35, 36, 39, 112, 112, + 113, 112, 112, 112, 129, 112, 113, 115, 115, 115, + 115, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 112, 149, 156, 177, 95, 96, 103, 114, + 111, 112, 101, 97, 98, 112, 112, 112, 112, 112, + 112, 112, 134, 134, 112, 108, 109, 110, 112, 111, + 113, 112, 24, 30, 130, 92, 95, 96, 74, 97, + 101, 157, 12, 75, 148, 148, 177, 112, 18, 111, + 115, 109, 110, 113, 113, 26, 92, 4, 5, 16, + 19, 54, 99, 112, 113, 131, 132, 73, 76, 159, + 148, 148, 112, 149, 150, 98, 158, 112, 177, 159, + 112, 177, 112, 177, 104, 170, 112, 113, 113, 36, + 111, 28, 133, 111, 73, 112, 177, 112, 177, 95, + 74, 159, 111, 101, 159, 159, 159, 159, 171, 98, + 113, 5, 100, 134, 136, 111, 155, 154, 159, 159, + 148, 149, 98, 99, 111, 112, 135, 105, 151, 151, + 112, 177, 111, 145, 135, 137, 112, 152, 177, 159, + 159, 100, 138, 139, 101, 99, 15, 16, 17, 20, 21, 22, 23, 24, 25, 26, 27, 31, 32, 33, - 34, 35, 37, 38, 39, 40, 41, 97, 139, 111, - 176, 138, 111, 111, 111, 26, 27, 26, 73, 111, - 110, 110, 112, 111, 111, 28, 29, 112, 110, 99, - 24, 111, 112, 26 + 34, 35, 37, 38, 39, 40, 41, 45, 98, 140, + 112, 177, 139, 112, 112, 112, 26, 27, 26, 74, + 112, 111, 111, 113, 112, 112, 28, 29, 113, 112, + 113, 111, 100, 24, 112, 113, 26 }; #define yyerrok (yyerrstatus = 0) @@ -2458,19 +2463,35 @@ yyparse () case 72: #line 563 "test_spec_parse.y" { - current_node->group = (yyvsp[(2) - (2)].ival); + strlcpy(current_node->region, (yyvsp[(2) - (2)].str), sizeof(current_node->region)); + free((yyvsp[(2) - (2)].str)); ;} break; case 73: -#line 567 "test_spec_parse.y" +#line 568 "test_spec_parse.y" { - current_node->pgPort = (yyvsp[(2) - (2)].ival); + strlcpy(current_node->region, (yyvsp[(2) - (2)].str), sizeof(current_node->region)); + free((yyvsp[(2) - (2)].str)); ;} break; case 74: -#line 571 "test_spec_parse.y" +#line 573 "test_spec_parse.y" + { + current_node->group = (yyvsp[(2) - (2)].ival); + ;} + break; + + case 75: +#line 577 "test_spec_parse.y" + { + current_node->pgPort = (yyvsp[(2) - (2)].ival); + ;} + break; + + case 76: +#line 581 "test_spec_parse.y" { strlcpy(current_node->citusClusterName, (yyvsp[(2) - (2)].str), sizeof(current_node->citusClusterName)); @@ -2478,8 +2499,8 @@ yyparse () ;} break; - case 75: -#line 577 "test_spec_parse.y" + case 77: +#line 587 "test_spec_parse.y" { strlcpy(current_node->debianCluster, (yyvsp[(2) - (2)].str), sizeof(current_node->debianCluster)); @@ -2487,46 +2508,46 @@ yyparse () ;} break; - case 76: -#line 583 "test_spec_parse.y" + case 78: +#line 593 "test_spec_parse.y" { strlcpy(current_node->ssl, (yyvsp[(2) - (2)].str), sizeof(current_node->ssl)); free((yyvsp[(2) - (2)].str)); ;} break; - case 77: -#line 588 "test_spec_parse.y" + case 79: +#line 598 "test_spec_parse.y" { strlcpy(current_node->auth, (yyvsp[(2) - (2)].str), sizeof(current_node->auth)); free((yyvsp[(2) - (2)].str)); ;} break; - case 78: -#line 593 "test_spec_parse.y" + case 80: +#line 603 "test_spec_parse.y" { strlcpy(current_node->auth, (yyvsp[(2) - (2)].str), sizeof(current_node->auth)); free((yyvsp[(2) - (2)].str)); ;} break; - case 79: -#line 598 "test_spec_parse.y" + case 81: +#line 608 "test_spec_parse.y" { current_node->replicationQuorum = true; ;} break; - case 80: -#line 602 "test_spec_parse.y" + case 82: +#line 612 "test_spec_parse.y" { current_node->replicationQuorum = false; ;} break; - case 81: -#line 606 "test_spec_parse.y" + case 83: +#line 616 "test_spec_parse.y" { strlcpy(current_node->replicationPassword, (yyvsp[(2) - (2)].str), sizeof(current_node->replicationPassword)); @@ -2534,8 +2555,8 @@ yyparse () ;} break; - case 82: -#line 612 "test_spec_parse.y" + case 84: +#line 622 "test_spec_parse.y" { strlcpy(current_node->monitorPassword, (yyvsp[(2) - (2)].str), sizeof(current_node->monitorPassword)); @@ -2543,8 +2564,8 @@ yyparse () ;} break; - case 83: -#line 618 "test_spec_parse.y" + case 85: +#line 628 "test_spec_parse.y" { /* volume — adds a named Docker volume */ int vi = current_node->volumeCount; @@ -2560,8 +2581,8 @@ yyparse () ;} break; - case 84: -#line 632 "test_spec_parse.y" + case 86: +#line 642 "test_spec_parse.y" { /* volume "/path/with spaces" */ int vi = current_node->volumeCount; @@ -2577,22 +2598,22 @@ yyparse () ;} break; - case 85: -#line 653 "test_spec_parse.y" + case 87: +#line 663 "test_spec_parse.y" { current_spec->setup = (yyvsp[(2) - (2)].step); ;} break; - case 86: -#line 660 "test_spec_parse.y" + case 88: +#line 670 "test_spec_parse.y" { current_spec->teardown = (yyvsp[(2) - (2)].step); ;} break; - case 87: -#line 671 "test_spec_parse.y" + case 89: +#line 681 "test_spec_parse.y" { TestStep *s = (yyvsp[(3) - (3)].step); strncpy(s->name, (yyvsp[(2) - (3)].str), sizeof(s->name) - 1); @@ -2601,8 +2622,8 @@ yyparse () ;} break; - case 88: -#line 689 "test_spec_parse.y" + case 90: +#line 699 "test_spec_parse.y" { /* post-process: CMD_SQL immediately before CMD_EXPECT_ERROR */ for (TestCmd *c = (yyvsp[(2) - (3)].step)->commands; c; c = c->next) @@ -2615,93 +2636,93 @@ yyparse () ;} break; - case 89: -#line 703 "test_spec_parse.y" + case 91: +#line 713 "test_spec_parse.y" { (yyval.step) = make_step(""); ;} break; - case 90: -#line 707 "test_spec_parse.y" + case 92: +#line 717 "test_spec_parse.y" { if ((yyvsp[(2) - (2)].cmd)) append_cmd((yyvsp[(1) - (2)].step), (yyvsp[(2) - (2)].cmd)); (yyval.step) = (yyvsp[(1) - (2)].step); ;} break; - case 91: -#line 714 "test_spec_parse.y" - { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} - break; - - case 92: -#line 715 "test_spec_parse.y" - { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} - break; - case 93: -#line 716 "test_spec_parse.y" +#line 724 "test_spec_parse.y" { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} break; case 94: -#line 717 "test_spec_parse.y" +#line 725 "test_spec_parse.y" { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} break; case 95: -#line 718 "test_spec_parse.y" +#line 726 "test_spec_parse.y" { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} break; case 96: -#line 719 "test_spec_parse.y" +#line 727 "test_spec_parse.y" { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} break; case 97: -#line 720 "test_spec_parse.y" +#line 728 "test_spec_parse.y" { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} break; case 98: -#line 721 "test_spec_parse.y" +#line 729 "test_spec_parse.y" { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} break; case 99: -#line 722 "test_spec_parse.y" +#line 730 "test_spec_parse.y" { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} break; case 100: -#line 723 "test_spec_parse.y" +#line 731 "test_spec_parse.y" { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} break; case 101: -#line 724 "test_spec_parse.y" +#line 732 "test_spec_parse.y" { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} break; case 102: -#line 725 "test_spec_parse.y" +#line 733 "test_spec_parse.y" { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} break; case 103: -#line 726 "test_spec_parse.y" +#line 734 "test_spec_parse.y" { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} break; case 104: -#line 727 "test_spec_parse.y" +#line 735 "test_spec_parse.y" { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} break; case 105: -#line 742 "test_spec_parse.y" +#line 736 "test_spec_parse.y" + { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} + break; + + case 106: +#line 737 "test_spec_parse.y" + { (yyval.cmd) = (yyvsp[(1) - (1)].cmd); ;} + break; + + case 107: +#line 752 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_EXEC); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (3)].str), sizeof((yyval.cmd)->service)); @@ -2710,8 +2731,8 @@ yyparse () ;} break; - case 106: -#line 749 "test_spec_parse.y" + case 108: +#line 759 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_EXEC); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (2)].str), sizeof((yyval.cmd)->service)); @@ -2719,8 +2740,8 @@ yyparse () ;} break; - case 107: -#line 755 "test_spec_parse.y" + case 109: +#line 765 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_EXEC_FAILS); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (3)].str), sizeof((yyval.cmd)->service)); @@ -2729,8 +2750,8 @@ yyparse () ;} break; - case 108: -#line 762 "test_spec_parse.y" + case 110: +#line 772 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_EXEC_FAILS); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (2)].str), sizeof((yyval.cmd)->service)); @@ -2738,8 +2759,8 @@ yyparse () ;} break; - case 109: -#line 768 "test_spec_parse.y" + case 111: +#line 778 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_RUN); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (3)].str), sizeof((yyval.cmd)->service)); @@ -2748,8 +2769,8 @@ yyparse () ;} break; - case 110: -#line 775 "test_spec_parse.y" + case 112: +#line 785 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_RUN); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (2)].str), sizeof((yyval.cmd)->service)); @@ -2757,8 +2778,8 @@ yyparse () ;} break; - case 111: -#line 781 "test_spec_parse.y" + case 113: +#line 791 "test_spec_parse.y" { /* "pg_autoctl perform failover --formation auth" * EXEC_ARGS returns T_IDENT for first word, T_SHELL_ARGS for rest */ @@ -2768,8 +2789,8 @@ yyparse () ;} break; - case 112: -#line 789 "test_spec_parse.y" + case 114: +#line 799 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_PG_AUTOCTL); strlcpy((yyval.cmd)->args, (yyvsp[(2) - (2)].str), sizeof((yyval.cmd)->args)); @@ -2777,15 +2798,15 @@ yyparse () ;} break; - case 113: -#line 795 "test_spec_parse.y" + case 115: +#line 805 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_PG_AUTOCTL); ;} break; - case 116: -#line 833 "test_spec_parse.y" + case 118: +#line 843 "test_spec_parse.y" { if (!current_wait_cmd) current_wait_cmd = make_cmd(CMD_WAIT_MULTI); @@ -2802,8 +2823,8 @@ yyparse () ;} break; - case 117: -#line 848 "test_spec_parse.y" + case 119: +#line 858 "test_spec_parse.y" { if (!current_wait_cmd) current_wait_cmd = make_cmd(CMD_WAIT_MULTI); @@ -2820,8 +2841,8 @@ yyparse () ;} break; - case 122: -#line 888 "test_spec_parse.y" + case 124: +#line 898 "test_spec_parse.y" { /* current_pass_cmd set by the enclosing wait_cmd rule */ if (current_pass_cmd && @@ -2831,8 +2852,8 @@ yyparse () ;} break; - case 123: -#line 896 "test_spec_parse.y" + case 125: +#line 906 "test_spec_parse.y" { if (current_pass_cmd && current_pass_cmd->passThroughCount < PGAF_MAX_WAIT_STATES) @@ -2842,8 +2863,8 @@ yyparse () ;} break; - case 124: -#line 904 "test_spec_parse.y" + case 126: +#line 914 "test_spec_parse.y" { if (current_pass_cmd && current_pass_cmd->passThroughCount < PGAF_MAX_WAIT_STATES) @@ -2852,8 +2873,8 @@ yyparse () ;} break; - case 125: -#line 911 "test_spec_parse.y" + case 127: +#line 921 "test_spec_parse.y" { if (current_pass_cmd && current_pass_cmd->passThroughCount < PGAF_MAX_WAIT_STATES) @@ -2863,16 +2884,16 @@ yyparse () ;} break; - case 126: -#line 922 "test_spec_parse.y" + case 128: +#line 932 "test_spec_parse.y" { current_pass_cmd = make_cmd(CMD_WAIT_STATE); strlcpy(current_pass_cmd->service, (yyvsp[(3) - (6)].str), sizeof(current_pass_cmd->service)); strlcpy(current_pass_cmd->state, (yyvsp[(6) - (6)].str), sizeof(current_pass_cmd->state)); free((yyvsp[(3) - (6)].str)); ;} break; - case 127: -#line 927 "test_spec_parse.y" + case 129: +#line 937 "test_spec_parse.y" { current_pass_cmd->timeoutSeconds = (yyvsp[(9) - (9)].ival); (yyval.cmd) = current_pass_cmd; @@ -2880,16 +2901,16 @@ yyparse () ;} break; - case 128: -#line 933 "test_spec_parse.y" + case 130: +#line 943 "test_spec_parse.y" { current_pass_cmd = make_cmd(CMD_WAIT_STATE); strlcpy(current_pass_cmd->service, (yyvsp[(3) - (6)].str), sizeof(current_pass_cmd->service)); strlcpy(current_pass_cmd->state, (yyvsp[(6) - (6)].str), sizeof(current_pass_cmd->state)); free((yyvsp[(3) - (6)].str)); free((yyvsp[(6) - (6)].str)); ;} break; - case 129: -#line 938 "test_spec_parse.y" + case 131: +#line 948 "test_spec_parse.y" { current_pass_cmd->timeoutSeconds = (yyvsp[(9) - (9)].ival); (yyval.cmd) = current_pass_cmd; @@ -2897,8 +2918,8 @@ yyparse () ;} break; - case 130: -#line 944 "test_spec_parse.y" + case 132: +#line 954 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_WAIT_STATE); (yyval.cmd)->kind = CMD_ASSERT_ASSIGNED; @@ -2909,8 +2930,8 @@ yyparse () ;} break; - case 131: -#line 953 "test_spec_parse.y" + case 133: +#line 963 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_WAIT_STATE); (yyval.cmd)->kind = CMD_ASSERT_ASSIGNED; @@ -2921,8 +2942,8 @@ yyparse () ;} break; - case 132: -#line 962 "test_spec_parse.y" + case 134: +#line 972 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_WAIT_STOPPED); strlcpy((yyval.cmd)->service, (yyvsp[(3) - (5)].str), sizeof((yyval.cmd)->service)); @@ -2931,8 +2952,8 @@ yyparse () ;} break; - case 133: -#line 969 "test_spec_parse.y" + case 135: +#line 979 "test_spec_parse.y" { (yyval.cmd) = current_wait_cmd; (yyval.cmd)->timeoutSeconds = (yyvsp[(5) - (5)].ival); @@ -2940,8 +2961,8 @@ yyparse () ;} break; - case 134: -#line 983 "test_spec_parse.y" + case 136: +#line 993 "test_spec_parse.y" { (yyval.cmd) = current_wait_cmd; (yyval.cmd)->timeoutSeconds = (yyvsp[(6) - (6)].ival); @@ -2949,8 +2970,8 @@ yyparse () ;} break; - case 135: -#line 998 "test_spec_parse.y" + case 137: +#line 1008 "test_spec_parse.y" { current_wait_cmd = make_cmd(CMD_WAIT_STATES); strlcpy(current_wait_cmd->waitStates[current_wait_cmd->waitStateCount++], @@ -2958,8 +2979,8 @@ yyparse () ;} break; - case 136: -#line 1004 "test_spec_parse.y" + case 138: +#line 1014 "test_spec_parse.y" { current_wait_cmd = make_cmd(CMD_WAIT_STATES); strlcpy(current_wait_cmd->waitStates[current_wait_cmd->waitStateCount++], @@ -2968,8 +2989,8 @@ yyparse () ;} break; - case 137: -#line 1011 "test_spec_parse.y" + case 139: +#line 1021 "test_spec_parse.y" { if (current_wait_cmd->waitStateCount < PGAF_MAX_WAIT_STATES) strlcpy(current_wait_cmd->waitStates[current_wait_cmd->waitStateCount++], @@ -2977,8 +2998,8 @@ yyparse () ;} break; - case 138: -#line 1017 "test_spec_parse.y" + case 140: +#line 1027 "test_spec_parse.y" { if (current_wait_cmd->waitStateCount < PGAF_MAX_WAIT_STATES) strlcpy(current_wait_cmd->waitStates[current_wait_cmd->waitStateCount++], @@ -2987,39 +3008,39 @@ yyparse () ;} break; - case 141: -#line 1036 "test_spec_parse.y" + case 143: +#line 1046 "test_spec_parse.y" { if (current_wait_cmd->waitGroupCount < PGAF_MAX_WAIT_GROUPS) current_wait_cmd->waitGroups[current_wait_cmd->waitGroupCount++] = (yyvsp[(2) - (2)].ival); ;} break; - case 142: -#line 1041 "test_spec_parse.y" + case 144: +#line 1051 "test_spec_parse.y" { if (current_wait_cmd->waitGroupCount < PGAF_MAX_WAIT_GROUPS) current_wait_cmd->waitGroups[current_wait_cmd->waitGroupCount++] = (yyvsp[(4) - (4)].ival); ;} break; - case 143: -#line 1048 "test_spec_parse.y" + case 145: +#line 1058 "test_spec_parse.y" { (yyval.ival) = PGAF_TIMEOUT_DEFAULT; ;} break; - case 144: -#line 1049 "test_spec_parse.y" + case 146: +#line 1059 "test_spec_parse.y" { (yyval.ival) = (yyvsp[(2) - (2)].ival); ;} break; - case 145: -#line 1050 "test_spec_parse.y" + case 147: +#line 1060 "test_spec_parse.y" { (yyval.ival) = (yyvsp[(3) - (3)].ival); ;} break; - case 146: -#line 1062 "test_spec_parse.y" + case 148: +#line 1072 "test_spec_parse.y" { (yyval.cmd) = make_cmd((yyvsp[(6) - (6)].ival) > 0 ? CMD_WAIT_STATE : CMD_ASSERT_STATE); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (6)].str), sizeof((yyval.cmd)->service)); @@ -3029,8 +3050,8 @@ yyparse () ;} break; - case 147: -#line 1070 "test_spec_parse.y" + case 149: +#line 1080 "test_spec_parse.y" { (yyval.cmd) = make_cmd((yyvsp[(6) - (6)].ival) > 0 ? CMD_WAIT_STATE : CMD_ASSERT_STATE); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (6)].str), sizeof((yyval.cmd)->service)); @@ -3040,8 +3061,8 @@ yyparse () ;} break; - case 148: -#line 1078 "test_spec_parse.y" + case 150: +#line 1088 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_ASSERT_ASSIGNED); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (6)].str), sizeof((yyval.cmd)->service)); @@ -3051,8 +3072,8 @@ yyparse () ;} break; - case 149: -#line 1086 "test_spec_parse.y" + case 151: +#line 1096 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_ASSERT_ASSIGNED); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (6)].str), sizeof((yyval.cmd)->service)); @@ -3062,8 +3083,8 @@ yyparse () ;} break; - case 150: -#line 1104 "test_spec_parse.y" + case 152: +#line 1114 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_SQL); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (3)].str), sizeof((yyval.cmd)->service)); @@ -3072,8 +3093,8 @@ yyparse () ;} break; - case 151: -#line 1119 "test_spec_parse.y" + case 153: +#line 1129 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_EXPECT); strlcpy((yyval.cmd)->expected, (yyvsp[(2) - (2)].str), sizeof((yyval.cmd)->expected)); @@ -3082,15 +3103,15 @@ yyparse () ;} break; - case 152: -#line 1126 "test_spec_parse.y" + case 154: +#line 1136 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_EXPECT_ERROR); ;} break; - case 153: -#line 1130 "test_spec_parse.y" + case 155: +#line 1140 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_EXPECT_ERROR); strlcpy((yyval.cmd)->state, (yyvsp[(3) - (3)].str), sizeof((yyval.cmd)->state)); @@ -3098,8 +3119,8 @@ yyparse () ;} break; - case 154: -#line 1136 "test_spec_parse.y" + case 156: +#line 1146 "test_spec_parse.y" { /* SQLSTATE codes like 25006 are all digits, lexed as T_INTEGER */ (yyval.cmd) = make_cmd(CMD_EXPECT_ERROR); @@ -3107,16 +3128,16 @@ yyparse () ;} break; - case 155: -#line 1149 "test_spec_parse.y" + case 157: +#line 1159 "test_spec_parse.y" { (yyval.cmd) = current_promote_cmd; current_promote_cmd = NULL; ;} break; - case 156: -#line 1157 "test_spec_parse.y" + case 158: +#line 1167 "test_spec_parse.y" { current_promote_cmd = make_cmd(CMD_PROMOTE); current_promote_cmd->timeoutSeconds = PGAF_TIMEOUT_DEFAULT; @@ -3126,8 +3147,8 @@ yyparse () ;} break; - case 157: -#line 1165 "test_spec_parse.y" + case 159: +#line 1175 "test_spec_parse.y" { if (current_promote_cmd->promoteCount < PGAF_MAX_PROMOTE_NODES) strlcpy(current_promote_cmd->promoteNodes[current_promote_cmd->promoteCount++], @@ -3136,8 +3157,8 @@ yyparse () ;} break; - case 158: -#line 1186 "test_spec_parse.y" + case 160: +#line 1196 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_FAILOVER); strlcpy((yyval.cmd)->service, "default", sizeof((yyval.cmd)->service)); @@ -3146,8 +3167,8 @@ yyparse () ;} break; - case 159: -#line 1193 "test_spec_parse.y" + case 161: +#line 1203 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_FAILOVER); strlcpy((yyval.cmd)->service, "default", sizeof((yyval.cmd)->service)); @@ -3156,8 +3177,8 @@ yyparse () ;} break; - case 160: -#line 1200 "test_spec_parse.y" + case 162: +#line 1210 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_FAILOVER); strlcpy((yyval.cmd)->service, (yyvsp[(5) - (5)].str), sizeof((yyval.cmd)->service)); @@ -3167,8 +3188,8 @@ yyparse () ;} break; - case 161: -#line 1208 "test_spec_parse.y" + case 163: +#line 1218 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_FAILOVER); strlcpy((yyval.cmd)->service, (yyvsp[(5) - (7)].str), sizeof((yyval.cmd)->service)); @@ -3178,8 +3199,8 @@ yyparse () ;} break; - case 162: -#line 1224 "test_spec_parse.y" + case 164: +#line 1234 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_NETWORK_OFF); strlcpy((yyval.cmd)->service, (yyvsp[(3) - (3)].str), sizeof((yyval.cmd)->service)); @@ -3187,8 +3208,8 @@ yyparse () ;} break; - case 163: -#line 1230 "test_spec_parse.y" + case 165: +#line 1240 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_NETWORK_ON); strlcpy((yyval.cmd)->service, (yyvsp[(3) - (3)].str), sizeof((yyval.cmd)->service)); @@ -3196,23 +3217,23 @@ yyparse () ;} break; - case 164: -#line 1243 "test_spec_parse.y" + case 166: +#line 1253 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_SLEEP); (yyval.cmd)->timeoutSeconds = (yyvsp[(2) - (2)].ival); ;} break; - case 165: -#line 1257 "test_spec_parse.y" + case 167: +#line 1267 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_COMPOSE_DOWN); ;} break; - case 166: -#line 1261 "test_spec_parse.y" + case 168: +#line 1271 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_COMPOSE_START); strlcpy((yyval.cmd)->service, (yyvsp[(3) - (3)].str), sizeof((yyval.cmd)->service)); @@ -3220,8 +3241,8 @@ yyparse () ;} break; - case 167: -#line 1267 "test_spec_parse.y" + case 169: +#line 1277 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_COMPOSE_STOP); strlcpy((yyval.cmd)->service, (yyvsp[(3) - (3)].str), sizeof((yyval.cmd)->service)); @@ -3229,8 +3250,8 @@ yyparse () ;} break; - case 168: -#line 1273 "test_spec_parse.y" + case 170: +#line 1283 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_COMPOSE_KILL); strlcpy((yyval.cmd)->service, (yyvsp[(3) - (3)].str), sizeof((yyval.cmd)->service)); @@ -3238,8 +3259,8 @@ yyparse () ;} break; - case 169: -#line 1299 "test_spec_parse.y" + case 171: +#line 1309 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_COMPOSE_INJECT); strlcpy((yyval.cmd)->expected, (yyvsp[(3) - (4)].str), sizeof((yyval.cmd)->expected)); /* image */ @@ -3264,8 +3285,8 @@ yyparse () ;} break; - case 170: -#line 1333 "test_spec_parse.y" + case 172: +#line 1343 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_STOP_POSTGRES); strlcpy((yyval.cmd)->service, (yyvsp[(3) - (3)].str), sizeof((yyval.cmd)->service)); @@ -3273,8 +3294,8 @@ yyparse () ;} break; - case 171: -#line 1339 "test_spec_parse.y" + case 173: +#line 1349 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_START_POSTGRES); strlcpy((yyval.cmd)->service, (yyvsp[(3) - (3)].str), sizeof((yyval.cmd)->service)); @@ -3282,18 +3303,18 @@ yyparse () ;} break; - case 172: -#line 1355 "test_spec_parse.y" + case 174: +#line 1365 "test_spec_parse.y" { pgaf_next_brace_is_while = 1; ;} break; - case 173: -#line 1356 "test_spec_parse.y" + case 175: +#line 1366 "test_spec_parse.y" { (yyval.step) = (yyvsp[(4) - (5)].step); ;} break; - case 174: -#line 1361 "test_spec_parse.y" + case 176: +#line 1371 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_STAYS_WHILE); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (5)].str), sizeof((yyval.cmd)->service)); @@ -3303,8 +3324,8 @@ yyparse () ;} break; - case 175: -#line 1380 "test_spec_parse.y" + case 177: +#line 1390 "test_spec_parse.y" { /* only "set monitor " is supported; $2 must be "monitor" */ if (strcmp((yyvsp[(2) - (3)].str), "monitor") != 0) @@ -3319,8 +3340,8 @@ yyparse () ;} break; - case 176: -#line 1405 "test_spec_parse.y" + case 178: +#line 1415 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_LOGS_CHECK); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (4)].str), sizeof((yyval.cmd)->service)); @@ -3331,8 +3352,8 @@ yyparse () ;} break; - case 177: -#line 1414 "test_spec_parse.y" + case 179: +#line 1424 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_LOGS_CHECK); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (5)].str), sizeof((yyval.cmd)->service)); @@ -3343,8 +3364,8 @@ yyparse () ;} break; - case 178: -#line 1423 "test_spec_parse.y" + case 180: +#line 1433 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_LOGS_CHECK); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (4)].str), sizeof((yyval.cmd)->service)); @@ -3355,8 +3376,8 @@ yyparse () ;} break; - case 179: -#line 1432 "test_spec_parse.y" + case 181: +#line 1442 "test_spec_parse.y" { (yyval.cmd) = make_cmd(CMD_LOGS_CHECK); strlcpy((yyval.cmd)->service, (yyvsp[(2) - (5)].str), sizeof((yyval.cmd)->service)); @@ -3367,8 +3388,8 @@ yyparse () ;} break; - case 182: -#line 1453 "test_spec_parse.y" + case 184: +#line 1463 "test_spec_parse.y" { int i = current_spec->sequenceLength; if (i < PGAF_MAX_SEQ) @@ -3382,124 +3403,124 @@ yyparse () ;} break; - case 183: -#line 1474 "test_spec_parse.y" + case 185: +#line 1484 "test_spec_parse.y" { (yyval.str) = "init"; ;} break; - case 184: -#line 1475 "test_spec_parse.y" + case 186: +#line 1485 "test_spec_parse.y" { (yyval.str) = "single"; ;} break; - case 185: -#line 1476 "test_spec_parse.y" + case 187: +#line 1486 "test_spec_parse.y" { (yyval.str) = "primary"; ;} break; - case 186: -#line 1477 "test_spec_parse.y" + case 188: +#line 1487 "test_spec_parse.y" { (yyval.str) = "wait_primary"; ;} break; - case 187: -#line 1478 "test_spec_parse.y" + case 189: +#line 1488 "test_spec_parse.y" { (yyval.str) = "wait_standby"; ;} break; - case 188: -#line 1479 "test_spec_parse.y" + case 190: +#line 1489 "test_spec_parse.y" { (yyval.str) = "demoted"; ;} break; - case 189: -#line 1480 "test_spec_parse.y" + case 191: +#line 1490 "test_spec_parse.y" { (yyval.str) = "demote_timeout"; ;} break; - case 190: -#line 1481 "test_spec_parse.y" + case 192: +#line 1491 "test_spec_parse.y" { (yyval.str) = "draining"; ;} break; - case 191: -#line 1482 "test_spec_parse.y" + case 193: +#line 1492 "test_spec_parse.y" { (yyval.str) = "secondary"; ;} break; - case 192: -#line 1483 "test_spec_parse.y" + case 194: +#line 1493 "test_spec_parse.y" { (yyval.str) = "catchingup"; ;} break; - case 193: -#line 1484 "test_spec_parse.y" + case 195: +#line 1494 "test_spec_parse.y" { (yyval.str) = "prepare_promotion"; ;} break; - case 194: -#line 1485 "test_spec_parse.y" + case 196: +#line 1495 "test_spec_parse.y" { (yyval.str) = "stop_replication"; ;} break; - case 195: -#line 1486 "test_spec_parse.y" + case 197: +#line 1496 "test_spec_parse.y" { (yyval.str) = "maintenance"; ;} break; - case 196: -#line 1487 "test_spec_parse.y" + case 198: +#line 1497 "test_spec_parse.y" { (yyval.str) = "join_primary"; ;} break; - case 197: -#line 1488 "test_spec_parse.y" + case 199: +#line 1498 "test_spec_parse.y" { (yyval.str) = "apply_settings"; ;} break; - case 198: -#line 1489 "test_spec_parse.y" + case 200: +#line 1499 "test_spec_parse.y" { (yyval.str) = "prepare_maintenance"; ;} break; - case 199: -#line 1490 "test_spec_parse.y" + case 201: +#line 1500 "test_spec_parse.y" { (yyval.str) = "wait_maintenance"; ;} break; - case 200: -#line 1491 "test_spec_parse.y" + case 202: +#line 1501 "test_spec_parse.y" { (yyval.str) = "report_lsn"; ;} break; - case 201: -#line 1492 "test_spec_parse.y" + case 203: +#line 1502 "test_spec_parse.y" { (yyval.str) = "fast_forward"; ;} break; - case 202: -#line 1493 "test_spec_parse.y" + case 204: +#line 1503 "test_spec_parse.y" { (yyval.str) = "join_secondary"; ;} break; - case 203: -#line 1494 "test_spec_parse.y" + case 205: +#line 1504 "test_spec_parse.y" { (yyval.str) = "dropped"; ;} break; - case 204: -#line 1502 "test_spec_parse.y" + case 206: +#line 1512 "test_spec_parse.y" { (yyval.str) = (yyvsp[(1) - (1)].str); ;} break; - case 205: -#line 1503 "test_spec_parse.y" + case 207: +#line 1513 "test_spec_parse.y" { (yyval.str) = (yyvsp[(1) - (1)].str); ;} break; /* Line 1267 of yacc.c. */ -#line 3503 "test_spec_parse.c" +#line 3524 "test_spec_parse.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -3713,7 +3734,7 @@ yyparse () } -#line 1506 "test_spec_parse.y" +#line 1516 "test_spec_parse.y" /* ----------------------------------------------------------------------- diff --git a/src/bin/pgaftest/test_spec_parse.h b/src/bin/pgaftest/test_spec_parse.h index c989c9270..606b58134 100644 --- a/src/bin/pgaftest/test_spec_parse.h +++ b/src/bin/pgaftest/test_spec_parse.h @@ -81,76 +81,77 @@ T_EXTENSION_VERSION = 297, T_BIND_SOURCE = 298, T_LEGACY_STARTUP = 299, - T_FS_INIT = 300, - T_FS_SINGLE = 301, - T_FS_PRIMARY = 302, - T_FS_WAIT_PRIMARY = 303, - T_FS_WAIT_STANDBY = 304, - T_FS_DEMOTED = 305, - T_FS_DEMOTE_TIMEOUT = 306, - T_FS_DRAINING = 307, - T_FS_SECONDARY = 308, - T_FS_CATCHINGUP = 309, - T_FS_PREP_PROMOTION = 310, - T_FS_STOP_REPLICATION = 311, - T_FS_MAINTENANCE = 312, - T_FS_JOIN_PRIMARY = 313, - T_FS_APPLY_SETTINGS = 314, - T_FS_PREPARE_MAINTENANCE = 315, - T_FS_WAIT_MAINTENANCE = 316, - T_FS_REPORT_LSN = 317, - T_FS_FAST_FORWARD = 318, - T_FS_JOIN_SECONDARY = 319, - T_FS_DROPPED = 320, - T_EXEC = 321, - T_EXEC_FAILS = 322, - T_RUN = 323, - T_PG_AUTOCTL = 324, - T_WAIT = 325, - T_UNTIL = 326, - T_TIMEOUT = 327, - T_AND = 328, - T_IS = 329, - T_WITH = 330, - T_ASSERT = 331, - T_SQL = 332, - T_EXPECT = 333, - T_ERROR = 334, - T_PROMOTE = 335, - T_PERFORM = 336, - T_FAILOVER = 337, - T_NETWORK = 338, - T_DISCONNECT = 339, - T_CONNECT = 340, - T_SLEEP = 341, - T_COMPOSE = 342, - T_DOWN = 343, - T_START = 344, - T_STOP = 345, - T_STOPPED = 346, - T_KILL = 347, - T_INJECT = 348, - T_STATE = 349, - T_ASSIGNED_STATE = 350, - T_IN = 351, - T_GROUP = 352, - T_LBRACE = 353, - T_RBRACE = 354, - T_COMMA = 355, - T_POSTGRES = 356, - T_STAYS = 357, - T_WHILE = 358, - T_THROUGH = 359, - T_SET = 360, - T_LOGS = 361, - T_NOT = 362, - T_CONTAINS = 363, - T_MATCHES = 364, - T_INTEGER = 365, - T_IDENT = 366, - T_STRING = 367, - T_BLOCK = 368, - T_SHELL_ARGS = 369 + T_REGION = 300, + T_FS_INIT = 301, + T_FS_SINGLE = 302, + T_FS_PRIMARY = 303, + T_FS_WAIT_PRIMARY = 304, + T_FS_WAIT_STANDBY = 305, + T_FS_DEMOTED = 306, + T_FS_DEMOTE_TIMEOUT = 307, + T_FS_DRAINING = 308, + T_FS_SECONDARY = 309, + T_FS_CATCHINGUP = 310, + T_FS_PREP_PROMOTION = 311, + T_FS_STOP_REPLICATION = 312, + T_FS_MAINTENANCE = 313, + T_FS_JOIN_PRIMARY = 314, + T_FS_APPLY_SETTINGS = 315, + T_FS_PREPARE_MAINTENANCE = 316, + T_FS_WAIT_MAINTENANCE = 317, + T_FS_REPORT_LSN = 318, + T_FS_FAST_FORWARD = 319, + T_FS_JOIN_SECONDARY = 320, + T_FS_DROPPED = 321, + T_EXEC = 322, + T_EXEC_FAILS = 323, + T_RUN = 324, + T_PG_AUTOCTL = 325, + T_WAIT = 326, + T_UNTIL = 327, + T_TIMEOUT = 328, + T_AND = 329, + T_IS = 330, + T_WITH = 331, + T_ASSERT = 332, + T_SQL = 333, + T_EXPECT = 334, + T_ERROR = 335, + T_PROMOTE = 336, + T_PERFORM = 337, + T_FAILOVER = 338, + T_NETWORK = 339, + T_DISCONNECT = 340, + T_CONNECT = 341, + T_SLEEP = 342, + T_COMPOSE = 343, + T_DOWN = 344, + T_START = 345, + T_STOP = 346, + T_STOPPED = 347, + T_KILL = 348, + T_INJECT = 349, + T_STATE = 350, + T_ASSIGNED_STATE = 351, + T_IN = 352, + T_GROUP = 353, + T_LBRACE = 354, + T_RBRACE = 355, + T_COMMA = 356, + T_POSTGRES = 357, + T_STAYS = 358, + T_WHILE = 359, + T_THROUGH = 360, + T_SET = 361, + T_LOGS = 362, + T_NOT = 363, + T_CONTAINS = 364, + T_MATCHES = 365, + T_INTEGER = 366, + T_IDENT = 367, + T_STRING = 368, + T_BLOCK = 369, + T_SHELL_ARGS = 370 }; #endif /* Tokens. */ @@ -196,76 +197,77 @@ #define T_EXTENSION_VERSION 297 #define T_BIND_SOURCE 298 #define T_LEGACY_STARTUP 299 -#define T_FS_INIT 300 -#define T_FS_SINGLE 301 -#define T_FS_PRIMARY 302 -#define T_FS_WAIT_PRIMARY 303 -#define T_FS_WAIT_STANDBY 304 -#define T_FS_DEMOTED 305 -#define T_FS_DEMOTE_TIMEOUT 306 -#define T_FS_DRAINING 307 -#define T_FS_SECONDARY 308 -#define T_FS_CATCHINGUP 309 -#define T_FS_PREP_PROMOTION 310 -#define T_FS_STOP_REPLICATION 311 -#define T_FS_MAINTENANCE 312 -#define T_FS_JOIN_PRIMARY 313 -#define T_FS_APPLY_SETTINGS 314 -#define T_FS_PREPARE_MAINTENANCE 315 -#define T_FS_WAIT_MAINTENANCE 316 -#define T_FS_REPORT_LSN 317 -#define T_FS_FAST_FORWARD 318 -#define T_FS_JOIN_SECONDARY 319 -#define T_FS_DROPPED 320 -#define T_EXEC 321 -#define T_EXEC_FAILS 322 -#define T_RUN 323 -#define T_PG_AUTOCTL 324 -#define T_WAIT 325 -#define T_UNTIL 326 -#define T_TIMEOUT 327 -#define T_AND 328 -#define T_IS 329 -#define T_WITH 330 -#define T_ASSERT 331 -#define T_SQL 332 -#define T_EXPECT 333 -#define T_ERROR 334 -#define T_PROMOTE 335 -#define T_PERFORM 336 -#define T_FAILOVER 337 -#define T_NETWORK 338 -#define T_DISCONNECT 339 -#define T_CONNECT 340 -#define T_SLEEP 341 -#define T_COMPOSE 342 -#define T_DOWN 343 -#define T_START 344 -#define T_STOP 345 -#define T_STOPPED 346 -#define T_KILL 347 -#define T_INJECT 348 -#define T_STATE 349 -#define T_ASSIGNED_STATE 350 -#define T_IN 351 -#define T_GROUP 352 -#define T_LBRACE 353 -#define T_RBRACE 354 -#define T_COMMA 355 -#define T_POSTGRES 356 -#define T_STAYS 357 -#define T_WHILE 358 -#define T_THROUGH 359 -#define T_SET 360 -#define T_LOGS 361 -#define T_NOT 362 -#define T_CONTAINS 363 -#define T_MATCHES 364 -#define T_INTEGER 365 -#define T_IDENT 366 -#define T_STRING 367 -#define T_BLOCK 368 -#define T_SHELL_ARGS 369 +#define T_REGION 300 +#define T_FS_INIT 301 +#define T_FS_SINGLE 302 +#define T_FS_PRIMARY 303 +#define T_FS_WAIT_PRIMARY 304 +#define T_FS_WAIT_STANDBY 305 +#define T_FS_DEMOTED 306 +#define T_FS_DEMOTE_TIMEOUT 307 +#define T_FS_DRAINING 308 +#define T_FS_SECONDARY 309 +#define T_FS_CATCHINGUP 310 +#define T_FS_PREP_PROMOTION 311 +#define T_FS_STOP_REPLICATION 312 +#define T_FS_MAINTENANCE 313 +#define T_FS_JOIN_PRIMARY 314 +#define T_FS_APPLY_SETTINGS 315 +#define T_FS_PREPARE_MAINTENANCE 316 +#define T_FS_WAIT_MAINTENANCE 317 +#define T_FS_REPORT_LSN 318 +#define T_FS_FAST_FORWARD 319 +#define T_FS_JOIN_SECONDARY 320 +#define T_FS_DROPPED 321 +#define T_EXEC 322 +#define T_EXEC_FAILS 323 +#define T_RUN 324 +#define T_PG_AUTOCTL 325 +#define T_WAIT 326 +#define T_UNTIL 327 +#define T_TIMEOUT 328 +#define T_AND 329 +#define T_IS 330 +#define T_WITH 331 +#define T_ASSERT 332 +#define T_SQL 333 +#define T_EXPECT 334 +#define T_ERROR 335 +#define T_PROMOTE 336 +#define T_PERFORM 337 +#define T_FAILOVER 338 +#define T_NETWORK 339 +#define T_DISCONNECT 340 +#define T_CONNECT 341 +#define T_SLEEP 342 +#define T_COMPOSE 343 +#define T_DOWN 344 +#define T_START 345 +#define T_STOP 346 +#define T_STOPPED 347 +#define T_KILL 348 +#define T_INJECT 349 +#define T_STATE 350 +#define T_ASSIGNED_STATE 351 +#define T_IN 352 +#define T_GROUP 353 +#define T_LBRACE 354 +#define T_RBRACE 355 +#define T_COMMA 356 +#define T_POSTGRES 357 +#define T_STAYS 358 +#define T_WHILE 359 +#define T_THROUGH 360 +#define T_SET 361 +#define T_LOGS 362 +#define T_NOT 363 +#define T_CONTAINS 364 +#define T_MATCHES 365 +#define T_INTEGER 366 +#define T_IDENT 367 +#define T_STRING 368 +#define T_BLOCK 369 +#define T_SHELL_ARGS 370 @@ -280,7 +282,7 @@ typedef union YYSTYPE TestCmd *cmd; } /* Line 1529 of yacc.c. */ -#line 284 "test_spec_parse.h" +#line 286 "test_spec_parse.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 diff --git a/src/bin/pgaftest/test_spec_parse.y b/src/bin/pgaftest/test_spec_parse.y index 63ae9f3c0..325b8fe88 100644 --- a/src/bin/pgaftest/test_spec_parse.y +++ b/src/bin/pgaftest/test_spec_parse.y @@ -160,7 +160,7 @@ static TestNode *current_node = NULL; %token T_LAUNCH T_CREATE T_DEFERRED T_IMMEDIATE T_FALSE T_TRUE T_INITIALLY T_VOLUME %token T_LISTEN T_CITUS_SECONDARY T_CANDIDATE_PRIORITY T_PORT T_PASSWORD T_MONITOR_PASSWORD %token T_CITUS_CLUSTER_NAME T_DEBIAN_CLUSTER T_REPLICATION_QUORUM T_REPLICATION_PASSWORD -%token T_EXTENSION_VERSION T_BIND_SOURCE T_LEGACY_STARTUP +%token T_EXTENSION_VERSION T_BIND_SOURCE T_LEGACY_STARTUP T_REGION /* ---- FSM state tokens (used in CLUSTER_BODY and STEP_BODY) ---- */ %token T_FS_INIT T_FS_SINGLE T_FS_PRIMARY @@ -559,6 +559,16 @@ node_opt: { current_node->candidatePriority = $2; } + | T_REGION T_IDENT + { + strlcpy(current_node->region, $2, sizeof(current_node->region)); + free($2); + } + | T_REGION T_STRING + { + strlcpy(current_node->region, $2, sizeof(current_node->region)); + free($2); + } | T_GROUP T_INTEGER { current_node->group = $2; diff --git a/src/bin/pgaftest/test_spec_scan.c b/src/bin/pgaftest/test_spec_scan.c index 91164fd4f..4b30ba1f4 100644 --- a/src/bin/pgaftest/test_spec_scan.c +++ b/src/bin/pgaftest/test_spec_scan.c @@ -356,8 +356,8 @@ static void yynoreturn yy_fatal_error ( const char* msg ); (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 156 -#define YY_END_OF_BUFFER 157 +#define YY_NUM_RULES 157 +#define YY_END_OF_BUFFER 158 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -365,143 +365,143 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[1225] = +static const flex_int16_t yy_accept[1229] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 157, 18, 17, 16, 18, 1, 12, 11, 13, 13, - 13, 13, 13, 13, 15, 156, 21, 20, 156, 19, - 60, 59, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 62, 63, 100, 99, 156, 98, 134, 146, 133, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 148, - 149, 152, 151, 153, 154, 155, 17, 0, 14, 1, + 158, 18, 17, 16, 18, 1, 12, 11, 13, 13, + 13, 13, 13, 13, 15, 157, 21, 20, 157, 19, + 61, 60, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 63, 64, 101, 100, 157, 99, 135, 147, 134, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 149, + 150, 153, 152, 154, 155, 156, 17, 0, 14, 1, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, - 21, 0, 61, 19, 60, 60, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 100, 0, 147, 98, 146, 146, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 125, 131, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 152, 151, 154, 13, 13, 13, 13, 13, 13, - - 13, 13, 43, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 25, 97, 97, 97, 97, 97, 130, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 143, 150, 150, 150, 150, 150, - 150, 150, 150, 103, 150, 140, 150, 150, 109, 150, - 150, 150, 150, 150, 150, 150, 150, 13, 13, 13, - - 4, 13, 13, 9, 13, 97, 97, 27, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 64, 97, 97, 97, - 97, 97, 97, 97, 30, 97, 97, 51, 97, 97, - 97, 97, 97, 97, 97, 42, 97, 97, 97, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 120, - 150, 150, 150, 102, 150, 150, 150, 150, 150, 64, - 150, 150, 124, 142, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 122, 150, 150, 150, 105, 150, 132, 13, 13, - - 13, 13, 7, 13, 97, 33, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 41, - 97, 97, 97, 50, 24, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 111, 150, 150, 150, 150, 150, 150, 129, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 118, 121, 126, 136, - 150, 150, 150, 150, 150, 106, 150, 150, 137, 13, - - 13, 13, 13, 13, 97, 97, 97, 97, 97, 97, - 97, 97, 38, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 37, - 97, 47, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 65, 97, 97, 97, 46, 97, 97, 97, - 97, 97, 97, 32, 150, 150, 108, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 110, 150, - 150, 150, 150, 141, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 65, 150, 150, 150, 150, 150, 150, 150, 150, 150, - - 150, 150, 13, 13, 2, 3, 13, 13, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 71, 97, 96, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 22, 97, 97, - 97, 97, 66, 97, 97, 97, 97, 97, 97, 45, - 97, 97, 97, 97, 97, 97, 150, 150, 150, 150, - 150, 119, 117, 150, 150, 150, 71, 150, 150, 96, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 145, 115, 150, 113, 150, 150, 150, 66, 112, 150, - 150, 150, 150, 150, 123, 139, 107, 150, 150, 150, - - 150, 150, 150, 13, 13, 10, 8, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 39, 97, 97, - 74, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 29, 35, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 150, 150, 150, 150, 150, 144, 150, 150, - 150, 74, 150, 114, 150, 150, 150, 150, 150, 150, - 150, 150, 0, 150, 135, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 13, 13, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - - 97, 97, 97, 97, 97, 28, 97, 40, 44, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 75, 97, 97, 97, 97, 97, - 97, 97, 97, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 28, 150, 150, 150, 150, 150, - 0, 150, 150, 150, 150, 150, 150, 150, 75, 150, - 150, 150, 150, 150, 150, 150, 150, 13, 13, 97, - 97, 97, 97, 97, 76, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 34, 97, 97, 97, 97, 97, 91, 90, - - 97, 97, 97, 97, 97, 97, 97, 97, 150, 150, - 150, 150, 76, 150, 150, 116, 101, 150, 150, 150, - 150, 150, 150, 150, 0, 104, 150, 150, 150, 150, - 91, 90, 150, 150, 150, 150, 150, 150, 150, 150, - 13, 13, 97, 97, 26, 57, 97, 97, 97, 31, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 81, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 81, - 0, 150, 150, 150, 150, 150, 150, 150, 150, 150, - - 150, 150, 150, 13, 6, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 93, 92, 23, 83, 97, 82, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 68, 70, 97, 67, 69, 150, 150, 150, 150, - 150, 150, 93, 92, 83, 150, 82, 150, 0, 150, - 150, 150, 150, 150, 150, 150, 68, 70, 150, 67, - 69, 13, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 150, 150, 150, 150, 150, - 150, 150, 150, 0, 150, 150, 150, 150, 150, 150, - - 150, 150, 13, 85, 84, 97, 97, 97, 53, 73, - 72, 97, 95, 94, 58, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 85, 84, 127, 150, - 73, 72, 95, 94, 0, 150, 150, 150, 150, 150, - 150, 150, 150, 13, 97, 97, 48, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 150, - 138, 150, 150, 150, 150, 150, 150, 150, 150, 13, - 97, 97, 97, 36, 97, 97, 97, 97, 97, 97, - 80, 79, 89, 88, 150, 150, 150, 150, 150, 80, - 79, 89, 88, 5, 97, 97, 56, 97, 78, 97, - - 77, 97, 97, 150, 150, 78, 150, 77, 49, 52, - 97, 97, 97, 54, 128, 150, 150, 87, 86, 97, - 87, 86, 55, 0 + 21, 0, 62, 19, 61, 61, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 101, 0, 148, 99, 147, 147, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 126, 132, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 153, 152, 155, 13, 13, 13, 13, 13, 13, + + 13, 13, 43, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 25, 98, 98, 98, 98, 98, 131, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 144, 151, 151, 151, 151, + 151, 151, 151, 151, 104, 151, 141, 151, 151, 110, + 151, 151, 151, 151, 151, 151, 151, 151, 13, 13, + + 13, 4, 13, 13, 9, 13, 98, 98, 27, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 65, 98, 98, + 98, 98, 98, 98, 98, 30, 98, 98, 52, 98, + 98, 98, 98, 98, 98, 98, 98, 42, 98, 98, + 98, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 121, 151, 151, 151, 103, 151, 151, 151, 151, + 151, 65, 151, 151, 125, 143, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 123, 151, 151, 151, 106, 151, 133, + + 13, 13, 13, 13, 7, 13, 98, 33, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 41, 98, 98, 98, 51, 24, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 112, 151, 151, 151, 151, + 151, 151, 130, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 119, + 122, 127, 137, 151, 151, 151, 151, 151, 107, 151, + + 151, 138, 13, 13, 13, 13, 13, 98, 98, 98, + 98, 98, 98, 98, 98, 38, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 37, 98, 47, 98, 98, 98, 98, 98, + 98, 98, 50, 98, 98, 98, 66, 98, 98, 98, + 46, 98, 98, 98, 98, 98, 98, 32, 151, 151, + 109, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 111, 151, 151, 151, 151, 142, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 66, 151, 151, 151, 151, 151, + + 151, 151, 151, 151, 151, 151, 13, 13, 2, 3, + 13, 13, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 72, 98, 97, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 22, 98, 98, 98, 98, 67, 98, 98, 98, + 98, 98, 98, 45, 98, 98, 98, 98, 98, 98, + 151, 151, 151, 151, 151, 120, 118, 151, 151, 151, + 72, 151, 151, 97, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 146, 116, 151, 114, 151, 151, + 151, 67, 113, 151, 151, 151, 151, 151, 124, 140, + + 108, 151, 151, 151, 151, 151, 151, 13, 13, 10, + 8, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 39, 98, 98, 75, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 29, 35, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 151, 151, 151, 151, + 151, 145, 151, 151, 151, 75, 151, 115, 151, 151, + 151, 151, 151, 151, 151, 151, 0, 151, 136, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 13, 13, 98, 98, 98, 98, 98, 98, + + 98, 98, 98, 98, 98, 98, 98, 98, 98, 28, + 98, 40, 44, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 76, 98, + 98, 98, 98, 98, 98, 98, 98, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 28, 151, + 151, 151, 151, 151, 0, 151, 151, 151, 151, 151, + 151, 151, 76, 151, 151, 151, 151, 151, 151, 151, + 151, 13, 13, 98, 98, 98, 98, 98, 77, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 34, 98, 98, 98, + + 98, 98, 92, 91, 98, 98, 98, 98, 98, 98, + 98, 98, 151, 151, 151, 151, 77, 151, 151, 117, + 102, 151, 151, 151, 151, 151, 151, 151, 0, 105, + 151, 151, 151, 151, 92, 91, 151, 151, 151, 151, + 151, 151, 151, 151, 13, 13, 98, 98, 26, 58, + 98, 98, 98, 31, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 82, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 82, 0, 151, 151, 151, 151, 151, + + 151, 151, 151, 151, 151, 151, 151, 13, 6, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 94, 93, + 23, 84, 98, 83, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 69, 71, 98, 68, 70, + 151, 151, 151, 151, 151, 151, 94, 93, 84, 151, + 83, 151, 0, 151, 151, 151, 151, 151, 151, 151, + 69, 71, 151, 68, 70, 13, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 151, + 151, 151, 151, 151, 151, 151, 151, 0, 151, 151, + + 151, 151, 151, 151, 151, 151, 13, 86, 85, 98, + 98, 98, 54, 74, 73, 98, 96, 95, 59, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 86, 85, 128, 151, 74, 73, 96, 95, 0, 151, + 151, 151, 151, 151, 151, 151, 151, 13, 98, 98, + 48, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 151, 139, 151, 151, 151, 151, 151, + 151, 151, 151, 13, 98, 98, 98, 36, 98, 98, + 98, 98, 98, 98, 81, 80, 90, 89, 151, 151, + 151, 151, 151, 81, 80, 90, 89, 5, 98, 98, + + 57, 98, 79, 98, 78, 98, 98, 151, 151, 79, + 151, 78, 49, 53, 98, 98, 98, 55, 129, 151, + 151, 88, 87, 98, 88, 87, 56, 0 } ; static const YY_CHAR yy_ec[256] = @@ -544,287 +544,289 @@ static const YY_CHAR yy_meta[41] = 4, 4, 4, 4, 4, 4, 4, 4, 1, 1 } ; -static const flex_int16_t yy_base[1238] = +static const flex_int16_t yy_base[1242] = { 0, - 0, 0, 40, 0, 80, 0, 119, 121, 1317, 1316, - 1318, 1321, 123, 1321, 1312, 0, 117, 1321, 0, 106, - 1288, 1287, 112, 1296, 1321, 1321, 130, 1321, 1308, 0, - 124, 1321, 0, 108, 1290, 124, 123, 1274, 125, 1279, - 117, 1281, 143, 134, 130, 145, 1290, 145, 1276, 1278, - 146, 1321, 1321, 164, 1321, 1300, 0, 1321, 138, 1321, - 0, 152, 155, 164, 154, 161, 1273, 161, 1275, 1280, - 1273, 1286, 162, 180, 153, 179, 181, 1272, 185, 1321, - 1321, 0, 1296, 1321, 0, 1321, 211, 1292, 1321, 0, - 205, 1321, 0, 1263, 1261, 1267, 1276, 186, 1274, 1277, - - 216, 1285, 1321, 0, 212, 1321, 0, 1272, 1259, 1249, - 1253, 1258, 195, 1251, 1255, 1264, 208, 182, 1248, 200, - 1249, 1251, 212, 1256, 1255, 1242, 1255, 1242, 1251, 1245, - 222, 1245, 1238, 1238, 211, 1239, 1251, 1239, 1240, 1236, - 1229, 1237, 1239, 1229, 238, 1254, 1321, 0, 234, 1321, - 0, 1241, 1228, 1224, 208, 221, 1229, 1222, 1217, 217, - 1221, 231, 229, 1220, 1222, 230, 0, 1227, 1223, 1227, - 232, 1213, 1212, 1212, 1212, 1229, 1209, 240, 1211, 1212, - 234, 1211, 1219, 1211, 241, 1204, 1208, 1200, 1210, 1209, - 1197, 0, 1227, 0, 1194, 1195, 1204, 1207, 1190, 1189, - - 1193, 1190, 0, 1195, 1192, 1197, 1200, 1199, 1199, 1180, - 1182, 1198, 1189, 1192, 1181, 1186, 1178, 1188, 1173, 1171, - 1177, 1168, 1181, 1182, 1166, 1171, 1170, 1182, 1162, 1167, - 1171, 1166, 1173, 1182, 1157, 1155, 1158, 1160, 231, 1157, - 1164, 0, 1154, 1164, 1147, 1147, 1155, 0, 1153, 252, - 1160, 1160, 1146, 230, 1146, 1157, 1145, 1149, 1141, 1141, - 1152, 1149, 1141, 1132, 1138, 1129, 1129, 1143, 1133, 1134, - 1126, 1130, 1140, 1119, 0, 1122, 1134, 1138, 1118, 1121, - 1123, 1122, 1119, 0, 1118, 0, 1125, 1126, 0, 240, - 1114, 1114, 1123, 1118, 1106, 1113, 1116, 1104, 1102, 1101, - - 0, 1115, 1103, 0, 1114, 1092, 1113, 1120, 1119, 1104, - 1104, 1092, 1106, 1089, 1107, 1089, 1086, 1091, 1088, 1089, - 1097, 264, 1100, 1084, 1094, 1094, 1088, 267, 1093, 1092, - 1089, 1073, 1072, 1076, 0, 1071, 1066, 0, 1087, 1086, - 1077, 1067, 1070, 1071, 268, 0, 1069, 271, 1076, 1055, - 1061, 1071, 1068, 1068, 1060, 1069, 1072, 1052, 1056, 0, - 1056, 1053, 1050, 1072, 1063, 1050, 274, 1063, 1047, 0, - 1059, 275, 0, 0, 1041, 1052, 1044, 1049, 1042, 1035, - 1048, 1053, 1052, 1037, 1033, 1036, 1037, 1032, 1027, 1041, - 1026, 277, 1023, 1028, 1030, 278, 1036, 0, 1045, 1034, - - 1023, 1023, 0, 1021, 281, 0, 1022, 1015, 1029, 1023, - 1036, 1021, 1024, 1014, 1009, 1021, 1016, 1019, 1004, 0, - 1016, 1015, 1000, 0, 1024, 1009, 1016, 263, 264, 1008, - 990, 1000, 1008, 997, 997, 985, 994, 990, 989, 1003, - 985, 1000, 998, 984, 983, 995, 994, 272, 273, 980, - 295, 977, 982, 991, 985, 974, 989, 982, 985, 975, - 979, 982, 0, 980, 965, 962, 977, 976, 961, 0, - 960, 278, 280, 974, 973, 959, 962, 957, 954, 955, - 954, 953, 950, 949, 964, 962, 0, 0, 0, 0, - 948, 947, 959, 956, 941, 0, 285, 287, 0, 284, - - 943, 942, 956, 935, 938, 937, 950, 939, 952, 938, - 299, 937, 0, 955, 944, 310, 934, 943, 937, 930, - 929, 934, 922, 940, 928, 921, 933, 919, 931, 0, - 940, 0, 920, 915, 923, 917, 912, 924, 903, 926, - 313, 925, 0, 920, 919, 919, 0, 921, 903, 900, - 918, 900, 897, 0, 897, 896, 0, 909, 912, 898, - 906, 890, 895, 316, 894, 893, 902, 904, 0, 899, - 888, 887, 892, 0, 882, 894, 880, 892, 882, 876, - 883, 886, 879, 876, 885, 884, 863, 882, 317, 885, - 0, 880, 879, 879, 874, 861, 879, 861, 858, 876, - - 858, 855, 859, 858, 0, 0, 867, 857, 865, 864, - 848, 846, 846, 858, 852, 858, 861, 858, 856, 839, - 838, 0, 850, 0, 841, 837, 836, 838, 851, 831, - 838, 840, 845, 838, 843, 826, 843, 848, 822, 838, - 836, 324, 0, 819, 826, 825, 818, 819, 818, 0, - 824, 823, 830, 821, 820, 827, 822, 821, 821, 804, - 816, 0, 0, 803, 801, 800, 0, 814, 811, 0, - 808, 798, 797, 796, 798, 803, 807, 797, 802, 137, - 0, 0, 332, 0, 156, 173, 330, 0, 0, 211, - 239, 291, 299, 310, 0, 0, 0, 318, 319, 328, - - 322, 323, 332, 319, 317, 0, 0, 316, 317, 330, - 321, 335, 320, 321, 340, 324, 333, 0, 337, 338, - 0, 334, 326, 327, 337, 334, 348, 329, 342, 341, - 344, 343, 339, 346, 345, 347, 0, 0, 350, 351, - 356, 349, 350, 345, 359, 360, 359, 361, 361, 362, - 364, 364, 359, 360, 386, 377, 362, 0, 375, 376, - 383, 0, 375, 0, 365, 366, 376, 378, 377, 380, - 379, 381, 407, 379, 0, 387, 388, 383, 386, 381, - 395, 396, 395, 397, 397, 398, 400, 400, 397, 405, - 397, 398, 404, 417, 426, 406, 404, 409, 410, 405, - - 415, 416, 435, 430, 431, 0, 426, 0, 0, 433, - 421, 435, 423, 437, 436, 439, 423, 441, 425, 443, - 427, 431, 433, 434, 0, 440, 441, 431, 451, 449, - 434, 454, 452, 437, 438, 440, 465, 445, 449, 450, - 444, 446, 465, 466, 0, 467, 455, 469, 457, 469, - 465, 462, 474, 458, 476, 460, 465, 466, 0, 472, - 473, 463, 483, 481, 466, 486, 484, 485, 485, 482, - 483, 489, 489, 479, 0, 476, 483, 480, 480, 495, - 496, 480, 485, 486, 500, 488, 503, 490, 505, 492, - 506, 493, 0, 504, 499, 506, 501, 503, 0, 0, - - 515, 516, 515, 503, 520, 518, 506, 523, 517, 518, - 508, 513, 0, 525, 526, 0, 0, 514, 515, 516, - 531, 518, 533, 533, 521, 0, 531, 526, 533, 528, - 0, 0, 541, 542, 541, 529, 546, 544, 532, 549, - 543, 535, 540, 541, 0, 0, 538, 552, 554, 0, - 539, 545, 546, 557, 559, 560, 545, 541, 566, 543, - 568, 550, 0, 552, 558, 560, 560, 562, 581, 576, - 577, 565, 555, 556, 568, 558, 559, 571, 572, 586, - 570, 574, 575, 587, 588, 568, 593, 570, 595, 0, - 582, 584, 586, 586, 588, 601, 602, 590, 580, 581, - - 593, 583, 584, 596, 0, 604, 605, 604, 596, 614, - 611, 596, 597, 601, 0, 0, 0, 0, 602, 0, - 603, 601, 600, 604, 610, 606, 612, 612, 610, 611, - 631, 0, 0, 632, 0, 0, 627, 628, 616, 628, - 617, 618, 0, 0, 0, 622, 0, 623, 621, 623, - 629, 625, 631, 627, 628, 648, 0, 0, 649, 0, - 0, 650, 633, 634, 639, 660, 638, 639, 638, 639, - 641, 636, 637, 647, 649, 660, 646, 662, 648, 668, - 649, 662, 663, 659, 660, 656, 657, 672, 663, 659, - 660, 656, 657, 676, 679, 665, 681, 667, 679, 680, - - 676, 677, 672, 0, 0, 675, 680, 670, 0, 0, - 0, 687, 0, 0, 0, 679, 684, 690, 686, 692, - 683, 688, 689, 690, 703, 704, 0, 0, 0, 690, - 0, 0, 0, 0, 701, 696, 702, 698, 704, 699, - 700, 713, 714, 703, 710, 719, 0, 706, 718, 722, - 709, 724, 711, 708, 710, 715, 716, 726, 727, 724, - 1321, 733, 720, 735, 722, 724, 725, 735, 736, 724, - 723, 731, 731, 0, 732, 733, 734, 735, 727, 730, - 0, 0, 0, 0, 732, 739, 740, 741, 742, 0, - 0, 0, 0, 0, 732, 753, 0, 756, 0, 757, - - 0, 746, 749, 738, 761, 0, 762, 0, 0, 0, - 761, 762, 750, 0, 0, 764, 765, 0, 0, 767, - 0, 0, 0, 1321, 784, 788, 792, 796, 795, 800, - 804, 803, 808, 812, 811, 816, 820 + 0, 0, 40, 0, 80, 0, 119, 121, 1321, 1320, + 1322, 1325, 123, 1325, 1316, 0, 117, 1325, 0, 106, + 1292, 1291, 112, 1300, 1325, 1325, 130, 1325, 1312, 0, + 124, 1325, 0, 108, 1294, 124, 123, 1278, 125, 1283, + 117, 1285, 143, 134, 130, 145, 1294, 145, 1280, 1282, + 146, 1325, 1325, 164, 1325, 1304, 0, 1325, 138, 1325, + 0, 152, 155, 164, 154, 161, 1277, 161, 1279, 1284, + 1277, 1290, 162, 180, 153, 179, 181, 1276, 185, 1325, + 1325, 0, 1300, 1325, 0, 1325, 211, 1296, 1325, 0, + 205, 1325, 0, 1267, 1265, 1271, 1280, 186, 1278, 1281, + + 216, 1289, 1325, 0, 212, 1325, 0, 1276, 1263, 1253, + 1257, 1262, 195, 1255, 1259, 1268, 208, 182, 1252, 200, + 1253, 1255, 212, 1260, 1259, 1246, 1259, 1246, 1255, 1249, + 222, 1249, 1242, 1242, 211, 211, 1256, 1244, 1245, 1241, + 1234, 1242, 1244, 1234, 239, 1259, 1325, 0, 233, 1325, + 0, 1246, 1233, 1229, 219, 209, 1234, 1227, 1222, 233, + 1226, 230, 228, 1225, 1227, 231, 0, 1232, 1228, 1232, + 229, 1218, 1217, 1217, 1217, 1234, 1214, 245, 1216, 1217, + 233, 1216, 1224, 1216, 241, 1209, 1213, 1205, 1215, 1214, + 1202, 0, 1232, 0, 1199, 1200, 1209, 1212, 1195, 1194, + + 1198, 1195, 0, 1200, 1197, 1202, 1205, 1204, 1204, 1185, + 1187, 1203, 1194, 1197, 1186, 1191, 1183, 1193, 1178, 1176, + 1182, 1173, 1186, 1187, 1171, 1176, 1175, 1187, 1167, 1172, + 1176, 1171, 1178, 1187, 1162, 1160, 1163, 1165, 1168, 243, + 1161, 1168, 0, 1158, 1168, 1151, 1151, 1159, 0, 1157, + 252, 1164, 1164, 1150, 231, 1150, 1161, 1149, 1153, 1145, + 1145, 1156, 1153, 1145, 1136, 1142, 1133, 1133, 1147, 1137, + 1138, 1130, 1134, 1144, 1123, 0, 1126, 1138, 1142, 1122, + 1125, 1127, 1126, 1123, 0, 1122, 0, 1129, 1130, 0, + 244, 1118, 1118, 1127, 1122, 1110, 1117, 1120, 1108, 1106, + + 1105, 0, 1119, 1107, 0, 1118, 1096, 1117, 1124, 1123, + 1108, 1108, 1096, 1110, 1093, 1111, 1093, 1090, 1095, 1092, + 1093, 1101, 268, 1104, 1088, 1098, 1098, 1092, 270, 1097, + 1096, 1093, 1077, 1076, 1080, 0, 1075, 1070, 0, 1091, + 1090, 1075, 1080, 1070, 1073, 1074, 271, 0, 1072, 272, + 1079, 1058, 1064, 1074, 1071, 1071, 1063, 1072, 1075, 1055, + 1059, 0, 1059, 1056, 1053, 1075, 1066, 1053, 278, 1066, + 1050, 0, 1062, 279, 0, 0, 1044, 1055, 1047, 1052, + 1045, 1038, 1051, 1056, 1055, 1040, 1036, 1039, 1040, 1035, + 1030, 1044, 1029, 280, 1026, 1031, 1033, 281, 1039, 0, + + 1048, 1037, 1026, 1026, 0, 1024, 282, 0, 1025, 1018, + 1032, 1026, 1039, 1024, 1027, 1017, 1012, 1024, 1019, 1022, + 1007, 0, 1019, 1018, 1003, 0, 1027, 1012, 1019, 267, + 269, 1011, 993, 1003, 1011, 1000, 1000, 988, 997, 993, + 992, 995, 1005, 987, 1002, 1000, 986, 985, 997, 996, + 276, 278, 982, 298, 979, 984, 993, 987, 976, 991, + 984, 987, 977, 981, 984, 0, 982, 967, 964, 979, + 978, 963, 0, 962, 283, 284, 976, 975, 961, 964, + 959, 956, 957, 956, 955, 952, 951, 966, 964, 0, + 0, 0, 0, 950, 949, 961, 958, 943, 0, 288, + + 292, 0, 287, 945, 944, 958, 937, 940, 939, 952, + 941, 954, 940, 240, 939, 0, 957, 946, 314, 936, + 945, 939, 932, 931, 936, 924, 942, 930, 923, 935, + 921, 933, 0, 942, 0, 922, 917, 925, 919, 914, + 926, 905, 0, 928, 317, 927, 0, 922, 921, 921, + 0, 923, 905, 902, 920, 902, 899, 0, 899, 898, + 0, 911, 914, 900, 908, 892, 897, 320, 896, 895, + 904, 906, 0, 901, 890, 889, 894, 0, 884, 896, + 882, 894, 884, 878, 885, 888, 881, 878, 887, 886, + 865, 884, 321, 887, 0, 882, 881, 881, 876, 863, + + 881, 863, 860, 878, 860, 857, 861, 860, 0, 0, + 869, 859, 867, 866, 850, 848, 848, 860, 854, 860, + 863, 860, 858, 841, 840, 0, 852, 0, 843, 839, + 838, 840, 853, 833, 840, 842, 847, 840, 845, 828, + 845, 850, 824, 840, 838, 327, 0, 821, 828, 827, + 820, 821, 820, 0, 826, 825, 832, 823, 822, 829, + 824, 823, 823, 806, 818, 0, 0, 805, 803, 802, + 0, 816, 813, 0, 810, 800, 799, 798, 799, 801, + 806, 129, 156, 191, 0, 0, 339, 0, 241, 265, + 331, 0, 0, 294, 301, 301, 307, 309, 0, 0, + + 0, 323, 324, 333, 326, 327, 336, 323, 321, 0, + 0, 320, 321, 334, 325, 339, 324, 325, 344, 328, + 337, 0, 341, 342, 0, 338, 330, 331, 341, 338, + 352, 333, 346, 345, 348, 347, 343, 350, 349, 351, + 0, 0, 354, 355, 360, 353, 354, 349, 363, 364, + 363, 365, 365, 366, 368, 368, 363, 364, 390, 381, + 366, 0, 379, 380, 387, 0, 379, 0, 369, 370, + 380, 382, 381, 384, 383, 385, 411, 383, 0, 391, + 392, 387, 390, 385, 399, 400, 399, 401, 401, 402, + 404, 404, 401, 409, 401, 402, 408, 421, 430, 410, + + 408, 413, 414, 409, 419, 420, 439, 434, 435, 0, + 430, 0, 0, 437, 425, 439, 427, 441, 440, 443, + 427, 445, 429, 447, 431, 435, 437, 438, 0, 444, + 445, 435, 455, 453, 438, 458, 456, 441, 442, 444, + 469, 449, 453, 454, 448, 450, 469, 470, 0, 471, + 459, 473, 461, 473, 469, 466, 478, 462, 480, 464, + 469, 470, 0, 476, 477, 467, 487, 485, 470, 490, + 488, 489, 489, 486, 487, 493, 493, 483, 0, 480, + 487, 484, 484, 499, 500, 484, 489, 490, 504, 492, + 507, 494, 509, 496, 510, 497, 0, 508, 503, 510, + + 505, 507, 0, 0, 519, 520, 519, 507, 524, 522, + 510, 527, 521, 522, 512, 517, 0, 529, 530, 0, + 0, 518, 519, 520, 535, 522, 537, 537, 525, 0, + 535, 530, 537, 532, 0, 0, 545, 546, 545, 533, + 550, 548, 536, 553, 547, 539, 544, 545, 0, 0, + 542, 556, 558, 0, 543, 549, 550, 561, 563, 564, + 549, 545, 570, 547, 572, 554, 0, 556, 562, 564, + 564, 566, 585, 580, 581, 569, 559, 560, 572, 562, + 563, 575, 576, 590, 574, 578, 579, 591, 592, 572, + 597, 574, 599, 0, 586, 588, 590, 590, 592, 605, + + 606, 594, 584, 585, 597, 587, 588, 600, 0, 608, + 609, 608, 600, 618, 615, 600, 601, 605, 0, 0, + 0, 0, 606, 0, 607, 605, 604, 608, 614, 610, + 616, 616, 614, 615, 635, 0, 0, 636, 0, 0, + 631, 632, 620, 632, 621, 622, 0, 0, 0, 626, + 0, 627, 625, 627, 633, 629, 635, 631, 632, 652, + 0, 0, 653, 0, 0, 654, 637, 638, 643, 664, + 642, 643, 642, 643, 645, 640, 641, 651, 653, 664, + 650, 666, 652, 672, 653, 666, 667, 663, 664, 660, + 661, 676, 667, 663, 664, 660, 661, 680, 683, 669, + + 685, 671, 683, 684, 680, 681, 676, 0, 0, 679, + 684, 674, 0, 0, 0, 691, 0, 0, 0, 683, + 688, 694, 690, 696, 687, 692, 693, 694, 707, 708, + 0, 0, 0, 694, 0, 0, 0, 0, 705, 700, + 706, 702, 708, 703, 704, 717, 718, 707, 714, 723, + 0, 710, 722, 726, 713, 728, 715, 712, 714, 719, + 720, 730, 731, 728, 1325, 737, 724, 739, 726, 728, + 729, 739, 740, 728, 727, 735, 735, 0, 736, 737, + 738, 739, 731, 734, 0, 0, 0, 0, 736, 743, + 744, 745, 746, 0, 0, 0, 0, 0, 736, 757, + + 0, 760, 0, 761, 0, 750, 753, 742, 765, 0, + 766, 0, 0, 0, 765, 766, 754, 0, 0, 768, + 769, 0, 0, 771, 0, 0, 0, 1325, 788, 792, + 796, 800, 799, 804, 808, 807, 812, 816, 815, 820, + 824 } ; -static const flex_int16_t yy_def[1238] = +static const flex_int16_t yy_def[1242] = { 0, - 1224, 1, 1224, 3, 1224, 5, 1225, 1225, 1226, 1226, - 1224, 1224, 1224, 1224, 1227, 1228, 1224, 1224, 1229, 1229, - 1229, 1229, 1229, 1229, 1224, 1224, 1224, 1224, 1230, 1231, - 1224, 1224, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1224, 1224, 1224, 1224, 1233, 1234, 1224, 1224, 1224, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1224, - 1224, 1236, 1224, 1224, 1237, 1224, 1224, 1227, 1224, 1228, - 1224, 1224, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, - - 1224, 1230, 1224, 1231, 1224, 1224, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1224, 1233, 1224, 1234, 1224, 1224, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1236, 1224, 1237, 1229, 1229, 1229, 1229, 1229, 1229, - - 1229, 1229, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1229, 1229, 1229, - - 1229, 1229, 1229, 1229, 1229, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1229, 1229, - - 1229, 1229, 1229, 1229, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1229, - - 1229, 1229, 1229, 1229, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - - 1235, 1235, 1229, 1229, 1229, 1229, 1229, 1229, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - - 1235, 1235, 1235, 1229, 1229, 1229, 1229, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1224, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1229, 1229, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1224, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1229, 1229, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1224, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1229, 1229, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1224, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - - 1235, 1235, 1235, 1229, 1229, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1224, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1229, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1224, 1235, 1235, 1235, 1235, 1235, 1235, - - 1235, 1235, 1229, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1224, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1229, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1235, - 1224, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1229, - 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232, - 1232, 1232, 1232, 1232, 1235, 1235, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1229, 1232, 1232, 1232, 1232, 1232, 1232, - - 1232, 1232, 1232, 1235, 1235, 1235, 1235, 1235, 1232, 1232, - 1232, 1232, 1232, 1232, 1235, 1235, 1235, 1232, 1232, 1232, - 1235, 1235, 1232, 0, 1224, 1224, 1224, 1224, 1224, 1224, - 1224, 1224, 1224, 1224, 1224, 1224, 1224 + 1228, 1, 1228, 3, 1228, 5, 1229, 1229, 1230, 1230, + 1228, 1228, 1228, 1228, 1231, 1232, 1228, 1228, 1233, 1233, + 1233, 1233, 1233, 1233, 1228, 1228, 1228, 1228, 1234, 1235, + 1228, 1228, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1228, 1228, 1228, 1228, 1237, 1238, 1228, 1228, 1228, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1228, + 1228, 1240, 1228, 1228, 1241, 1228, 1228, 1231, 1228, 1232, + 1228, 1228, 1233, 1233, 1233, 1233, 1233, 1233, 1233, 1233, + + 1228, 1234, 1228, 1235, 1228, 1228, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1228, 1237, 1228, 1238, 1228, 1228, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1240, 1228, 1241, 1233, 1233, 1233, 1233, 1233, 1233, + + 1233, 1233, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1233, 1233, + + 1233, 1233, 1233, 1233, 1233, 1233, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + + 1233, 1233, 1233, 1233, 1233, 1233, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + + 1239, 1239, 1233, 1233, 1233, 1233, 1233, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + + 1239, 1239, 1239, 1239, 1239, 1239, 1233, 1233, 1233, 1233, + 1233, 1233, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1233, 1233, 1233, + 1233, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1228, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1233, 1233, 1236, 1236, 1236, 1236, 1236, 1236, + + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1228, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1233, 1233, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1228, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1233, 1233, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1228, 1239, 1239, 1239, 1239, 1239, + + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1233, 1233, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1228, 1239, 1239, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1233, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1228, 1239, 1239, + + 1239, 1239, 1239, 1239, 1239, 1239, 1233, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1228, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1233, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1239, 1228, 1239, 1239, 1239, 1239, 1239, + 1239, 1239, 1239, 1233, 1236, 1236, 1236, 1236, 1236, 1236, + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1233, 1236, 1236, + + 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1239, 1239, 1239, + 1239, 1239, 1236, 1236, 1236, 1236, 1236, 1236, 1239, 1239, + 1239, 1236, 1236, 1236, 1239, 1239, 1236, 0, 1228, 1228, + 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, + 1228 } ; -static const flex_int16_t yy_nxt[1362] = +static const flex_int16_t yy_nxt[1366] = { 0, 12, 13, 14, 13, 15, 16, 12, 12, 17, 18, 19, 19, 19, 19, 19, 20, 19, 19, 19, 19, @@ -842,39 +844,39 @@ static const flex_int16_t yy_nxt[1362] = 83, 84, 83, 84, 87, 91, 87, 94, 92, 98, 95, 101, 105, 101, 108, 106, 109, 113, 120, 110, 117, 111, 123, 124, 99, 114, 149, 129, 92, 150, - 772, 115, 121, 118, 116, 106, 126, 131, 133, 143, + 774, 115, 121, 118, 116, 106, 126, 131, 133, 143, 127, 130, 137, 132, 128, 145, 138, 145, 155, 150, - 179, 774, 134, 144, 163, 135, 139, 140, 152, 172, + 179, 775, 134, 144, 163, 135, 139, 140, 152, 172, 153, 157, 156, 154, 161, 158, 180, 166, 164, 173, 162, 159, 167, 174, 160, 216, 181, 175, 189, 176, - 182, 186, 187, 183, 775, 190, 191, 177, 184, 217, + 182, 186, 187, 183, 776, 190, 191, 177, 184, 217, 178, 185, 87, 91, 87, 199, 92, 101, 200, 101, 105, 208, 213, 106, 219, 223, 214, 209, 237, 232, - 258, 220, 238, 215, 251, 778, 92, 224, 233, 145, - 252, 145, 149, 106, 259, 150, 253, 254, 261, 285, - 263, 267, 268, 272, 290, 341, 356, 280, 342, 262, - 264, 281, 357, 779, 273, 150, 286, 282, 291, 351, - 389, 421, 390, 352, 428, 444, 422, 391, 448, 429, - 445, 467, 472, 449, 491, 497, 468, 473, 505, 492, - 498, 526, 528, 506, 527, 529, 446, 548, 551, 603, - - 549, 552, 555, 550, 553, 493, 575, 556, 577, 576, - 597, 578, 600, 598, 615, 601, 599, 620, 602, 604, - 645, 780, 621, 665, 690, 646, 622, 781, 666, 691, - 616, 739, 667, 773, 773, 773, 740, 776, 782, 783, - 784, 785, 777, 786, 787, 788, 789, 790, 791, 792, + 239, 220, 238, 215, 254, 255, 92, 224, 233, 240, + 145, 149, 145, 106, 150, 252, 259, 262, 286, 264, + 273, 253, 268, 269, 291, 619, 778, 358, 263, 265, + 260, 274, 281, 359, 150, 287, 282, 343, 292, 353, + 344, 620, 283, 354, 391, 423, 392, 430, 447, 451, + 424, 393, 431, 448, 452, 470, 475, 494, 500, 508, + 471, 476, 495, 501, 509, 529, 779, 531, 530, 449, + + 532, 552, 607, 555, 553, 559, 556, 554, 496, 557, + 560, 579, 581, 601, 580, 582, 602, 604, 782, 603, + 605, 624, 608, 606, 649, 783, 625, 669, 694, 650, + 626, 784, 670, 695, 743, 785, 671, 786, 780, 744, + 777, 777, 777, 781, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, - 813, 814, 815, 816, 817, 818, 820, 822, 819, 821, - 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, + 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, + 824, 826, 823, 825, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, - 843, 844, 845, 846, 847, 848, 849, 850, 773, 773, - 773, 852, 853, 855, 857, 854, 856, 858, 859, 860, - 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, - 871, 872, 873, 874, 875, 876, 877, 878, 879, 851, - 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, + 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, + 853, 854, 777, 777, 777, 856, 857, 859, 861, 858, + 860, 862, 863, 864, 865, 866, 867, 868, 869, 870, + 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, + 881, 882, 883, 855, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, @@ -911,74 +913,74 @@ static const flex_int16_t yy_nxt[1362] = 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, - 1220, 1221, 1222, 1223, 82, 82, 82, 82, 85, 85, - 85, 85, 88, 88, 88, 88, 90, 90, 93, 90, - - 102, 102, 102, 102, 104, 104, 107, 104, 146, 146, - 146, 146, 148, 148, 151, 148, 192, 771, 770, 192, - 194, 194, 769, 194, 768, 767, 766, 765, 764, 763, - 762, 761, 760, 759, 758, 757, 756, 755, 754, 753, - 752, 751, 750, 749, 748, 747, 746, 745, 744, 743, - 742, 741, 738, 737, 736, 735, 734, 733, 732, 731, - 730, 729, 728, 727, 726, 725, 724, 723, 722, 721, - 720, 719, 718, 717, 716, 715, 714, 713, 712, 711, - 710, 709, 708, 707, 706, 705, 704, 703, 702, 701, - 700, 699, 698, 697, 696, 695, 694, 693, 692, 689, - - 688, 687, 686, 685, 684, 683, 682, 681, 680, 679, - 678, 677, 676, 675, 674, 673, 672, 671, 670, 669, - 668, 664, 663, 662, 661, 660, 659, 658, 657, 656, - 655, 654, 653, 652, 651, 650, 649, 648, 647, 644, - 643, 642, 641, 640, 639, 638, 637, 636, 635, 634, - 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, - 623, 619, 618, 617, 614, 613, 612, 611, 610, 609, - 608, 607, 606, 605, 596, 595, 594, 593, 592, 591, - 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, - 580, 579, 574, 573, 572, 571, 570, 569, 568, 567, - - 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, - 554, 547, 546, 545, 544, 543, 542, 541, 540, 539, - 538, 537, 536, 535, 534, 533, 532, 531, 530, 525, - 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, - 514, 513, 512, 511, 510, 509, 508, 507, 504, 503, - 502, 501, 500, 499, 496, 495, 494, 490, 489, 488, - 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, - 477, 476, 475, 474, 471, 470, 469, 466, 465, 464, - 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, - 453, 452, 451, 450, 447, 443, 442, 441, 440, 439, - - 438, 437, 436, 435, 434, 433, 432, 431, 430, 427, - 426, 425, 424, 423, 420, 419, 418, 417, 416, 415, - 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, - 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, - 394, 393, 392, 388, 387, 386, 385, 384, 383, 382, - 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, - 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, - 361, 360, 359, 358, 355, 354, 353, 350, 349, 348, - 347, 346, 345, 344, 343, 340, 339, 338, 337, 336, - 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, - - 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, - 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, - 305, 304, 303, 302, 301, 300, 299, 298, 193, 297, - 296, 295, 294, 293, 292, 289, 288, 287, 284, 283, - 279, 278, 277, 276, 275, 274, 271, 270, 269, 266, - 265, 260, 257, 256, 255, 250, 249, 248, 147, 247, - 246, 245, 244, 243, 242, 241, 240, 239, 236, 235, - 234, 231, 230, 229, 228, 227, 226, 225, 222, 221, - 218, 212, 211, 210, 207, 206, 205, 204, 203, 103, - 202, 201, 198, 197, 196, 195, 89, 193, 188, 171, - - 170, 169, 168, 165, 147, 142, 141, 136, 125, 122, - 119, 112, 103, 100, 97, 96, 89, 1224, 86, 86, - 11, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, - 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, - 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, - 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, - 1224 + 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 82, 82, + 82, 82, 85, 85, 85, 85, 88, 88, 88, 88, + + 90, 90, 93, 90, 102, 102, 102, 102, 104, 104, + 107, 104, 146, 146, 146, 146, 148, 148, 151, 148, + 192, 773, 772, 192, 194, 194, 771, 194, 770, 769, + 768, 767, 766, 765, 764, 763, 762, 761, 760, 759, + 758, 757, 756, 755, 754, 753, 752, 751, 750, 749, + 748, 747, 746, 745, 742, 741, 740, 739, 738, 737, + 736, 735, 734, 733, 732, 731, 730, 729, 728, 727, + 726, 725, 724, 723, 722, 721, 720, 719, 718, 717, + 716, 715, 714, 713, 712, 711, 710, 709, 708, 707, + 706, 705, 704, 703, 702, 701, 700, 699, 698, 697, + + 696, 693, 692, 691, 690, 689, 688, 687, 686, 685, + 684, 683, 682, 681, 680, 679, 678, 677, 676, 675, + 674, 673, 672, 668, 667, 666, 665, 664, 663, 662, + 661, 660, 659, 658, 657, 656, 655, 654, 653, 652, + 651, 648, 647, 646, 645, 644, 643, 642, 641, 640, + 639, 638, 637, 636, 635, 634, 633, 632, 631, 630, + 629, 628, 627, 623, 622, 621, 618, 617, 616, 615, + 614, 613, 612, 611, 610, 609, 600, 599, 598, 597, + 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, + 586, 585, 584, 583, 578, 577, 576, 575, 574, 573, + + 572, 571, 570, 569, 568, 567, 566, 565, 564, 563, + 562, 561, 558, 551, 550, 549, 548, 547, 546, 545, + 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, + 534, 533, 528, 527, 526, 525, 524, 523, 522, 521, + 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, + 510, 507, 506, 505, 504, 503, 502, 499, 498, 497, + 493, 492, 491, 490, 489, 488, 487, 486, 485, 484, + 483, 482, 481, 480, 479, 478, 477, 474, 473, 472, + 469, 468, 467, 466, 465, 464, 463, 462, 461, 460, + 459, 458, 457, 456, 455, 454, 453, 450, 446, 445, + + 444, 443, 442, 441, 440, 439, 438, 437, 436, 435, + 434, 433, 432, 429, 428, 427, 426, 425, 422, 421, + 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, + 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, + 400, 399, 398, 397, 396, 395, 394, 390, 389, 388, + 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, + 377, 376, 375, 374, 373, 372, 371, 370, 369, 368, + 367, 366, 365, 364, 363, 362, 361, 360, 357, 356, + 355, 352, 351, 350, 349, 348, 347, 346, 345, 342, + 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, + + 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, + 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, + 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, + 301, 300, 299, 193, 298, 297, 296, 295, 294, 293, + 290, 289, 288, 285, 284, 280, 279, 278, 277, 276, + 275, 272, 271, 270, 267, 266, 261, 258, 257, 256, + 251, 250, 249, 147, 248, 247, 246, 245, 244, 243, + 242, 241, 236, 235, 234, 231, 230, 229, 228, 227, + 226, 225, 222, 221, 218, 212, 211, 210, 207, 206, + 205, 204, 203, 103, 202, 201, 198, 197, 196, 195, + + 89, 193, 188, 171, 170, 169, 168, 165, 147, 142, + 141, 136, 125, 122, 119, 112, 103, 100, 97, 96, + 89, 1228, 86, 86, 11, 1228, 1228, 1228, 1228, 1228, + 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, + 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, + 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, + 1228, 1228, 1228, 1228, 1228 } ; -static const flex_int16_t yy_chk[1362] = +static const flex_int16_t yy_chk[1366] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -996,140 +998,140 @@ static const flex_int16_t yy_chk[1362] = 7, 7, 8, 8, 13, 17, 13, 20, 17, 23, 20, 27, 31, 27, 34, 31, 34, 36, 39, 34, 37, 34, 41, 41, 23, 36, 59, 44, 17, 59, - 680, 36, 39, 37, 36, 31, 43, 45, 46, 51, + 682, 36, 39, 37, 36, 31, 43, 45, 46, 51, 43, 44, 48, 45, 43, 54, 48, 54, 63, 59, - 75, 685, 46, 51, 66, 46, 48, 48, 62, 73, + 75, 683, 46, 51, 66, 46, 48, 48, 62, 73, 62, 64, 63, 62, 65, 64, 75, 68, 66, 73, 65, 64, 68, 74, 64, 118, 76, 74, 79, 74, - 76, 77, 77, 76, 686, 79, 79, 74, 76, 118, + 76, 77, 77, 76, 684, 79, 79, 74, 76, 118, 74, 76, 87, 91, 87, 98, 91, 101, 98, 101, 105, 113, 117, 105, 120, 123, 117, 113, 135, 131, - 160, 120, 135, 117, 155, 690, 91, 123, 131, 145, - 155, 145, 149, 105, 160, 149, 156, 156, 162, 181, - 163, 166, 166, 171, 185, 239, 254, 178, 239, 162, - 163, 178, 254, 691, 171, 149, 181, 178, 185, 250, - 290, 322, 290, 250, 328, 345, 322, 290, 348, 328, - 345, 367, 372, 348, 392, 396, 367, 372, 405, 392, - 396, 428, 429, 405, 428, 429, 345, 448, 449, 500, - - 448, 449, 451, 448, 449, 392, 472, 451, 473, 472, - 497, 473, 498, 497, 511, 498, 497, 516, 498, 500, - 541, 692, 516, 564, 589, 541, 516, 693, 564, 589, - 511, 642, 564, 683, 683, 683, 642, 687, 694, 698, - 699, 700, 687, 701, 702, 703, 704, 705, 708, 709, - 710, 711, 712, 713, 714, 715, 716, 717, 719, 720, - 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, - 732, 733, 734, 735, 736, 739, 740, 741, 739, 740, - 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, - 752, 753, 754, 755, 756, 757, 759, 760, 761, 763, - - 765, 766, 767, 768, 769, 770, 771, 772, 773, 773, - 773, 774, 776, 777, 778, 776, 777, 779, 780, 781, - 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, - 792, 793, 794, 795, 796, 797, 798, 799, 800, 773, - 801, 802, 803, 804, 805, 807, 810, 811, 812, 813, + 136, 120, 135, 117, 156, 156, 91, 123, 131, 136, + 145, 149, 145, 105, 149, 155, 160, 162, 181, 163, + 171, 155, 166, 166, 185, 514, 689, 255, 162, 163, + 160, 171, 178, 255, 149, 181, 178, 240, 185, 251, + 240, 514, 178, 251, 291, 323, 291, 329, 347, 350, + 323, 291, 329, 347, 350, 369, 374, 394, 398, 407, + 369, 374, 394, 398, 407, 430, 690, 431, 430, 347, + + 431, 451, 503, 452, 451, 454, 452, 451, 394, 452, + 454, 475, 476, 500, 475, 476, 500, 501, 694, 500, + 501, 519, 503, 501, 545, 695, 519, 568, 593, 545, + 519, 696, 568, 593, 646, 697, 568, 698, 691, 646, + 687, 687, 687, 691, 702, 703, 704, 705, 706, 707, + 708, 709, 712, 713, 714, 715, 716, 717, 718, 719, + 720, 721, 723, 724, 726, 727, 728, 729, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 739, 740, 743, + 744, 745, 743, 744, 746, 747, 748, 749, 750, 751, + 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, + + 763, 764, 765, 767, 769, 770, 771, 772, 773, 774, + 775, 776, 777, 777, 777, 778, 780, 781, 782, 780, + 781, 783, 784, 785, 786, 787, 788, 789, 790, 791, + 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, + 802, 803, 804, 777, 805, 806, 807, 808, 809, 811, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, - 824, 826, 827, 828, 829, 830, 831, 832, 833, 834, + 824, 825, 826, 827, 828, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, - 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, - 856, 857, 858, 860, 861, 862, 863, 864, 865, 866, - - 867, 868, 869, 870, 871, 872, 873, 874, 876, 877, - 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, - 888, 889, 890, 891, 892, 894, 895, 896, 897, 898, - 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, - 911, 912, 914, 915, 918, 919, 920, 921, 922, 923, - 924, 925, 927, 928, 929, 930, 933, 934, 935, 936, - 937, 938, 939, 940, 941, 942, 943, 944, 947, 948, - 949, 951, 952, 953, 954, 955, 956, 957, 958, 959, - 960, 961, 962, 964, 965, 966, 967, 968, 969, 970, + 845, 846, 847, 848, 850, 851, 852, 853, 854, 855, + 856, 857, 858, 859, 860, 861, 862, 864, 865, 866, + + 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, + 877, 878, 880, 881, 882, 883, 884, 885, 886, 887, + 888, 889, 890, 891, 892, 893, 894, 895, 896, 898, + 899, 900, 901, 902, 905, 906, 907, 908, 909, 910, + 911, 912, 913, 914, 915, 916, 918, 919, 922, 923, + 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, + 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, + 947, 948, 951, 952, 953, 955, 956, 957, 958, 959, + 960, 961, 962, 963, 964, 965, 966, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, - 981, 982, 983, 984, 985, 986, 987, 988, 989, 991, - 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, - 1002, 1003, 1004, 1006, 1007, 1008, 1009, 1010, 1011, 1012, - 1013, 1014, 1019, 1021, 1022, 1023, 1024, 1025, 1026, 1027, - 1028, 1028, 1029, 1030, 1031, 1034, 1037, 1038, 1039, 1040, - 1041, 1042, 1046, 1048, 1049, 1050, 1051, 1052, 1053, 1054, - 1055, 1056, 1059, 1062, 1063, 1064, 1065, 1066, 1067, 1068, + 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, + 991, 992, 993, 995, 996, 997, 998, 999, 1000, 1001, + 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1010, 1011, 1012, + 1013, 1014, 1015, 1016, 1017, 1018, 1023, 1025, 1026, 1027, + 1028, 1029, 1030, 1031, 1032, 1032, 1033, 1034, 1035, 1038, + 1041, 1042, 1043, 1044, 1045, 1046, 1050, 1052, 1053, 1054, + 1055, 1056, 1057, 1058, 1059, 1060, 1063, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, - 1099, 1100, 1101, 1102, 1103, 1106, 1107, 1108, 1112, 1116, - 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, - 1130, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, - 1144, 1145, 1146, 1148, 1149, 1150, 1151, 1152, 1153, 1154, - 1155, 1156, 1157, 1158, 1159, 1160, 1162, 1163, 1164, 1165, - 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1175, 1176, - 1177, 1178, 1179, 1180, 1185, 1186, 1187, 1188, 1189, 1195, - 1196, 1198, 1200, 1202, 1203, 1204, 1205, 1207, 1211, 1212, - 1213, 1216, 1217, 1220, 1225, 1225, 1225, 1225, 1226, 1226, - 1226, 1226, 1227, 1227, 1227, 1227, 1228, 1228, 1229, 1228, - - 1230, 1230, 1230, 1230, 1231, 1231, 1232, 1231, 1233, 1233, - 1233, 1233, 1234, 1234, 1235, 1234, 1236, 679, 678, 1236, - 1237, 1237, 677, 1237, 676, 675, 674, 673, 672, 671, - 669, 668, 666, 665, 664, 661, 660, 659, 658, 657, - 656, 655, 654, 653, 652, 651, 649, 648, 647, 646, - 645, 644, 641, 640, 639, 638, 637, 636, 635, 634, - 633, 632, 631, 630, 629, 628, 627, 626, 625, 623, - 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, - 611, 610, 609, 608, 607, 604, 603, 602, 601, 600, - 599, 598, 597, 596, 595, 594, 593, 592, 590, 588, - - 587, 586, 585, 584, 583, 582, 581, 580, 579, 578, - 577, 576, 575, 573, 572, 571, 570, 568, 567, 566, - 565, 563, 562, 561, 560, 559, 558, 556, 555, 553, - 552, 551, 550, 549, 548, 546, 545, 544, 542, 540, - 539, 538, 537, 536, 535, 534, 533, 531, 529, 528, - 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, - 517, 515, 514, 512, 510, 509, 508, 507, 506, 505, - 504, 503, 502, 501, 495, 494, 493, 492, 491, 486, - 485, 484, 483, 482, 481, 480, 479, 478, 477, 476, - 475, 474, 471, 469, 468, 467, 466, 465, 464, 462, - - 461, 460, 459, 458, 457, 456, 455, 454, 453, 452, - 450, 447, 446, 445, 444, 443, 442, 441, 440, 439, - 438, 437, 436, 435, 434, 433, 432, 431, 430, 427, - 426, 425, 423, 422, 421, 419, 418, 417, 416, 415, - 414, 413, 412, 411, 410, 409, 408, 407, 404, 402, - 401, 400, 399, 397, 395, 394, 393, 391, 390, 389, - 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, - 378, 377, 376, 375, 371, 369, 368, 366, 365, 364, - 363, 362, 361, 359, 358, 357, 356, 355, 354, 353, - 352, 351, 350, 349, 347, 344, 343, 342, 341, 340, - - 339, 337, 336, 334, 333, 332, 331, 330, 329, 327, - 326, 325, 324, 323, 321, 320, 319, 318, 317, 316, - 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, - 305, 303, 302, 300, 299, 298, 297, 296, 295, 294, - 293, 292, 291, 288, 287, 285, 283, 282, 281, 280, - 279, 278, 277, 276, 274, 273, 272, 271, 270, 269, - 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, - 258, 257, 256, 255, 253, 252, 251, 249, 247, 246, - 245, 244, 243, 241, 240, 238, 237, 236, 235, 234, - 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, - - 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, - 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, - 202, 201, 200, 199, 198, 197, 196, 195, 193, 191, - 190, 189, 188, 187, 186, 184, 183, 182, 180, 179, - 177, 176, 175, 174, 173, 172, 170, 169, 168, 165, - 164, 161, 159, 158, 157, 154, 153, 152, 146, 144, - 143, 142, 141, 140, 139, 138, 137, 136, 134, 133, - 132, 130, 129, 128, 127, 126, 125, 124, 122, 121, - 119, 116, 115, 114, 112, 111, 110, 109, 108, 102, - 100, 99, 97, 96, 95, 94, 88, 83, 78, 72, - - 71, 70, 69, 67, 56, 50, 49, 47, 42, 40, - 38, 35, 29, 24, 22, 21, 15, 11, 10, 9, - 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, - 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, - 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, - 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, - 1224 + 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1110, + 1111, 1112, 1116, 1120, 1121, 1122, 1123, 1124, 1125, 1126, + 1127, 1128, 1129, 1130, 1134, 1139, 1140, 1141, 1142, 1143, + 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1152, 1153, 1154, + 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, + 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, + 1176, 1177, 1179, 1180, 1181, 1182, 1183, 1184, 1189, 1190, + 1191, 1192, 1193, 1199, 1200, 1202, 1204, 1206, 1207, 1208, + 1209, 1211, 1215, 1216, 1217, 1220, 1221, 1224, 1229, 1229, + 1229, 1229, 1230, 1230, 1230, 1230, 1231, 1231, 1231, 1231, + + 1232, 1232, 1233, 1232, 1234, 1234, 1234, 1234, 1235, 1235, + 1236, 1235, 1237, 1237, 1237, 1237, 1238, 1238, 1239, 1238, + 1240, 681, 680, 1240, 1241, 1241, 679, 1241, 678, 677, + 676, 675, 673, 672, 670, 669, 668, 665, 664, 663, + 662, 661, 660, 659, 658, 657, 656, 655, 653, 652, + 651, 650, 649, 648, 645, 644, 643, 642, 641, 640, + 639, 638, 637, 636, 635, 634, 633, 632, 631, 630, + 629, 627, 625, 624, 623, 622, 621, 620, 619, 618, + 617, 616, 615, 614, 613, 612, 611, 608, 607, 606, + 605, 604, 603, 602, 601, 600, 599, 598, 597, 596, + + 594, 592, 591, 590, 589, 588, 587, 586, 585, 584, + 583, 582, 581, 580, 579, 577, 576, 575, 574, 572, + 571, 570, 569, 567, 566, 565, 564, 563, 562, 560, + 559, 557, 556, 555, 554, 553, 552, 550, 549, 548, + 546, 544, 542, 541, 540, 539, 538, 537, 536, 534, + 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, + 522, 521, 520, 518, 517, 515, 513, 512, 511, 510, + 509, 508, 507, 506, 505, 504, 498, 497, 496, 495, + 494, 489, 488, 487, 486, 485, 484, 483, 482, 481, + 480, 479, 478, 477, 474, 472, 471, 470, 469, 468, + + 467, 465, 464, 463, 462, 461, 460, 459, 458, 457, + 456, 455, 453, 450, 449, 448, 447, 446, 445, 444, + 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, + 433, 432, 429, 428, 427, 425, 424, 423, 421, 420, + 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, + 409, 406, 404, 403, 402, 401, 399, 397, 396, 395, + 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, + 383, 382, 381, 380, 379, 378, 377, 373, 371, 370, + 368, 367, 366, 365, 364, 363, 361, 360, 359, 358, + 357, 356, 355, 354, 353, 352, 351, 349, 346, 345, + + 344, 343, 342, 341, 340, 338, 337, 335, 334, 333, + 332, 331, 330, 328, 327, 326, 325, 324, 322, 321, + 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, + 310, 309, 308, 307, 306, 304, 303, 301, 300, 299, + 298, 297, 296, 295, 294, 293, 292, 289, 288, 286, + 284, 283, 282, 281, 280, 279, 278, 277, 275, 274, + 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, + 263, 262, 261, 260, 259, 258, 257, 256, 254, 253, + 252, 250, 248, 247, 246, 245, 244, 242, 241, 239, + 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, + + 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, + 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, + 208, 207, 206, 205, 204, 202, 201, 200, 199, 198, + 197, 196, 195, 193, 191, 190, 189, 188, 187, 186, + 184, 183, 182, 180, 179, 177, 176, 175, 174, 173, + 172, 170, 169, 168, 165, 164, 161, 159, 158, 157, + 154, 153, 152, 146, 144, 143, 142, 141, 140, 139, + 138, 137, 134, 133, 132, 130, 129, 128, 127, 126, + 125, 124, 122, 121, 119, 116, 115, 114, 112, 111, + 110, 109, 108, 102, 100, 99, 97, 96, 95, 94, + + 88, 83, 78, 72, 71, 70, 69, 67, 56, 50, + 49, 47, 42, 40, 38, 35, 29, 24, 22, 21, + 15, 11, 10, 9, 1228, 1228, 1228, 1228, 1228, 1228, + 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, + 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, + 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, + 1228, 1228, 1228, 1228, 1228 } ; static yy_state_type yy_last_accepting_state; @@ -1224,10 +1226,10 @@ static char *pgaf_strdup(const char *s) * call flex's static input() function. */ static void pgaf_read_raw_block(void); -#line 1227 "test_spec_scan.c" - #line 1229 "test_spec_scan.c" +#line 1231 "test_spec_scan.c" + #define INITIAL 0 #define CLUSTER_BODY 1 #define STEP_BODY 2 @@ -1448,7 +1450,7 @@ YY_DECL #line 89 "test_spec_scan.l" -#line 1451 "test_spec_scan.c" +#line 1453 "test_spec_scan.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1475,13 +1477,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1225 ) + if ( yy_current_state >= 1229 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_current_state != 1224 ); + while ( yy_current_state != 1228 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1781,82 +1783,87 @@ YY_RULE_SETUP case 50: YY_RULE_SETUP #line 181 "test_spec_scan.l" -{ return T_GROUP; } +{ return T_REGION; } YY_BREAK case 51: YY_RULE_SETUP #line 182 "test_spec_scan.l" -{ return T_PORT; } +{ return T_GROUP; } YY_BREAK case 52: YY_RULE_SETUP #line 183 "test_spec_scan.l" -{ return T_CITUS_CLUSTER_NAME; } +{ return T_PORT; } YY_BREAK case 53: YY_RULE_SETUP #line 184 "test_spec_scan.l" -{ return T_DEBIAN_CLUSTER; } +{ return T_CITUS_CLUSTER_NAME; } YY_BREAK case 54: YY_RULE_SETUP #line 185 "test_spec_scan.l" -{ return T_REPLICATION_QUORUM; } +{ return T_DEBIAN_CLUSTER; } YY_BREAK case 55: YY_RULE_SETUP #line 186 "test_spec_scan.l" -{ return T_REPLICATION_PASSWORD; } +{ return T_REPLICATION_QUORUM; } YY_BREAK case 56: YY_RULE_SETUP #line 187 "test_spec_scan.l" -{ return T_EXTENSION_VERSION; } +{ return T_REPLICATION_PASSWORD; } YY_BREAK case 57: YY_RULE_SETUP #line 188 "test_spec_scan.l" -{ return T_BIND_SOURCE; } +{ return T_EXTENSION_VERSION; } YY_BREAK case 58: YY_RULE_SETUP #line 189 "test_spec_scan.l" -{ return T_LEGACY_STARTUP; } +{ return T_BIND_SOURCE; } YY_BREAK case 59: YY_RULE_SETUP -#line 191 "test_spec_scan.l" -{ return T_EQUALS; } +#line 190 "test_spec_scan.l" +{ return T_LEGACY_STARTUP; } YY_BREAK case 60: YY_RULE_SETUP -#line 193 "test_spec_scan.l" +#line 192 "test_spec_scan.l" +{ return T_EQUALS; } + YY_BREAK +case 61: +YY_RULE_SETUP +#line 194 "test_spec_scan.l" { yylval.ival = atoi(yytext); return T_INTEGER; } YY_BREAK -case 61: -/* rule 61 can match eol */ +case 62: +/* rule 62 can match eol */ YY_RULE_SETUP -#line 198 "test_spec_scan.l" +#line 199 "test_spec_scan.l" { yytext[yyleng - 1] = '\0'; yylval.str = pgaf_strdup(yytext + 1); return T_STRING; } YY_BREAK -case 62: +case 63: YY_RULE_SETUP -#line 204 "test_spec_scan.l" +#line 205 "test_spec_scan.l" { pgaf_cluster_depth++; return T_LBRACE; } YY_BREAK -case 63: +case 64: YY_RULE_SETUP -#line 209 "test_spec_scan.l" +#line 210 "test_spec_scan.l" { pgaf_cluster_depth--; if (pgaf_cluster_depth == 0) @@ -1864,25 +1871,20 @@ YY_RULE_SETUP return T_RBRACE; } YY_BREAK -case 64: -YY_RULE_SETUP -#line 216 "test_spec_scan.l" -{ return T_FS_INIT; } - YY_BREAK case 65: YY_RULE_SETUP #line 217 "test_spec_scan.l" -{ return T_FS_SINGLE; } +{ return T_FS_INIT; } YY_BREAK case 66: YY_RULE_SETUP #line 218 "test_spec_scan.l" -{ return T_FS_PRIMARY; } +{ return T_FS_SINGLE; } YY_BREAK case 67: YY_RULE_SETUP #line 219 "test_spec_scan.l" -{ return T_FS_WAIT_PRIMARY; } +{ return T_FS_PRIMARY; } YY_BREAK case 68: YY_RULE_SETUP @@ -1892,7 +1894,7 @@ YY_RULE_SETUP case 69: YY_RULE_SETUP #line 221 "test_spec_scan.l" -{ return T_FS_WAIT_STANDBY; } +{ return T_FS_WAIT_PRIMARY; } YY_BREAK case 70: YY_RULE_SETUP @@ -1902,12 +1904,12 @@ YY_RULE_SETUP case 71: YY_RULE_SETUP #line 223 "test_spec_scan.l" -{ return T_FS_DEMOTED; } +{ return T_FS_WAIT_STANDBY; } YY_BREAK case 72: YY_RULE_SETUP #line 224 "test_spec_scan.l" -{ return T_FS_DEMOTE_TIMEOUT; } +{ return T_FS_DEMOTED; } YY_BREAK case 73: YY_RULE_SETUP @@ -1917,22 +1919,22 @@ YY_RULE_SETUP case 74: YY_RULE_SETUP #line 226 "test_spec_scan.l" -{ return T_FS_DRAINING; } +{ return T_FS_DEMOTE_TIMEOUT; } YY_BREAK case 75: YY_RULE_SETUP #line 227 "test_spec_scan.l" -{ return T_FS_SECONDARY; } +{ return T_FS_DRAINING; } YY_BREAK case 76: YY_RULE_SETUP #line 228 "test_spec_scan.l" -{ return T_FS_CATCHINGUP; } +{ return T_FS_SECONDARY; } YY_BREAK case 77: YY_RULE_SETUP #line 229 "test_spec_scan.l" -{ return T_FS_PREP_PROMOTION; } +{ return T_FS_CATCHINGUP; } YY_BREAK case 78: YY_RULE_SETUP @@ -1942,7 +1944,7 @@ YY_RULE_SETUP case 79: YY_RULE_SETUP #line 231 "test_spec_scan.l" -{ return T_FS_STOP_REPLICATION; } +{ return T_FS_PREP_PROMOTION; } YY_BREAK case 80: YY_RULE_SETUP @@ -1952,12 +1954,12 @@ YY_RULE_SETUP case 81: YY_RULE_SETUP #line 233 "test_spec_scan.l" -{ return T_FS_MAINTENANCE; } +{ return T_FS_STOP_REPLICATION; } YY_BREAK case 82: YY_RULE_SETUP #line 234 "test_spec_scan.l" -{ return T_FS_JOIN_PRIMARY; } +{ return T_FS_MAINTENANCE; } YY_BREAK case 83: YY_RULE_SETUP @@ -1967,7 +1969,7 @@ YY_RULE_SETUP case 84: YY_RULE_SETUP #line 236 "test_spec_scan.l" -{ return T_FS_APPLY_SETTINGS; } +{ return T_FS_JOIN_PRIMARY; } YY_BREAK case 85: YY_RULE_SETUP @@ -1977,7 +1979,7 @@ YY_RULE_SETUP case 86: YY_RULE_SETUP #line 238 "test_spec_scan.l" -{ return T_FS_PREPARE_MAINTENANCE; } +{ return T_FS_APPLY_SETTINGS; } YY_BREAK case 87: YY_RULE_SETUP @@ -1987,7 +1989,7 @@ YY_RULE_SETUP case 88: YY_RULE_SETUP #line 240 "test_spec_scan.l" -{ return T_FS_WAIT_MAINTENANCE; } +{ return T_FS_PREPARE_MAINTENANCE; } YY_BREAK case 89: YY_RULE_SETUP @@ -1997,7 +1999,7 @@ YY_RULE_SETUP case 90: YY_RULE_SETUP #line 242 "test_spec_scan.l" -{ return T_FS_REPORT_LSN; } +{ return T_FS_WAIT_MAINTENANCE; } YY_BREAK case 91: YY_RULE_SETUP @@ -2007,7 +2009,7 @@ YY_RULE_SETUP case 92: YY_RULE_SETUP #line 244 "test_spec_scan.l" -{ return T_FS_FAST_FORWARD; } +{ return T_FS_REPORT_LSN; } YY_BREAK case 93: YY_RULE_SETUP @@ -2017,7 +2019,7 @@ YY_RULE_SETUP case 94: YY_RULE_SETUP #line 246 "test_spec_scan.l" -{ return T_FS_JOIN_SECONDARY; } +{ return T_FS_FAST_FORWARD; } YY_BREAK case 95: YY_RULE_SETUP @@ -2027,224 +2029,224 @@ YY_RULE_SETUP case 96: YY_RULE_SETUP #line 248 "test_spec_scan.l" -{ return T_FS_DROPPED; } +{ return T_FS_JOIN_SECONDARY; } YY_BREAK case 97: YY_RULE_SETUP -#line 250 "test_spec_scan.l" +#line 249 "test_spec_scan.l" +{ return T_FS_DROPPED; } + YY_BREAK +case 98: +YY_RULE_SETUP +#line 251 "test_spec_scan.l" { yylval.str = pgaf_strdup(yytext); return T_IDENT; } YY_BREAK -case 98: -YY_RULE_SETUP -#line 255 "test_spec_scan.l" -{ /* comment */ } - YY_BREAK case 99: -/* rule 99 can match eol */ YY_RULE_SETUP #line 256 "test_spec_scan.l" -{ pgaf_line_number++; } +{ /* comment */ } YY_BREAK case 100: +/* rule 100 can match eol */ YY_RULE_SETUP #line 257 "test_spec_scan.l" -{ /* whitespace */ } +{ pgaf_line_number++; } YY_BREAK case 101: YY_RULE_SETUP -#line 259 "test_spec_scan.l" -{ BEGIN(EXEC_ARGS); return T_EXEC_FAILS; } +#line 258 "test_spec_scan.l" +{ /* whitespace */ } YY_BREAK case 102: YY_RULE_SETUP #line 260 "test_spec_scan.l" -{ BEGIN(EXEC_ARGS); return T_EXEC; } +{ BEGIN(EXEC_ARGS); return T_EXEC_FAILS; } YY_BREAK case 103: YY_RULE_SETUP #line 261 "test_spec_scan.l" -{ BEGIN(EXEC_ARGS); return T_RUN; } +{ BEGIN(EXEC_ARGS); return T_EXEC; } YY_BREAK case 104: YY_RULE_SETUP #line 262 "test_spec_scan.l" -{ BEGIN(EXEC_ARGS); return T_PG_AUTOCTL; } +{ BEGIN(EXEC_ARGS); return T_RUN; } YY_BREAK case 105: YY_RULE_SETUP -#line 264 "test_spec_scan.l" -{ return T_WAIT; } +#line 263 "test_spec_scan.l" +{ BEGIN(EXEC_ARGS); return T_PG_AUTOCTL; } YY_BREAK case 106: YY_RULE_SETUP #line 265 "test_spec_scan.l" -{ return T_UNTIL; } +{ return T_WAIT; } YY_BREAK case 107: YY_RULE_SETUP #line 266 "test_spec_scan.l" -{ return T_TIMEOUT; } +{ return T_UNTIL; } YY_BREAK case 108: YY_RULE_SETUP #line 267 "test_spec_scan.l" -{ return T_ASSERT; } +{ return T_TIMEOUT; } YY_BREAK case 109: YY_RULE_SETUP #line 268 "test_spec_scan.l" -{ return T_SQL; } +{ return T_ASSERT; } YY_BREAK case 110: YY_RULE_SETUP #line 269 "test_spec_scan.l" -{ return T_EXPECT; } +{ return T_SQL; } YY_BREAK case 111: YY_RULE_SETUP #line 270 "test_spec_scan.l" -{ return T_ERROR; } +{ return T_EXPECT; } YY_BREAK case 112: YY_RULE_SETUP #line 271 "test_spec_scan.l" -{ return T_PROMOTE; } +{ return T_ERROR; } YY_BREAK case 113: YY_RULE_SETUP #line 272 "test_spec_scan.l" -{ return T_PERFORM; } +{ return T_PROMOTE; } YY_BREAK case 114: YY_RULE_SETUP #line 273 "test_spec_scan.l" -{ return T_FAILOVER; } +{ return T_PERFORM; } YY_BREAK case 115: YY_RULE_SETUP #line 274 "test_spec_scan.l" -{ return T_NETWORK; } +{ return T_FAILOVER; } YY_BREAK case 116: YY_RULE_SETUP #line 275 "test_spec_scan.l" -{ return T_DISCONNECT; } +{ return T_NETWORK; } YY_BREAK case 117: YY_RULE_SETUP #line 276 "test_spec_scan.l" -{ return T_CONNECT; } +{ return T_DISCONNECT; } YY_BREAK case 118: YY_RULE_SETUP #line 277 "test_spec_scan.l" -{ return T_SLEEP; } +{ return T_CONNECT; } YY_BREAK case 119: YY_RULE_SETUP #line 278 "test_spec_scan.l" -{ return T_COMPOSE; } +{ return T_SLEEP; } YY_BREAK case 120: YY_RULE_SETUP #line 279 "test_spec_scan.l" -{ return T_DOWN; } +{ return T_COMPOSE; } YY_BREAK case 121: YY_RULE_SETUP #line 280 "test_spec_scan.l" -{ return T_START; } +{ return T_DOWN; } YY_BREAK case 122: YY_RULE_SETUP #line 281 "test_spec_scan.l" -{ return T_STOP; } +{ return T_START; } YY_BREAK case 123: YY_RULE_SETUP #line 282 "test_spec_scan.l" -{ return T_STOPPED; } +{ return T_STOP; } YY_BREAK case 124: YY_RULE_SETUP #line 283 "test_spec_scan.l" -{ return T_KILL; } +{ return T_STOPPED; } YY_BREAK case 125: YY_RULE_SETUP #line 284 "test_spec_scan.l" -{ return T_IN; } +{ return T_KILL; } YY_BREAK case 126: YY_RULE_SETUP #line 285 "test_spec_scan.l" -{ return T_STATE; } +{ return T_IN; } YY_BREAK case 127: YY_RULE_SETUP #line 286 "test_spec_scan.l" -{ return T_ASSIGNED_STATE; } +{ return T_STATE; } YY_BREAK case 128: YY_RULE_SETUP #line 287 "test_spec_scan.l" -{ return T_CANDIDATE_PRIORITY; } +{ return T_ASSIGNED_STATE; } YY_BREAK case 129: YY_RULE_SETUP #line 288 "test_spec_scan.l" -{ return T_GROUP; } +{ return T_CANDIDATE_PRIORITY; } YY_BREAK case 130: YY_RULE_SETUP #line 289 "test_spec_scan.l" -{ return T_AND; } +{ return T_GROUP; } YY_BREAK case 131: YY_RULE_SETUP #line 290 "test_spec_scan.l" -{ return T_IS; } +{ return T_AND; } YY_BREAK case 132: YY_RULE_SETUP #line 291 "test_spec_scan.l" -{ return T_WITH; } +{ return T_IS; } YY_BREAK case 133: YY_RULE_SETUP #line 292 "test_spec_scan.l" -{ return T_EQUALS; } +{ return T_WITH; } YY_BREAK case 134: YY_RULE_SETUP #line 293 "test_spec_scan.l" -{ return T_COMMA; } +{ return T_EQUALS; } YY_BREAK case 135: YY_RULE_SETUP #line 294 "test_spec_scan.l" -{ return T_POSTGRES; } +{ return T_COMMA; } YY_BREAK case 136: YY_RULE_SETUP #line 295 "test_spec_scan.l" -{ return T_STAYS; } +{ return T_POSTGRES; } YY_BREAK case 137: YY_RULE_SETUP #line 296 "test_spec_scan.l" -{ return T_WHILE; } +{ return T_STAYS; } YY_BREAK case 138: -/* rule 138 can match eol */ YY_RULE_SETUP #line 297 "test_spec_scan.l" -{ return T_THROUGH; } +{ return T_WHILE; } YY_BREAK case 139: +/* rule 139 can match eol */ YY_RULE_SETUP #line 298 "test_spec_scan.l" { return T_THROUGH; } @@ -2252,54 +2254,59 @@ YY_RULE_SETUP case 140: YY_RULE_SETUP #line 299 "test_spec_scan.l" -{ return T_SET; } +{ return T_THROUGH; } YY_BREAK case 141: YY_RULE_SETUP #line 300 "test_spec_scan.l" -{ BEGIN(EXEC_ARGS); return T_INJECT; } +{ return T_SET; } YY_BREAK case 142: YY_RULE_SETUP #line 301 "test_spec_scan.l" -{ return T_LOGS; } +{ BEGIN(EXEC_ARGS); return T_INJECT; } YY_BREAK case 143: YY_RULE_SETUP #line 302 "test_spec_scan.l" -{ return T_NOT; } +{ return T_LOGS; } YY_BREAK case 144: YY_RULE_SETUP #line 303 "test_spec_scan.l" -{ return T_CONTAINS; } +{ return T_NOT; } YY_BREAK case 145: YY_RULE_SETUP #line 304 "test_spec_scan.l" -{ return T_MATCHES; } +{ return T_CONTAINS; } YY_BREAK case 146: YY_RULE_SETUP -#line 306 "test_spec_scan.l" +#line 305 "test_spec_scan.l" +{ return T_MATCHES; } + YY_BREAK +case 147: +YY_RULE_SETUP +#line 307 "test_spec_scan.l" { yylval.ival = atoi(yytext); return T_INTEGER; } YY_BREAK -case 147: -/* rule 147 can match eol */ +case 148: +/* rule 148 can match eol */ YY_RULE_SETUP -#line 311 "test_spec_scan.l" +#line 312 "test_spec_scan.l" { yytext[yyleng - 1] = '\0'; yylval.str = pgaf_strdup(yytext + 1); return T_STRING; } YY_BREAK -case 148: +case 149: YY_RULE_SETUP -#line 317 "test_spec_scan.l" +#line 318 "test_spec_scan.l" { if (pgaf_next_brace_is_while) { pgaf_next_brace_is_while = 0; @@ -2310,9 +2317,9 @@ YY_RULE_SETUP return T_BLOCK; } YY_BREAK -case 149: +case 150: YY_RULE_SETUP -#line 327 "test_spec_scan.l" +#line 328 "test_spec_scan.l" { if (pgaf_step_brace_depth > 0) { pgaf_step_brace_depth--; @@ -2323,40 +2330,40 @@ YY_RULE_SETUP return T_RBRACE; } YY_BREAK -case 150: +case 151: YY_RULE_SETUP -#line 337 "test_spec_scan.l" +#line 338 "test_spec_scan.l" { yylval.str = pgaf_strdup(yytext); return T_IDENT; } YY_BREAK -case 151: +case 152: YY_RULE_SETUP -#line 342 "test_spec_scan.l" +#line 343 "test_spec_scan.l" { /* skip whitespace before service name */ } YY_BREAK -case 152: +case 153: YY_RULE_SETUP -#line 344 "test_spec_scan.l" +#line 345 "test_spec_scan.l" { yylval.str = pgaf_strdup(yytext); BEGIN(EXEC_ARGS_REST); return T_IDENT; } YY_BREAK -case 153: -/* rule 153 can match eol */ +case 154: +/* rule 154 can match eol */ YY_RULE_SETUP -#line 350 "test_spec_scan.l" +#line 351 "test_spec_scan.l" { pgaf_line_number++; BEGIN(STEP_BODY); } YY_BREAK -case 154: +case 155: YY_RULE_SETUP -#line 355 "test_spec_scan.l" +#line 356 "test_spec_scan.l" { char *p = yytext; while (*p == ' ' || *p == '\t') p++; @@ -2365,21 +2372,21 @@ YY_RULE_SETUP return T_SHELL_ARGS; } YY_BREAK -case 155: -/* rule 155 can match eol */ +case 156: +/* rule 156 can match eol */ YY_RULE_SETUP -#line 363 "test_spec_scan.l" +#line 364 "test_spec_scan.l" { pgaf_line_number++; BEGIN(STEP_BODY); } YY_BREAK -case 156: +case 157: YY_RULE_SETUP -#line 368 "test_spec_scan.l" +#line 369 "test_spec_scan.l" ECHO; YY_BREAK -#line 2382 "test_spec_scan.c" +#line 2389 "test_spec_scan.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(CLUSTER_BODY): case YY_STATE_EOF(STEP_BODY): @@ -2681,7 +2688,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1225 ) + if ( yy_current_state >= 1229 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -2709,11 +2716,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1225 ) + if ( yy_current_state >= 1229 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 1224); + yy_is_jam = (yy_current_state == 1228); return yy_is_jam ? 0 : yy_current_state; } @@ -3352,7 +3359,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 368 "test_spec_scan.l" +#line 369 "test_spec_scan.l" static void diff --git a/src/bin/pgaftest/test_spec_scan.l b/src/bin/pgaftest/test_spec_scan.l index 9aff755df..12e6355df 100644 --- a/src/bin/pgaftest/test_spec_scan.l +++ b/src/bin/pgaftest/test_spec_scan.l @@ -178,6 +178,7 @@ static void pgaf_read_raw_block(void); "listen" { return T_LISTEN; } "citus-secondary" { return T_CITUS_SECONDARY; } "candidate-priority" { return T_CANDIDATE_PRIORITY; } +"region" { return T_REGION; } "group" { return T_GROUP; } "port" { return T_PORT; } "citus-cluster-name" { return T_CITUS_CLUSTER_NAME; } diff --git a/src/monitor/Makefile b/src/monitor/Makefile index 5d7a491c4..e65d6833b 100644 --- a/src/monitor/Makefile +++ b/src/monitor/Makefile @@ -2,7 +2,7 @@ # Licensed under the PostgreSQL License. EXTENSION = pgautofailover -EXTVERSION = 2.2 +EXTVERSION = 2.3 SRC_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) diff --git a/src/monitor/expected/dummy_update.out b/src/monitor/expected/dummy_update.out index 0c2df4d28..a8c05d9e2 100644 --- a/src/monitor/expected/dummy_update.out +++ b/src/monitor/expected/dummy_update.out @@ -19,5 +19,5 @@ select installed_version -- should error because installed extension isn't compatible with .so select * from pgautofailover.get_primary('unknown formation'); ERROR: loaded "pgautofailover" library version differs from installed extension version -DETAIL: Loaded library requires 2.2, but the installed extension version is dummy. +DETAIL: Loaded library requires 2.3, but the installed extension version is dummy. HINT: Run ALTER EXTENSION pgautofailover UPDATE and try again. diff --git a/src/monitor/expected/monitor.out b/src/monitor/expected/monitor.out index 2e8f6f5a8..6b937bf9f 100644 --- a/src/monitor/expected/monitor.out +++ b/src/monitor/expected/monitor.out @@ -97,7 +97,8 @@ assigned_replication_quorum | t assigned_node_name | node_3 select formationid, nodename, goalstate, reportedstate - from pgautofailover.node; + from pgautofailover.node + order by nodeid; -[ RECORD 1 ]-+------------- formationid | default nodename | node_1 diff --git a/src/monitor/group_state_machine.c b/src/monitor/group_state_machine.c index 94b90f84e..7ef662ac0 100644 --- a/src/monitor/group_state_machine.c +++ b/src/monitor/group_state_machine.c @@ -81,6 +81,7 @@ static bool WalDifferenceWithin(AutoFailoverNode *secondaryNode, /* GUC variables */ int EnableSyncXlogThreshold = DEFAULT_XLOG_SEG_SIZE; int PromoteXlogThreshold = DEFAULT_XLOG_SEG_SIZE; +int ReplicationStallTimeoutMs = 10 * 1000; /* @@ -106,6 +107,7 @@ BuildGroupStateContext(GroupStateContext *ctx, AutoFailoverNode *activeNode) ctx->unhealthyTimeoutMs = UnhealthyTimeoutMs; ctx->drainTimeoutMs = DrainTimeoutMs; ctx->startupGracePeriodMs = StartupGracePeriodMs; + ctx->replicationStallTimeoutMs = ReplicationStallTimeoutMs; if (ctx->formation == NULL) { @@ -282,6 +284,40 @@ ProceedGroupStateFromContext(GroupStateContext *ctx) ReplicationStateGetName(activeNode->goalState)))); } + /* + * Replication stall detection (issue #997 — 3-DC split-brain). + * + * When the primary is healthy (monitor can reach it) but no standby has + * appeared in pg_stat_replication for longer than + * pgautofailover.replication_stall_timeout, we assign wait_primary. + * That clears synchronous_standby_names so COMMIT no longer hangs. + * + * replication_stall_since is set/cleared by ReportAutoFailoverNodeState() + * each time the keeper calls node_active(). + */ + if (IsInPrimaryState(primaryNode) && + NodeIsHealthy(primaryNode, ctx) && + primaryNode->replicationStallSince != 0 && + TimestampDifferenceExceeds(primaryNode->replicationStallSince, + ctx->now, + ctx->replicationStallTimeoutMs)) + { + char message[BUFSIZE] = { 0 }; + + LogAndNotifyMessage( + message, BUFSIZE, + "Setting goal state of " NODE_FORMAT + " to wait_primary: no standby has been connected in " + "pg_stat_replication for more than %dms " + "(pgautofailover.replication_stall_timeout).", + NODE_FORMAT_ARGS(primaryNode), + ctx->replicationStallTimeoutMs); + + AssignGoalState(primaryNode, REPLICATION_STATE_WAIT_PRIMARY, message); + + return true; + } + /* Multiple Standby failover is handled in its own function. */ if (nodesCount > 2 && NodeIsUnhealthy(primaryNode, ctx)) { diff --git a/src/monitor/group_state_machine.h b/src/monitor/group_state_machine.h index 65e9f0fac..17effdd17 100644 --- a/src/monitor/group_state_machine.h +++ b/src/monitor/group_state_machine.h @@ -58,6 +58,7 @@ typedef struct GroupStateContext int unhealthyTimeoutMs; int drainTimeoutMs; int startupGracePeriodMs; + int replicationStallTimeoutMs; } GroupStateContext; @@ -73,3 +74,4 @@ extern int PromoteXlogThreshold; extern int DrainTimeoutMs; extern int UnhealthyTimeoutMs; extern int StartupGracePeriodMs; +extern int ReplicationStallTimeoutMs; diff --git a/src/monitor/metadata.h b/src/monitor/metadata.h index f7325c86e..d974d8bff 100644 --- a/src/monitor/metadata.h +++ b/src/monitor/metadata.h @@ -15,7 +15,7 @@ #include "storage/lockdefs.h" -#define AUTO_FAILOVER_EXTENSION_VERSION "2.2" +#define AUTO_FAILOVER_EXTENSION_VERSION "2.3" #define AUTO_FAILOVER_EXTENSION_NAME "pgautofailover" #define AUTO_FAILOVER_SCHEMA_NAME "pgautofailover" #define AUTO_FAILOVER_FORMATION_TABLE "pgautofailover.formation" diff --git a/src/monitor/node_active_protocol.c b/src/monitor/node_active_protocol.c index d87f4516f..c75049cec 100644 --- a/src/monitor/node_active_protocol.c +++ b/src/monitor/node_active_protocol.c @@ -43,6 +43,7 @@ static AutoFailoverNodeState * NodeActive(char *formationId, static void JoinAutoFailoverFormation(AutoFailoverFormation *formation, char *nodeName, char *nodeHost, int nodePort, uint64 sysIdentifier, char *nodeCluster, + char *region, AutoFailoverNodeState *currentNodeState); static int AssignGroupId(AutoFailoverFormation *formation, char *nodeHost, int nodePort, @@ -114,6 +115,9 @@ register_node(PG_FUNCTION_ARGS) text *nodeClusterText = PG_GETARG_TEXT_P(12); char *nodeCluster = text_to_cstring(nodeClusterText); + text *nodeRegionText = PG_GETARG_TEXT_P(13); + char *nodeRegion = text_to_cstring(nodeRegionText); + AutoFailoverNodeState currentNodeState = { 0 }; currentNodeState.nodeId = currentNodeId; @@ -197,6 +201,7 @@ register_node(PG_FUNCTION_ARGS) nodePort, sysIdentifier, nodeCluster, + nodeRegion, ¤tNodeState); AutoFailoverNode *pgAutoFailoverNode = GetAutoFailoverNode(nodeHost, nodePort); @@ -567,6 +572,7 @@ static void JoinAutoFailoverFormation(AutoFailoverFormation *formation, char *nodeName, char *nodeHost, int nodePort, uint64 sysIdentifier, char *nodeCluster, + char *region, AutoFailoverNodeState *currentNodeState) { int groupId = -1; @@ -735,7 +741,8 @@ JoinAutoFailoverFormation(AutoFailoverFormation *formation, currentNodeState->replicationState, currentNodeState->candidatePriority, currentNodeState->replicationQuorum, - nodeCluster); + nodeCluster, + region); currentNodeState->groupId = groupId; } diff --git a/src/monitor/node_metadata.c b/src/monitor/node_metadata.c index f8bc2d943..73675ee90 100644 --- a/src/monitor/node_metadata.c +++ b/src/monitor/node_metadata.c @@ -170,6 +170,15 @@ TupleToAutoFailoverNode(TupleDesc tupleDescriptor, HeapTuple heapTuple) Datum nodeCluster = heap_getattr(heapTuple, Anum_pgautofailover_node_nodecluster, tupleDescriptor, &isNull); + bool regionIsNull = false; + Datum region = heap_getattr(heapTuple, + Anum_pgautofailover_node_region, + tupleDescriptor, ®ionIsNull); + bool stallIsNull = false; + Datum replicationStallSince = + heap_getattr(heapTuple, + Anum_pgautofailover_node_replication_stall_since, + tupleDescriptor, &stallIsNull); Oid goalStateOid = DatumGetObjectId(goalState); Oid reportedStateOid = DatumGetObjectId(reportedState); @@ -201,6 +210,10 @@ TupleToAutoFailoverNode(TupleDesc tupleDescriptor, HeapTuple heapTuple) pgAutoFailoverNode->candidatePriority = DatumGetInt32(candidatePriority); pgAutoFailoverNode->replicationQuorum = DatumGetBool(replicationQuorum); pgAutoFailoverNode->nodeCluster = TextDatumGetCString(nodeCluster); + pgAutoFailoverNode->region = + regionIsNull ? "" : TextDatumGetCString(region); + pgAutoFailoverNode->replicationStallSince = + stallIsNull ? 0 : DatumGetTimestampTz(replicationStallSince); return pgAutoFailoverNode; } @@ -1325,7 +1338,8 @@ AddAutoFailoverNode(char *formationId, ReplicationState reportedState, int candidatePriority, bool replicationQuorum, - char *nodeCluster) + char *nodeCluster, + char *region) { Oid goalStateOid = ReplicationStateGetEnum(goalState); Oid reportedStateOid = ReplicationStateGetEnum(reportedState); @@ -1349,7 +1363,8 @@ AddAutoFailoverNode(char *formationId, INT4OID, /* candidate_priority */ BOOLOID, /* replication_quorum */ TEXTOID, /* node name prefix */ - TEXTOID /* nodecluster */ + TEXTOID, /* nodecluster */ + TEXTOID /* region */ }; Datum argValues[] = { @@ -1365,7 +1380,8 @@ AddAutoFailoverNode(char *formationId, Int32GetDatum(candidatePriority), /* candidate_priority */ BoolGetDatum(replicationQuorum), /* replication_quorum */ CStringGetTextDatum(prefix), /* prefix */ - CStringGetTextDatum(nodeCluster) /* nodecluster */ + CStringGetTextDatum(nodeCluster), /* nodecluster */ + CStringGetTextDatum(region) /* region */ }; /* @@ -1391,7 +1407,8 @@ AddAutoFailoverNode(char *formationId, ' ', /* candidate_priority */ ' ', /* replication_quorum */ ' ', /* prefix */ - ' ' /* nodecluster */ + ' ', /* nodecluster */ + ' ' /* region */ }; const int argCount = sizeof(argValues) / sizeof(argValues[0]); @@ -1421,7 +1438,7 @@ AddAutoFailoverNode(char *formationId, "INSERT INTO " AUTO_FAILOVER_NODE_TABLE " (formationid, nodeid, groupid, nodename, nodehost, nodeport, " " sysidentifier, goalstate, reportedstate, " - " candidatepriority, replicationquorum, nodecluster)" + " candidatepriority, replicationquorum, nodecluster, region)" " SELECT $1, seq.nodeid, $3, " " case when $4 is null " " then case when $12 = 'node' " @@ -1435,7 +1452,7 @@ AddAutoFailoverNode(char *formationId, " end " " else $4 " " end, " - " $5, $6, $7, $8, $9, $10, $11, $13 " + " $5, $6, $7, $8, $9, $10, $11, $13, $14 " " FROM seq " "RETURNING nodeid"; @@ -1576,6 +1593,13 @@ ReportAutoFailoverNodeState(char *nodeHost, int nodePort, }; const int argCount = sizeof(argValues) / sizeof(argValues[0]); + /* + * Track when a PRIMARY node first loses its standby from + * pg_stat_replication. We set replication_stall_since on the first + * empty-sync-state report and clear it as soon as a standby reconnects. + * The FSM uses this timestamp to assign wait_primary after + * pgautofailover.replication_stall_timeout elapses (issue #997). + */ const char *updateQuery = "UPDATE " AUTO_FAILOVER_NODE_TABLE " SET reportedstate = $1, reporttime = now(), " @@ -1583,7 +1607,13 @@ ReportAutoFailoverNodeState(char *nodeHost, int nodePort, "reportedtli = CASE $4 WHEN 0 THEN reportedtli ELSE $4 END, " "reportedlsn = CASE $5 WHEN '0/0'::pg_lsn THEN reportedlsn ELSE $5 END, " "walreporttime = CASE $5 WHEN '0/0'::pg_lsn THEN walreporttime ELSE now() END, " - "statechangetime = CASE WHEN reportedstate <> $1 THEN now() ELSE statechangetime END " + "statechangetime = CASE WHEN reportedstate <> $1 THEN now() ELSE statechangetime END, " + "replication_stall_since = CASE " + " WHEN $1 = 'primary'::pgautofailover.replication_state" + " AND $3 = '' " + " THEN COALESCE(replication_stall_since, now()) " + " ELSE NULL " + "END " "WHERE nodehost = $6 AND nodeport = $7"; SPI_connect(); diff --git a/src/monitor/node_metadata.h b/src/monitor/node_metadata.h index a0f8ccb0a..e94685bbf 100644 --- a/src/monitor/node_metadata.h +++ b/src/monitor/node_metadata.h @@ -26,7 +26,7 @@ * indices must match with the columns given * in the following definition. */ -#define Natts_pgautofailover_node 19 +#define Natts_pgautofailover_node 21 #define Anum_pgautofailover_node_formationid 1 #define Anum_pgautofailover_node_nodeid 2 #define Anum_pgautofailover_node_groupid 3 @@ -48,6 +48,8 @@ #define Anum_pgautofailover_node_candidate_priority 19 #define Anum_pgautofailover_node_replication_quorum 20 #define Anum_pgautofailover_node_nodecluster 21 +#define Anum_pgautofailover_node_region 22 +#define Anum_pgautofailover_node_replication_stall_since 23 #define AUTO_FAILOVER_NODE_TABLE_ALL_COLUMNS \ "formationid, " \ @@ -70,7 +72,9 @@ "statechangetime, " \ "candidatepriority, " \ "replicationquorum, " \ - "nodecluster" + "nodecluster, " \ + "region, " \ + "replication_stall_since" #define SELECT_ALL_FROM_AUTO_FAILOVER_NODE_TABLE \ @@ -133,6 +137,8 @@ typedef struct AutoFailoverNode int candidatePriority; bool replicationQuorum; char *nodeCluster; + char *region; + TimestampTz replicationStallSince; /* 0 = not stalled */ } AutoFailoverNode; @@ -209,7 +215,8 @@ extern int AddAutoFailoverNode(char *formationId, ReplicationState reportedState, int candidatePriority, bool replicationQuorum, - char *nodeCluster); + char *nodeCluster, + char *region); extern void SetNodeGoalState(AutoFailoverNode *pgAutoFailoverNode, ReplicationState goalState, const char *message); diff --git a/src/monitor/pg_auto_failover.c b/src/monitor/pg_auto_failover.c index 40b7f1254..b94a4b92e 100644 --- a/src/monitor/pg_auto_failover.c +++ b/src/monitor/pg_auto_failover.c @@ -170,6 +170,15 @@ StartMonitorNode(void) NULL, &DrainTimeoutMs, 30 * 1000, 1, INT_MAX, PGC_SIGHUP, GUC_UNIT_MS, NULL, NULL, NULL); + DefineCustomIntVariable("pgautofailover.replication_stall_timeout", + "Assign wait_primary when the primary has had no standby " + "connected in pg_stat_replication for this long. " + "This unblocks writes in 3-DC topologies where the " + "primary-to-standby link fails while both nodes remain " + "reachable from the monitor.", + NULL, &ReplicationStallTimeoutMs, 10 * 1000, 1, INT_MAX, + PGC_SIGHUP, GUC_UNIT_MS, NULL, NULL, NULL); + DefineCustomIntVariable("pgautofailover.node_considered_unhealthy_timeout", "Mark node unhealthy if last ping was over this long ago", NULL, &UnhealthyTimeoutMs, 20 * 1000, 1, INT_MAX, diff --git a/src/monitor/pgautofailover--2.2--2.3.sql b/src/monitor/pgautofailover--2.2--2.3.sql new file mode 100644 index 000000000..16e77a460 --- /dev/null +++ b/src/monitor/pgautofailover--2.2--2.3.sql @@ -0,0 +1,150 @@ +-- Copyright (c) Microsoft Corporation. All rights reserved. +-- Licensed under the PostgreSQL License. + +-- complain if script is sourced in psql, rather than via ALTER EXTENSION +\echo Use "ALTER EXTENSION pgautofailover UPDATE TO '2.3'" to load this file. \quit + +-- +-- Add region and replication_stall_since columns to pgautofailover.node. +-- +-- region: operator-assigned label for the data-centre or availability zone +-- the node lives in. Used in watch output and future topology-aware routing. +-- +-- replication_stall_since: set by node_active() the first time a PRIMARY node +-- reports an empty pg_stat_replication (no standby connected). Cleared when +-- a standby reconnects. The FSM uses this to transition to wait_primary after +-- pgautofailover.replication_stall_timeout elapses, unblocking writes in +-- 3-DC topologies where the primary↔standby link breaks while both nodes +-- remain reachable from the monitor (issue #997). +-- + +ALTER TABLE pgautofailover.node + ADD COLUMN IF NOT EXISTS region text not null default 'default', + ADD COLUMN IF NOT EXISTS replication_stall_since timestamptz; + + +-- +-- Replace current_state() with a version that also returns the region column. +-- + +DROP FUNCTION IF EXISTS pgautofailover.current_state(text); +DROP FUNCTION IF EXISTS pgautofailover.current_state(text, int); + +CREATE FUNCTION pgautofailover.current_state + ( + IN formation_id text default 'default', + OUT formation_kind text, + OUT nodename text, + OUT nodehost text, + OUT nodeport int, + OUT group_id int, + OUT node_id bigint, + OUT current_group_state pgautofailover.replication_state, + OUT assigned_group_state pgautofailover.replication_state, + OUT candidate_priority int, + OUT replication_quorum bool, + OUT reported_tli int, + OUT reported_lsn pg_lsn, + OUT health integer, + OUT nodecluster text, + OUT noderegion text + ) +RETURNS SETOF record LANGUAGE SQL STRICT +AS $$ + select kind, nodename, nodehost, nodeport, groupid, nodeid, + reportedstate, goalstate, + candidatepriority, replicationquorum, + reportedtli, reportedlsn, health, nodecluster, region + from pgautofailover.node + join pgautofailover.formation using(formationid) + where formationid = formation_id + order by groupid, nodeid; +$$; + +comment on function pgautofailover.current_state(text) + is 'get the current state of both nodes of a formation'; + +grant execute on function pgautofailover.current_state(text) + to autoctl_node; + +CREATE FUNCTION pgautofailover.current_state + ( + IN formation_id text, + IN group_id int, + OUT formation_kind text, + OUT nodename text, + OUT nodehost text, + OUT nodeport int, + OUT group_id int, + OUT node_id bigint, + OUT current_group_state pgautofailover.replication_state, + OUT assigned_group_state pgautofailover.replication_state, + OUT candidate_priority int, + OUT replication_quorum bool, + OUT reported_tli int, + OUT reported_lsn pg_lsn, + OUT health integer, + OUT nodecluster text, + OUT noderegion text + ) +RETURNS SETOF record LANGUAGE SQL STRICT +AS $$ + select kind, nodename, nodehost, nodeport, groupid, nodeid, + reportedstate, goalstate, + candidatepriority, replicationquorum, + reportedtli, reportedlsn, health, nodecluster, region + from pgautofailover.node + join pgautofailover.formation using(formationid) + where formationid = formation_id + and groupid = group_id + order by groupid, nodeid; +$$; + +comment on function pgautofailover.current_state(text, int) + is 'get the current state of both nodes of a group in a formation'; + +grant execute on function pgautofailover.current_state(text, int) + to autoctl_node; + + +-- +-- Replace register_node() with a version that accepts the new node_region +-- parameter. The old 13-argument form is dropped first so the new 14-argument +-- form can be created cleanly. +-- + +DROP FUNCTION IF EXISTS pgautofailover.register_node( + text, text, int, name, text, bigint, bigint, int, + pgautofailover.replication_state, text, int, bool, text); + +CREATE FUNCTION pgautofailover.register_node + ( + IN formation_id text, + IN node_host text, + IN node_port int, + IN dbname name, + IN node_name text default '', + IN sysidentifier bigint default 0, + IN desired_node_id bigint default -1, + IN desired_group_id int default -1, + IN initial_group_role pgautofailover.replication_state default 'init', + IN node_kind text default 'standalone', + IN candidate_priority int default 100, + IN replication_quorum bool default true, + IN node_cluster text default 'default', + IN node_region text default 'default', + OUT assigned_node_id bigint, + OUT assigned_group_id int, + OUT assigned_group_state pgautofailover.replication_state, + OUT assigned_candidate_priority int, + OUT assigned_replication_quorum bool, + OUT assigned_node_name text + ) +RETURNS record LANGUAGE C STRICT SECURITY DEFINER +AS 'MODULE_PATHNAME', $$register_node$$; + +grant execute on function + pgautofailover.register_node(text,text,int,name,text,bigint,bigint,int, + pgautofailover.replication_state,text, + int,bool,text,text) + to autoctl_node; diff --git a/src/monitor/pgautofailover--2.3--dummy.sql b/src/monitor/pgautofailover--2.3--dummy.sql new file mode 100644 index 000000000..7167ee175 --- /dev/null +++ b/src/monitor/pgautofailover--2.3--dummy.sql @@ -0,0 +1,6 @@ +-- +-- dummy extension update file that does nothing +-- +-- complain if script is sourced in psql, rather than via CREATE EXTENSION +\echo Use "ALTER EXTENSION pgautofailover UPDATE TO dummy" to load this file. \quit + diff --git a/src/monitor/pgautofailover.control b/src/monitor/pgautofailover.control index 458378593..081bc691b 100644 --- a/src/monitor/pgautofailover.control +++ b/src/monitor/pgautofailover.control @@ -1,5 +1,5 @@ comment = 'pg_auto_failover' -default_version = '2.2' +default_version = '2.3' module_pathname = '$libdir/pgautofailover' relocatable = false requires = 'btree_gist' diff --git a/src/monitor/pgautofailover.sql b/src/monitor/pgautofailover.sql index e0d154477..bded410b2 100644 --- a/src/monitor/pgautofailover.sql +++ b/src/monitor/pgautofailover.sql @@ -121,6 +121,8 @@ CREATE TABLE pgautofailover.node candidatepriority int not null default 100, replicationquorum bool not null default true, nodecluster text not null default 'default', + region text not null default 'default', + replication_stall_since timestamptz, -- node names must be unique in a given formation UNIQUE (formationid, nodename), @@ -256,6 +258,7 @@ CREATE FUNCTION pgautofailover.register_node IN candidate_priority int default 100, IN replication_quorum bool default true, IN node_cluster text default 'default', + IN node_region text default 'default', OUT assigned_node_id bigint, OUT assigned_group_id int, OUT assigned_group_state pgautofailover.replication_state, @@ -269,7 +272,7 @@ AS 'MODULE_PATHNAME', $$register_node$$; grant execute on function pgautofailover.register_node(text,text,int,name,text,bigint,bigint,int, pgautofailover.replication_state,text, - int,bool,text) + int,bool,text,text) to autoctl_node; @@ -603,14 +606,15 @@ CREATE FUNCTION pgautofailover.current_state OUT reported_tli int, OUT reported_lsn pg_lsn, OUT health integer, - OUT nodecluster text + OUT nodecluster text, + OUT noderegion text ) RETURNS SETOF record LANGUAGE SQL STRICT AS $$ select kind, nodename, nodehost, nodeport, groupid, nodeid, reportedstate, goalstate, candidatepriority, replicationquorum, - reportedtli, reportedlsn, health, nodecluster + reportedtli, reportedlsn, health, nodecluster, region from pgautofailover.node join pgautofailover.formation using(formationid) where formationid = formation_id @@ -640,14 +644,15 @@ CREATE FUNCTION pgautofailover.current_state OUT reported_tli int, OUT reported_lsn pg_lsn, OUT health integer, - OUT nodecluster text + OUT nodecluster text, + OUT noderegion text ) RETURNS SETOF record LANGUAGE SQL STRICT AS $$ select kind, nodename, nodehost, nodeport, groupid, nodeid, reportedstate, goalstate, candidatepriority, replicationquorum, - reportedtli, reportedlsn, health, nodecluster + reportedtli, reportedlsn, health, nodecluster, region from pgautofailover.node join pgautofailover.formation using(formationid) where formationid = formation_id diff --git a/src/monitor/sql/monitor.sql b/src/monitor/sql/monitor.sql index 3f80e5537..b8c0a0685 100644 --- a/src/monitor/sql/monitor.sql +++ b/src/monitor/sql/monitor.sql @@ -43,7 +43,8 @@ select * from pgautofailover.register_node('default', 'localhost', 9879, 'postgres'); select formationid, nodename, goalstate, reportedstate - from pgautofailover.node; + from pgautofailover.node + order by nodeid; table pgautofailover.formation; diff --git a/tests/tap/schedule b/tests/tap/schedule index 74733739c..23a7f4ec4 100644 --- a/tests/tap/schedule +++ b/tests/tap/schedule @@ -23,6 +23,7 @@ multi_ifdown multi_maintenance multi_alternate guard_data_loss +replication_stall_3dc fast_forward extension_update installcheck diff --git a/tests/tap/specs/replication_stall_3dc.pgaf b/tests/tap/specs/replication_stall_3dc.pgaf new file mode 100644 index 000000000..f6c298351 --- /dev/null +++ b/tests/tap/specs/replication_stall_3dc.pgaf @@ -0,0 +1,141 @@ +# Replication stall detection in a 3-DC topology. +# +# Background (issue #997): +# +# When the primary (dc1) and standby (dc2) lose connectivity while both +# remain reachable from the monitor (dc3), synchronous_standby_names stays +# set on the primary, causing every COMMIT to hang indefinitely. +# +# Fix: the monitor tracks replication_stall_since on the primary node row. +# As soon as the primary reports an empty pg_stat_replication sync_state +# (SYNC_STATE_UNKNOWN) for longer than +# pgautofailover.replication_stall_timeout (default 10 s), the FSM assigns +# wait_primary, which clears synchronous_standby_names and unblocks writes. +# +# Topology modelled here: +# +# dc1: primary (node1) — group 0 +# dc2: standby (node2) — group 0 +# dc3: monitor (compose host / pgaf-monitor service) +# +# The monitor is always reachable from both nodes (same Docker network), but +# we can sever the dc1↔dc2 link with `docker network disconnect`. +# This replicates the 3-DC split-brain scenario without requiring three +# separate Docker networks. +# +# Predecessor: none (new regression test for issue #997) + +cluster { + monitor + formation { + node1 region dc1 + node2 region dc2 candidate-priority 50 + } +} + +setup { + # Wait for the initial topology to be healthy before starting steps + wait until node1 state = primary timeout 120s + wait until node2 state = secondary timeout 120s + + # Pre-create the smoke table used in write-check steps + sql node1 { + CREATE TABLE smoke (id serial PRIMARY KEY, v int); + INSERT INTO smoke (v) VALUES (0); + } + sql node2 { SELECT count(*) FROM smoke; } + expect { 1 } +} + +teardown { + # Restore node2 network access even if the test failed + network connect node2 + compose down +} + +# +# step 1: confirm synchronous_standby_names is active on the primary. +# + +step test_001_verify_sync_replication { + sql node1 { SHOW synchronous_standby_names; } + # value matches "ANY 1 (pgautofailover_standby_)" + expect { ANY 1 } + + # Write succeeds: the standby is connected and acknowledges immediately + sql node1 { INSERT INTO smoke (v) VALUES (1); } + sql node2 { SELECT max(v) FROM smoke; } + expect { 1 } +} + +# +# step 2: cut the dc1↔dc2 replication link. +# +# Both nodes remain able to reach the monitor; only the direct peer link +# between node1 and node2 is severed. +# + +step test_002_cut_replication_link { + # Disconnect node2 from the Docker network: the primary (node1) loses + # its standby connection while still reaching the monitor itself. + network disconnect node2 +} + +# +# step 3: the monitor must assign wait_primary within +# replication_stall_timeout (10 s default) + one keeper loop (5 s default). +# Allow up to 60 s total. +# + +step test_003_primary_becomes_wait_primary { + wait until node1 state = wait_primary timeout 60s + assert node1 state = wait_primary +} + +# +# step 4: verify that writes no longer hang. +# +# In wait_primary synchronous_standby_names is cleared, so COMMIT returns +# without waiting for the (now-unreachable) standby. +# + +step test_004_writes_unblock { + sql node1 { SHOW synchronous_standby_names; } + expect { } + + sql node1 { INSERT INTO smoke (v) VALUES (2); } + sql node1 { SELECT max(v) FROM smoke; } + expect { 2 } +} + +# +# step 5: restore the dc1↔dc2 link and let the standby re-join. +# + +step test_005_restore_link { + network connect node2 + + wait until node2 state = secondary timeout 120s + wait until node1 state = primary timeout 120s +} + +# +# step 6: confirm the cluster is healthy again and replication is in sync. +# + +step test_006_replication_restored { + sql node1 { SHOW synchronous_standby_names; } + expect { ANY 1 } + + # Row written during the stall must have replicated + sql node2 { SELECT max(v) FROM smoke; } + expect { 2 } +} + +sequence + test_001_verify_sync_replication + test_002_cut_replication_link + test_003_primary_becomes_wait_primary + test_004_writes_unblock + test_005_restore_link + test_006_replication_restored diff --git a/tests/tap/specs/upgrade.pgaf b/tests/tap/specs/upgrade.pgaf index 754a2d331..64a3cb48f 100644 --- a/tests/tap/specs/upgrade.pgaf +++ b/tests/tap/specs/upgrade.pgaf @@ -33,17 +33,21 @@ # PGVERSION=17 make -C tests/upgrade pgaf-current pgaf-next # if needed. # -# Note on Postgres restart: the previous release (v2.1) contains a bug where -# keeper_pg_init_and_register calls keeper_ensure_node_has_been_dropped without -# first calling monitor_init, so the check connects to local Postgres instead of -# the monitor and fails with "schema pgautofailover does not exist". The v2.1 -# supervisor retries 5 times in rapid succession, then exits, which takes the -# container down. The v2.2 binary fixes this (monitor_init is now called -# first). The upgrade procedure therefore restarts each data-node container -# after the old supervisor dies; docker preserves the volume so Postgres data -# is intact, and Postgres itself restarts cleanly from its on-disk state. -# Future upgrades from v2.2 will not need this container restart because the -# v2.2 supervisor correctly re-execs the new binary without triggering the bug. +# Note on Postgres restart: PREV_TAG auto-detects to the latest released tag +# that isn't the current in-development version (see tests/upgrade/Makefile), +# so this spec now exercises v2.2 -> v2.3. v2.1 had a bug where +# keeper_pg_init_and_register called keeper_ensure_node_has_been_dropped +# without first calling monitor_init, so the check connected to local +# Postgres instead of the monitor and failed with "schema pgautofailover +# does not exist" -- the v2.1 supervisor retried 5 times in rapid succession, +# then exited, taking the container down, and the upgrade procedure had to +# restart each data-node container to recover. v2.2 already carries the fix +# (monitor_init is now called first), so for a v2.2 -> v2.3 upgrade the old +# supervisor's node-active child re-execs in place and the container never +# goes down. The "compose start" calls below (test_003b_wait_keeper_restart) +# are consequently expected to be harmless no-ops against still-running +# containers, kept so this spec still exercises the restart path correctly +# whenever PREV_TAG is later pinned back to a pre-v2.2 release. cluster { monitor @@ -80,7 +84,7 @@ step test_001_baseline { FROM pg_available_extensions WHERE name = 'pgautofailover'; } - expect { 2.1 } + expect { 2.2 } } # ------------------------------------------------------------------------- @@ -112,8 +116,9 @@ step test_002_inject_node_binaries { # overwrites the file on disk -- new backends forked from it still see the # old, pre-restart library image. "ALTER EXTENSION ... UPDATE" validates # every CREATE FUNCTION in the upgrade script by dlsym-ing that in-memory -# library; a function that exists only in the new .so (added by this branch, -# with no v2.1 equivalent) can't resolve there and CREATE FUNCTION fails with +# library; a function that exists only in the new .so (added after the +# PREV_TAG release, with no equivalent there) can't resolve there and +# CREATE FUNCTION fails with # "could not find function ... in file ...". Existing, unchanged functions # don't expose this because their symbols were already present pre-restart. # Restarting first makes the new postmaster load the new .so (already on @@ -144,7 +149,7 @@ step test_003_upgrade_monitor { exec monitor pg_autoctl inspect pgsetup wait --pgdata /var/lib/postgres/pgaf --read-write --timeout 30 # Upgrade the extension catalog, now that the restarted postmaster has # the next pgautofailover.so loaded. - exec monitor psql -U docker -d pg_auto_failover -c "ALTER EXTENSION pgautofailover UPDATE TO '2.2'" + exec monitor psql -U docker -d pg_auto_failover -c "ALTER EXTENSION pgautofailover UPDATE TO '2.3'" } # ------------------------------------------------------------------------- @@ -215,7 +220,7 @@ step test_006_verify_extension_version { FROM pg_available_extensions WHERE name = 'pgautofailover'; } - expect { 2.2 } + expect { 2.3 } } # -------------------------------------------------------------------------