"use strict";
// -*- mode: js; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Genie
//
// Copyright 2020 The Board of Trustees of the Leland Stanford Junior University
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: Giovanni Campagna <gcampagn@cs.stanford.edu>
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// Coref question templates: questions about the current result, referred by coreference ("it", "that", "the restaurant")
const assert_1 = __importDefault(require("assert"));
const C = __importStar(require("../../ast_manip"));
const D = __importStar(require("../../dialogue_acts"));
async function default_1($runtime, $ttUtils, $options, $locale, $grammar, $loader) {
    $grammar.declareSymbol("out_param_list_for_coref_question");
    $grammar.addRule("out_param_list_for_coref_question", [new $runtime.NonTerminal("out_param_Any", undefined), "and", new $runtime.NonTerminal("out_param_Any", ["functionName", 0, "functionName"])], ((p1, $0, p2) => {
        if (p1.name === 'id' || p2.name === 'id' || p1.name === p2.name)
            return null;
        assert_1.default(C.isSameFunction(p1.schema, p2.schema));
        return [p1, p2];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("out_param_list_for_coref_question", [new $runtime.NonTerminal("out_param_Any", undefined), ",", new $runtime.NonTerminal("out_param_Any", ["functionName", 0, "functionName"]), new $runtime.Choice([",", ""]), "and", new $runtime.NonTerminal("out_param_Any", ["functionName", 0, "functionName"])], ((p1, $0, p2, $1, $2, p3) => {
        if (p1.name === 'id' || p2.name === 'id' || p3.name === 'id')
            return null;
        if (p1.name === p2.name || p2.name === p3.name || p1.name === p3.name)
            return null;
        assert_1.default(C.isSameFunction(p1.schema, p2.schema));
        assert_1.default(C.isSameFunction(p1.schema, p3.schema));
        return [p1, p2, p3];
    }), C.paramArrayKeyFn, {});
    $grammar.declareSymbol("simple_user_search_question");
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "what is", new $runtime.Choice(["the", "its"]), new $runtime.NonTerminal("out_param_Any", undefined), "?"], (($0, $1, $2, param, $3) => {
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["can you tell me", new $runtime.Choice(["the", "its"]), new $runtime.NonTerminal("out_param_Any", undefined), "?"], (($0, $1, param, $2) => {
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "what", new $runtime.NonTerminal("out_param_Any", undefined), "does it have ?"], (($0, $1, param, $2) => {
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["the", "its"]), new $runtime.NonTerminal("out_param_Any", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, param, $3, $4) => {
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i need", new $runtime.Choice(["the", "its"]), new $runtime.NonTerminal("out_param_Any", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, param, $2, $3) => {
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i just need", new $runtime.Choice(["the", "its"]), new $runtime.NonTerminal("out_param_Any", undefined), "."], (($0, $1, param, $2) => {
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "what", new $runtime.Choice(["is", "are"]), new $runtime.Choice(["the", "its"]), new $runtime.NonTerminal("out_param_list_for_coref_question", undefined), "?"], (($0, $1, $2, $3, params, $4) => params), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["can you tell me", new $runtime.Choice(["the", "its"]), new $runtime.NonTerminal("out_param_list_for_coref_question", undefined), "?"], (($0, $1, params, $2) => params), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["the", "its"]), new $runtime.NonTerminal("out_param_list_for_coref_question", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, params, $3, $4) => params), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i need", new $runtime.Choice(["the", "its"]), new $runtime.NonTerminal("out_param_list_for_coref_question", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, params, $2, $3) => params), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i just need", new $runtime.Choice(["the", "its"]), new $runtime.NonTerminal("out_param_list_for_coref_question", undefined), "."], (($0, $1, params, $2) => params), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "what is", "the", new $runtime.NonTerminal("out_param_Any", undefined), "of the", new $runtime.NonTerminal("base_table", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, param, $3, base, $4) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["can you tell me", "the", new $runtime.NonTerminal("out_param_Any", undefined), "of the", new $runtime.NonTerminal("base_table", ["functionName", 2, "functionName"]), "?"], (($0, $1, param, $2, base, $3) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "what", new $runtime.NonTerminal("out_param_Any", undefined), "does the", new $runtime.NonTerminal("base_table", ["functionName", 2, "functionName"]), "have ?"], (($0, $1, param, $2, base, $3) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), "the", new $runtime.NonTerminal("out_param_Any", undefined), "of the", new $runtime.NonTerminal("base_table", ["functionName", 3, "functionName"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, param, $3, base, $4, $5) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i just need", new $runtime.Choice(["the", "its"]), "the", new $runtime.NonTerminal("out_param_Any", undefined), "of the", new $runtime.NonTerminal("base_table", ["functionName", 3, "functionName"]), "."], (($0, $1, $2, param, $3, base, $4) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "what is", "the", new $runtime.NonTerminal("base_table", undefined), "'s", new $runtime.NonTerminal("out_param_Any", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, $3, param, $4) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["can you tell me", "the", new $runtime.NonTerminal("base_table", undefined), "'s", new $runtime.NonTerminal("out_param_Any", ["functionName", 2, "functionName"]), "?"], (($0, $1, base, $2, param, $3) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), "the", new $runtime.NonTerminal("base_table", undefined), "'s", new $runtime.NonTerminal("out_param_Any", ["functionName", 3, "functionName"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, base, $3, param, $4, $5) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i just need", new $runtime.Choice(["the", "its"]), "the", new $runtime.NonTerminal("base_table", undefined), "'s", new $runtime.NonTerminal("out_param_Any", ["functionName", 3, "functionName"]), "."], (($0, $1, $2, base, $3, param, $4) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "what", new $runtime.Choice(["is", "are"]), "the", new $runtime.NonTerminal("out_param_list_for_coref_question", undefined), "of the", new $runtime.NonTerminal("base_table", ["functionName", 4, "functionName"]), "?"], (($0, $1, $2, $3, params, $4, base, $5) => {
        if (!params.every((p) => C.isSameFunction(base.schema, p.schema)))
            return null;
        return params;
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["can you tell me", "the", new $runtime.NonTerminal("out_param_list_for_coref_question", undefined), "of the", new $runtime.NonTerminal("base_table", ["functionName", 2, "functionName"]), "?"], (($0, $1, params, $2, base, $3) => {
        if (!params.every((p) => C.isSameFunction(base.schema, p.schema)))
            return null;
        return params;
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "what", new $runtime.NonTerminal("out_param_list_for_coref_question", undefined), "does the", new $runtime.NonTerminal("base_table", ["functionName", 2, "functionName"]), "have ?"], (($0, $1, params, $2, base, $3) => {
        if (!params.every((p) => C.isSameFunction(base.schema, p.schema)))
            return null;
        return params;
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), "the", new $runtime.NonTerminal("out_param_list_for_coref_question", undefined), "of the", new $runtime.NonTerminal("base_table", ["functionName", 3, "functionName"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, params, $3, base, $4, $5) => {
        if (!params.every((p) => C.isSameFunction(base.schema, p.schema)))
            return null;
        return params;
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i just need", new $runtime.Choice(["the", "its"]), "the", new $runtime.NonTerminal("out_param_list_for_coref_question", undefined), "of the", new $runtime.NonTerminal("base_table", ["functionName", 3, "functionName"]), "."], (($0, $1, $2, params, $3, base, $4) => {
        if (!params.every((p) => C.isSameFunction(base.schema, p.schema)))
            return null;
        return params;
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "what is", "the", new $runtime.NonTerminal("base_table", undefined), "'s", new $runtime.NonTerminal("out_param_list_for_coref_question", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, $3, params, $4) => {
        if (!params.every((p) => C.isSameFunction(base.schema, p.schema)))
            return null;
        return params;
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["can you tell me", "the", new $runtime.NonTerminal("base_table", undefined), "'s", new $runtime.NonTerminal("out_param_list_for_coref_question", ["functionName", 2, "functionName"]), "?"], (($0, $1, base, $2, params, $3) => {
        if (!params.every((p) => C.isSameFunction(base.schema, p.schema)))
            return null;
        return params;
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), "the", new $runtime.NonTerminal("base_table", undefined), "'s", new $runtime.NonTerminal("out_param_list_for_coref_question", ["functionName", 3, "functionName"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, base, $3, params, $4, $5) => {
        if (!params.every((p) => C.isSameFunction(base.schema, p.schema)))
            return null;
        return params;
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i just need", new $runtime.Choice(["the", "its"]), "the", new $runtime.NonTerminal("base_table", undefined), "'s", new $runtime.NonTerminal("out_param_list_for_coref_question", ["functionName", 3, "functionName"]), "."], (($0, $1, $2, base, $3, params, $4) => {
        if (!params.every((p) => C.isSameFunction(base.schema, p.schema)))
            return null;
        return params;
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "does", new $runtime.Choice(["it", "this", "that"]), "have", new $runtime.NonTerminal("npp_boolean_projection", undefined), "?"], (($0, $1, $2, $3, param, $4) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "is", "there", new $runtime.NonTerminal("npp_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["it", "this", "that"]), "has", new $runtime.NonTerminal("npp_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), "there", "is", new $runtime.NonTerminal("npp_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "does", new $runtime.Choice(["it", "this", "that"]), new $runtime.NonTerminal("avp_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["it", "this", "that"]), new $runtime.NonTerminal("avp_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, param, $4, $5) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "is", new $runtime.Choice(["it", "this", "that"]), new $runtime.NonTerminal("pvp_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["it", "this", "that"]), "is", new $runtime.NonTerminal("pvp_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "is", new $runtime.Choice(["it", "this", "that"]), new $runtime.NonTerminal("preposition_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["it", "this", "that"]), "is", new $runtime.NonTerminal("preposition_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "is", "it", new $runtime.NonTerminal("npi_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["it", "this", "that"]), "is", new $runtime.NonTerminal("npi_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "is", "it", new $runtime.NonTerminal("npv_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["it", "this", "that"]), "is", new $runtime.NonTerminal("npv_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "is", "it", new $runtime.NonTerminal("apv_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["it", "this", "that"]), "is", new $runtime.NonTerminal("apv_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "does", "the", new $runtime.NonTerminal("base_table", undefined), "have", new $runtime.NonTerminal("npp_boolean_projection", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, $3, param, $4) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), "the", new $runtime.NonTerminal("base_table", undefined), "has", new $runtime.NonTerminal("npp_boolean_projection", ["functionName", 4, "functionName"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, base, $4, param, $5, $6) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "does", "the", new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("avp_boolean_projection", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, param, $3) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), "the", new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("avp_boolean_projection", ["functionName", 4, "functionName"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, base, param, $4, $5) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "is", "the", new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("pvp_boolean_projection", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, param, $3) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), "the", new $runtime.NonTerminal("base_table", undefined), "is", new $runtime.NonTerminal("pvp_boolean_projection", ["functionName", 4, "functionName"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, base, $4, param, $5, $6) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "is", "the", new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("preposition_boolean_projection", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, param, $3) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), "the", new $runtime.NonTerminal("base_table", undefined), "is", new $runtime.NonTerminal("preposition_boolean_projection", ["functionName", 4, "functionName"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, base, $4, param, $5, $6) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "is", "the", new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("npi_boolean_projection", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, param, $3) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), "the", new $runtime.NonTerminal("base_table", undefined), "is", new $runtime.NonTerminal("npi_boolean_projection", ["functionName", 4, "functionName"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, base, $4, param, $5, $6) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "is", "the", new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("npv_boolean_projection", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, param, $3) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), "the", new $runtime.NonTerminal("base_table", undefined), "is", new $runtime.NonTerminal("npv_boolean_projection", ["functionName", 4, "functionName"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, base, $4, param, $5, $6) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), "is", "the", new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("apv_boolean_projection", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, param, $3) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), "the", new $runtime.NonTerminal("base_table", undefined), "is", new $runtime.NonTerminal("apv_boolean_projection", ["functionName", 4, "functionName"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, base, $4, param, $5, $6) => {
        assert_1.default(C.isSameFunction(base.schema, param.schema));
        return [param];
    }), C.paramArrayKeyFn, {});
    for (const proj of $loader.projections) {
        if (proj.category === 'pvp' || proj.category === 'preposition') {
            $grammar.declareSymbol("simple_user_search_question");
            $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), proj.pronoun, proj.base, new $runtime.Choice(["is", "was", "are", "were"]), new $runtime.Choice(["it", "this", "that"]), proj.canonical, "?"], (($0, $1, $2, $3, $4, $5, $6) => {
                if (proj.pname === 'id')
                    return null;
                return [proj.pslot];
            }), C.paramArrayKeyFn, {});
            $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), proj.pronoun, proj.base, new $runtime.Choice(["it", "this", "that"]), new $runtime.Choice(["is", "was", "are", "were"]), proj.canonical, new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, $5, $6, $7, $8) => {
                if (proj.pname === 'id')
                    return null;
                return [proj.pslot];
            }), C.paramArrayKeyFn, {});
            $grammar.declareSymbol("simple_user_search_question");
            $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), proj.pronoun, proj.base, new $runtime.Choice(["is", "was", "are", "were"]), "the", new $runtime.NonTerminal("base_table", undefined), proj.canonical, "?"], (($0, $1, $2, $3, $4, base, $5, $6) => {
                if (!C.isSameFunction(base.schema, proj.pslot.schema))
                    return null;
                if (proj.pname === 'id')
                    return null;
                return [proj.pslot];
            }), C.paramArrayKeyFn, {});
            $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), proj.pronoun, proj.base, "the", new $runtime.NonTerminal("base_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), new $runtime.Choice(["is", "was", "are", "were"]), proj.canonical, new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, base, $5, $6, $7, $8) => {
                if (!C.isSameFunction(base.schema, proj.pslot.schema))
                    return null;
                if (proj.pname === 'id')
                    return null;
                return [proj.pslot];
            }), C.paramArrayKeyFn, {});
            if (proj.base) {
                $grammar.declareSymbol("simple_user_search_question");
                $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), "the", proj.base, new $runtime.Choice(["that", "which", ""]), new $runtime.Choice(["it", "this", "that"]), new $runtime.Choice(["is", "was", "are", "were"]), proj.canonical, new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) => {
                    if (proj.pname === 'id')
                        return null;
                    return [proj.pslot];
                }), C.paramArrayKeyFn, {});
                $grammar.declareSymbol("simple_user_search_question");
                $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), "the", proj.base, new $runtime.Choice(["that", "which", ""]), "the", new $runtime.NonTerminal("base_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), new $runtime.Choice(["is", "was", "are", "were"]), proj.canonical, new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, $5, base, $6, $7, $8, $9) => {
                    if (!C.isSameFunction(base.schema, proj.pslot.schema))
                        return null;
                    if (proj.pname === 'id')
                        return null;
                    return [proj.pslot];
                }), C.paramArrayKeyFn, {});
            }
        }
        if (proj.category === 'avp') {
            $grammar.declareSymbol("simple_user_search_question");
            $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), proj.pronoun, proj.base, new $runtime.Choice(["do", "does", "did"]), new $runtime.Choice(["it", "this", "that"]), proj.canonical, "?"], (($0, $1, $2, $3, $4, $5, $6) => {
                if (proj.pname === 'id')
                    return null;
                return [proj.pslot];
            }), C.paramArrayKeyFn, {});
            $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), proj.pronoun, proj.base, new $runtime.Choice(["it", "this", "that"]), proj.canonical, new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, $5, $6, $7) => {
                if (proj.pname === 'id')
                    return null;
                return [proj.pslot];
            }), C.paramArrayKeyFn, {});
            $grammar.declareSymbol("simple_user_search_question");
            $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), proj.pronoun, proj.base, new $runtime.Choice(["do", "does", "did"]), "the", new $runtime.NonTerminal("base_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), proj.canonical, "?"], (($0, $1, $2, $3, $4, base, $5, $6) => {
                if (!C.isSameFunction(base.schema, proj.pslot.schema))
                    return null;
                if (proj.pname === 'id')
                    return null;
                return [proj.pslot];
            }), C.paramArrayKeyFn, {});
            $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), proj.pronoun, proj.base, "the", new $runtime.NonTerminal("base_table", undefined), proj.canonical, new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, base, $5, $6, $7) => {
                if (!C.isSameFunction(base.schema, proj.pslot.schema))
                    return null;
                if (proj.pname === 'id')
                    return null;
                return [proj.pslot];
            }), C.paramArrayKeyFn, {});
            if (proj.base) {
                $grammar.declareSymbol("simple_user_search_question");
                $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), "the", proj.base, new $runtime.Choice(["that", "which", ""]), new $runtime.Choice(["it", "this", "that"]), proj.canonical, new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, $5, $6, $7, $8) => {
                    if (proj.pname === 'id')
                        return null;
                    return [proj.pslot];
                }), C.paramArrayKeyFn, {});
                $grammar.declareSymbol("simple_user_search_question");
                $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), "the", proj.base, new $runtime.Choice(["that", "which", ""]), "the", new $runtime.NonTerminal("base_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), proj.canonical, new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, $5, base, $6, $7, $8) => {
                    if (!C.isSameFunction(base.schema, proj.pslot.schema))
                        return null;
                    if (proj.pname === 'id')
                        return null;
                    return [proj.pslot];
                }), C.paramArrayKeyFn, {});
            }
        }
        if (proj.category === 'reverse_verb') {
            $grammar.declareSymbol("simple_user_search_question");
            $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), proj.pronoun, proj.base, proj.canonical, new $runtime.Choice(["it", "this", "that"]), "?"], (($0, $1, $2, $3, $4, $5) => {
                if (proj.pname === 'id')
                    return null;
                return [proj.pslot];
            }), C.paramArrayKeyFn, {});
            $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), proj.pronoun, proj.base, proj.canonical, new $runtime.Choice(["it", "this", "that"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, $5, $6, $7) => {
                if (proj.pname === 'id')
                    return null;
                return [proj.pslot];
            }), C.paramArrayKeyFn, {});
            $grammar.declareSymbol("simple_user_search_question");
            $grammar.addRule("simple_user_search_question", [new $runtime.Choice(["can you tell me", ""]), proj.pronoun, proj.base, proj.canonical, "the", new $runtime.NonTerminal("base_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), "?"], (($0, $1, $2, $3, $4, base, $5) => {
                if (!C.isSameFunction(base.schema, proj.pslot.schema))
                    return null;
                if (proj.pname === 'id')
                    return null;
                return [proj.pslot];
            }), C.paramArrayKeyFn, {});
            $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), proj.pronoun, proj.base, proj.canonical, "the", new $runtime.NonTerminal("base_table", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, $5, base, $6, $7) => {
                if (!C.isSameFunction(base.schema, proj.pslot.schema))
                    return null;
                if (proj.pname === 'id')
                    return null;
                return [proj.pslot];
            }), C.paramArrayKeyFn, {});
            if (proj.base) {
                $grammar.declareSymbol("simple_user_search_question");
                $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), "the", proj.base, new $runtime.Choice(["that", "which", ""]), proj.canonical, new $runtime.Choice(["it", "this", "that"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, $5, $6, $7, $8) => {
                    if (proj.pname === 'id')
                        return null;
                    return [proj.pslot];
                }), C.paramArrayKeyFn, {});
                $grammar.declareSymbol("simple_user_search_question");
                $grammar.addRule("simple_user_search_question", ["i would like to", new $runtime.Choice(["know", "see"]), "the", proj.base, new $runtime.Choice(["that", "which", ""]), proj.canonical, "the", new $runtime.NonTerminal("base_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, $5, $6, base, $7, $8) => {
                    if (!C.isSameFunction(base.schema, proj.pslot.schema))
                        return null;
                    if (proj.pname === 'id')
                        return null;
                    return [proj.pslot];
                }), C.paramArrayKeyFn, {});
            }
        }
    }
    $grammar.declareSymbol("simple_user_search_question_for_list");
    $grammar.addRule("simple_user_search_question_for_list", [new $runtime.Choice(["can you tell me", ""]), "what are", new $runtime.Choice(["the", "their"]), new $runtime.NonTerminal("out_param_Any", undefined), "?"], (($0, $1, $2, param, $3) => {
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", ["can you tell me", new $runtime.Choice(["the", "their"]), new $runtime.NonTerminal("out_param_Any", undefined), "?"], (($0, $1, param, $2) => {
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", ["can you tell me", "the", new $runtime.NonTerminal("out_param_Any", undefined), new $runtime.Choice(["for both of them", "for all of them"]), "?"], (($0, $1, param, $2, $3) => {
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", [new $runtime.Choice(["can you tell me", ""]), "what", new $runtime.NonTerminal("out_param_Any", undefined), "does it have ?"], (($0, $1, param, $2) => {
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["both of", ""]), new $runtime.Choice(["the", "their"]), new $runtime.NonTerminal("out_param_Any", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, param, $4, $5) => {
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", ["i need", new $runtime.Choice(["the", "their"]), new $runtime.NonTerminal("out_param_Any", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, param, $2, $3) => {
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", ["i just need", new $runtime.Choice(["the", "their"]), new $runtime.NonTerminal("out_param_Any", undefined), "."], (($0, $1, param, $2) => {
        if (param.name === 'id')
            return null;
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", [new $runtime.Choice(["can you tell me", ""]), "do", new $runtime.Choice(["they", "these", "those"]), "have", new $runtime.NonTerminal("npp_boolean_projection", undefined), "?"], (($0, $1, $2, $3, param, $4) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", [new $runtime.Choice(["can you tell me", ""]), "are", "there", new $runtime.NonTerminal("npp_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["they", "these", "those"]), "have", new $runtime.NonTerminal("npp_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), "there", "are", new $runtime.NonTerminal("npp_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", [new $runtime.Choice(["can you tell me", ""]), "do", new $runtime.Choice(["they", "these", "those"]), new $runtime.NonTerminal("avp_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["they", "these", "those"]), new $runtime.NonTerminal("avp_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, param, $4, $5) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", [new $runtime.Choice(["can you tell me", ""]), "are", new $runtime.Choice(["they", "these", "those"]), new $runtime.NonTerminal("pvp_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["they", "these", "those"]), "are", new $runtime.NonTerminal("pvp_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", [new $runtime.Choice(["can you tell me", ""]), "are", new $runtime.Choice(["they", "these", "those"]), new $runtime.NonTerminal("preposition_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["they", "these", "those"]), "are", new $runtime.NonTerminal("preposition_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", [new $runtime.Choice(["can you tell me", ""]), "are", new $runtime.Choice(["they", "these", "those"]), new $runtime.NonTerminal("npi_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["they", "these", "those"]), "are", new $runtime.NonTerminal("npi_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", [new $runtime.Choice(["can you tell me", ""]), "are", new $runtime.Choice(["they", "these", "those"]), new $runtime.NonTerminal("npv_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["they", "these", "those"]), "are", new $runtime.NonTerminal("npv_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", [new $runtime.Choice(["can you tell me", ""]), "are", new $runtime.Choice(["they", "these", "those"]), new $runtime.NonTerminal("apv_boolean_projection", undefined), "?"], (($0, $1, $2, param, $3) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("simple_user_search_question_for_list", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.Choice(["if", "whether"]), new $runtime.Choice(["they", "these", "those"]), "are", new $runtime.NonTerminal("apv_boolean_projection", undefined), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, $3, $4, param, $5, $6) => {
        return [param];
    }), C.paramArrayKeyFn, {});
    $grammar.declareSymbol("boolean_user_search_question");
    $grammar.addRule("boolean_user_search_question", ["does", new $runtime.Choice(["that", "it", "this"]), "have", new $runtime.NonTerminal("npp_filter", undefined), "?"], (($0, $1, $2, param, $3) => D.booleanQuestion(null, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question", ["does", new $runtime.Choice(["that", "it", "this"]), new $runtime.NonTerminal("avp_filter", undefined), "?"], (($0, $1, param, $2) => D.booleanQuestion(null, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question", ["is", new $runtime.Choice(["that", "it", "this"]), "a", new $runtime.NonTerminal("apv_filter", undefined), new $runtime.NonTerminal("base_table", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, param, base, $3) => {
        if (!base.schema.is_list)
            return null;
        return D.booleanQuestion(base, param);
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question", ["is", new $runtime.Choice(["the", "this", "that"]), new $runtime.NonTerminal("base_table", ["is_list", (true)]), new $runtime.NonTerminal("apv_filter", ["functionName", 2, "functionName"]), "?"], (($0, $1, base, param, $2) => {
        if (!base.schema.is_list)
            return null;
        return D.booleanQuestion(base, param);
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question", ["is", new $runtime.Choice(["that", "it", "this"]), "a", new $runtime.NonTerminal("base_table", ["is_list", (true)]), new $runtime.NonTerminal("pvp_filter", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, param, $3) => {
        if (!base.schema.is_list)
            return null;
        return D.booleanQuestion(base, param);
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question", ["is", new $runtime.Choice(["the", "this", "that"]), new $runtime.NonTerminal("base_table", ["is_list", (true)]), new $runtime.NonTerminal("pvp_filter", ["functionName", 2, "functionName"]), "?"], (($0, $1, base, param, $2) => {
        if (!base.schema.is_list)
            return null;
        return D.booleanQuestion(base, param);
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question", ["is", new $runtime.Choice(["that", "it", "this"]), "a", new $runtime.NonTerminal("base_table", ["is_list", (true)]), new $runtime.NonTerminal("preposition_filter", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, param, $3) => {
        if (!base.schema.is_list)
            return null;
        return D.booleanQuestion(base, param);
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question", ["is", new $runtime.Choice(["the", "this", "that"]), new $runtime.NonTerminal("base_table", ["is_list", (true)]), new $runtime.NonTerminal("preposition_filter", ["functionName", 2, "functionName"]), "?"], (($0, $1, base, param, $2) => {
        if (!base.schema.is_list)
            return null;
        return D.booleanQuestion(base, param);
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question", ["is", new $runtime.Choice(["that", "it", "this"]), "a", new $runtime.NonTerminal("base_table", ["is_list", (true)]), new $runtime.Choice(["that", "which"]), new $runtime.NonTerminal("avp_filter", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, $3, param, $4) => {
        if (!base.schema.is_list)
            return null;
        return D.booleanQuestion(base, param);
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question", ["does", new $runtime.Choice(["the", "this", "that"]), new $runtime.NonTerminal("base_table", ["is_list", (true)]), new $runtime.NonTerminal("avp_filter", ["functionName", 2, "functionName"]), "?"], (($0, $1, base, param, $2) => {
        if (!base.schema.is_list)
            return null;
        return D.booleanQuestion(base, param);
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question", ["is", new $runtime.Choice(["that", "it", "this"]), "a", new $runtime.NonTerminal("base_table", ["is_list", (true)]), new $runtime.Choice(["that has", "with"]), new $runtime.NonTerminal("npp_filter", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, $3, param, $4) => {
        if (!base.schema.is_list)
            return null;
        return D.booleanQuestion(base, param);
    }), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question", ["does", new $runtime.Choice(["the", "this", "that"]), new $runtime.NonTerminal("base_table", ["is_list", (true)]), "have", new $runtime.NonTerminal("npp_filter", ["functionName", 2, "functionName"]), "?"], (($0, $1, base, $2, param, $3) => {
        if (!base.schema.is_list)
            return null;
        return D.booleanQuestion(base, param);
    }), C.paramArrayKeyFn, {});
    $grammar.declareSymbol("boolean_user_search_question_for_list");
    $grammar.addRule("boolean_user_search_question_for_list", [new $runtime.Choice(["does either of", "does any of"]), new $runtime.Choice(["them", "these", "those"]), "have", new $runtime.NonTerminal("npp_filter", undefined), "?"], (($0, $1, $2, param, $3) => D.booleanQuestion(null, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", ["do", "they", "have", new $runtime.NonTerminal("npp_filter", undefined), "?"], (($0, $1, $2, param, $3) => D.booleanQuestion(null, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", [new $runtime.Choice(["does either of", "does any of"]), new $runtime.Choice(["them", "these", "those"]), new $runtime.NonTerminal("avp_filter", undefined), "?"], (($0, $1, param, $2) => D.booleanQuestion(null, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", ["do they", new $runtime.NonTerminal("avp_filter", undefined), "?"], (($0, param, $1) => D.booleanQuestion(null, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", [new $runtime.Choice(["is either of", "is any of"]), new $runtime.Choice(["them", "these", "those"]), "a", new $runtime.NonTerminal("apv_filter", undefined), new $runtime.NonTerminal("base_table", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, param, base, $3) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", ["are they", new $runtime.NonTerminal("apv_filter", undefined), new $runtime.NonTerminal("base_table", ["functionName", 1, "functionName"]), "?"], (($0, param, base, $1) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", ["are", new $runtime.Choice(["the", "these", "those"]), new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("apv_filter", ["functionName", 2, "functionName"]), "?"], (($0, $1, base, param, $2) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", [new $runtime.Choice(["is either of", "is any of"]), new $runtime.Choice(["them", "these", "those"]), "a", new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("pvp_filter", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, param, $3) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", ["are they", new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("pvp_filter", ["functionName", 1, "functionName"]), "?"], (($0, base, param, $1) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", ["are", new $runtime.Choice(["the", "these", "those"]), new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("pvp_filter", ["functionName", 2, "functionName"]), "?"], (($0, $1, base, param, $2) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", [new $runtime.Choice(["is either of", "is any of"]), new $runtime.Choice(["them", "these", "those"]), "a", new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("preposition_filter", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, param, $3) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", ["are they", new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("preposition_filter", ["functionName", 1, "functionName"]), "?"], (($0, base, param, $1) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", ["are", new $runtime.Choice(["the", "these", "those"]), new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("preposition_filter", ["functionName", 2, "functionName"]), "?"], (($0, $1, base, param, $2) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", [new $runtime.Choice(["is either of", "is any of"]), new $runtime.Choice(["them", "these", "those"]), "a", new $runtime.NonTerminal("base_table", undefined), new $runtime.Choice(["that", "which"]), new $runtime.NonTerminal("avp_filter", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, $3, param, $4) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", ["are they", new $runtime.NonTerminal("base_table", undefined), new $runtime.Choice(["that", "which"]), new $runtime.NonTerminal("avp_filter", ["functionName", 1, "functionName"]), "?"], (($0, base, $1, param, $2) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", ["do", new $runtime.Choice(["the", "these", "those"]), new $runtime.NonTerminal("base_table", undefined), new $runtime.NonTerminal("avp_filter", ["functionName", 2, "functionName"]), "?"], (($0, $1, base, param, $2) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", [new $runtime.Choice(["is either of", "is any of"]), new $runtime.Choice(["them", "these", "those"]), "a", new $runtime.NonTerminal("base_table", undefined), new $runtime.Choice(["that has", "with"]), new $runtime.NonTerminal("npp_filter", ["functionName", 3, "functionName"]), "?"], (($0, $1, $2, base, $3, param, $4) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", ["are they", new $runtime.NonTerminal("base_table", undefined), new $runtime.Choice(["that has", "with"]), new $runtime.NonTerminal("npp_filter", ["functionName", 1, "functionName"]), "?"], (($0, base, $1, param, $2) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.addRule("boolean_user_search_question_for_list", ["do", new $runtime.Choice(["the", "these", "those"]), new $runtime.NonTerminal("base_table", undefined), "have", new $runtime.NonTerminal("npp_filter", ["functionName", 2, "functionName"]), "?"], (($0, $1, base, $2, param, $3) => D.booleanQuestion(base, param)), C.paramArrayKeyFn, {});
    $grammar.declareSymbol("user_search_question_with_name");
    $grammar.addRule("user_search_question_with_name", [new $runtime.Choice(["can you tell me", ""]), "what is", new $runtime.NonTerminal("constant_name", undefined), "'s", new $runtime.NonTerminal("out_param_Any", ["associatedIdType", 2, "type"]), "?"], (($0, $1, name, $2, param, $3) => {
        if (param.name === 'id')
            return null;
        return [name, [param]];
    }), undefined, {});
    $grammar.addRule("user_search_question_with_name", [new $runtime.Choice(["can you tell me", ""]), "what is", "the", new $runtime.NonTerminal("out_param_Any", undefined), "of", new $runtime.NonTerminal("constant_name", ["type", 3, "associatedIdType"]), "?"], (($0, $1, $2, param, $3, name, $4) => {
        if (param.name === 'id')
            return null;
        return [name, [param]];
    }), undefined, {});
    $grammar.addRule("user_search_question_with_name", ["can you tell me", new $runtime.NonTerminal("constant_name", undefined), "'s", new $runtime.NonTerminal("out_param_Any", ["associatedIdType", 1, "type"]), "?"], (($0, name, $1, param, $2) => {
        if (param.name === 'id')
            return null;
        return [name, [param]];
    }), undefined, {});
    $grammar.addRule("user_search_question_with_name", ["can you tell me", "the", new $runtime.NonTerminal("out_param_Any", undefined), "of", new $runtime.NonTerminal("constant_name", ["type", 2, "associatedIdType"]), "?"], (($0, $1, param, $2, name, $3) => {
        if (param.name === 'id')
            return null;
        return [name, [param]];
    }), undefined, {});
    $grammar.addRule("user_search_question_with_name", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.NonTerminal("constant_name", undefined), "'s", new $runtime.NonTerminal("out_param_Any", ["associatedIdType", 2, "type"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, name, $2, param, $3, $4) => {
        if (param.name === 'id')
            return null;
        return [name, [param]];
    }), undefined, {});
    $grammar.addRule("user_search_question_with_name", ["i would like to", new $runtime.Choice(["know", "see"]), "the", new $runtime.NonTerminal("out_param_Any", undefined), "of", new $runtime.NonTerminal("constant_name", ["type", 3, "associatedIdType"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, param, $3, name, $4, $5) => {
        if (param.name === 'id')
            return null;
        return [name, [param]];
    }), undefined, {});
    $grammar.addRule("user_search_question_with_name", [new $runtime.Choice(["can you tell me", ""]), "what is", new $runtime.NonTerminal("constant_name", undefined), "'s", new $runtime.NonTerminal("out_param_list_for_coref_question", ["associatedIdType", 2, "type"]), "?"], (($0, $1, name, $2, params, $3) => {
        return [name, params];
    }), undefined, {});
    $grammar.addRule("user_search_question_with_name", [new $runtime.Choice(["can you tell me", ""]), "what is", "the", new $runtime.NonTerminal("out_param_list_for_coref_question", undefined), "of", new $runtime.NonTerminal("constant_name", ["type", 3, "associatedIdType"]), "?"], (($0, $1, $2, params, $3, name, $4) => {
        return [name, params];
    }), undefined, {});
    $grammar.addRule("user_search_question_with_name", ["can you tell me", new $runtime.NonTerminal("constant_name", undefined), "'s", new $runtime.NonTerminal("out_param_list_for_coref_question", ["associatedIdType", 1, "type"]), "?"], (($0, name, $1, params, $2) => {
        return [name, params];
    }), undefined, {});
    $grammar.addRule("user_search_question_with_name", ["can you tell me", "the", new $runtime.NonTerminal("out_param_list_for_coref_question", undefined), "of", new $runtime.NonTerminal("constant_name", ["type", 2, "associatedIdType"]), "?"], (($0, $1, params, $2, name, $3) => {
        return [name, params];
    }), undefined, {});
    $grammar.addRule("user_search_question_with_name", ["i would like to", new $runtime.Choice(["know", "see"]), new $runtime.NonTerminal("constant_name", undefined), "'s", new $runtime.NonTerminal("out_param_list_for_coref_question", ["associatedIdType", 2, "type"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, name, $2, params, $3, $4) => {
        return [name, params];
    }), undefined, {});
    $grammar.addRule("user_search_question_with_name", ["i would like to", new $runtime.Choice(["know", "see"]), "the", new $runtime.NonTerminal("out_param_list_for_coref_question", undefined), "of", new $runtime.NonTerminal("constant_name", ["type", 3, "associatedIdType"]), new $runtime.Choice(["first", ""]), "."], (($0, $1, $2, params, $3, name, $4, $5) => {
        return [name, params];
    }), undefined, {});
    $grammar.declareSymbol("boolean_user_search_question_with_name");
    $grammar.addRule("boolean_user_search_question_with_name", ["does", new $runtime.NonTerminal("constant_name", undefined), "have", new $runtime.NonTerminal("npp_filter", ["associatedIdType", 1, "type"]), "?"], (($0, name, $1, param, $2) => {
        const idArg = param.schema.getArgument('id');
        if (!idArg || !idArg.type.equals(name.getType()))
            return null;
        const questions = D.booleanQuestion(null, param);
        if (!questions)
            return null;
        return [name, questions];
    }), undefined, {});
    $grammar.addRule("boolean_user_search_question_with_name", ["does", new $runtime.NonTerminal("constant_name", undefined), new $runtime.NonTerminal("avp_filter", ["associatedIdType", 1, "type"]), "?"], (($0, name, param, $1) => {
        const idArg = param.schema.getArgument('id');
        if (!idArg || !idArg.type.equals(name.getType()))
            return null;
        const questions = D.booleanQuestion(null, param);
        if (!questions)
            return null;
        return [name, questions];
    }), undefined, {});
    $grammar.addRule("boolean_user_search_question_with_name", ["is", new $runtime.NonTerminal("constant_name", undefined), new $runtime.NonTerminal("apv_filter", ["associatedIdType", 1, "type"]), "?"], (($0, name, param, $1) => {
        const idArg = param.schema.getArgument('id');
        if (!idArg || !idArg.type.equals(name.getType()))
            return null;
        const questions = D.booleanQuestion(null, param);
        if (!questions)
            return null;
        return [name, questions];
    }), undefined, {});
    $grammar.addRule("boolean_user_search_question_with_name", ["is", new $runtime.NonTerminal("constant_name", undefined), new $runtime.NonTerminal("pvp_filter", ["associatedIdType", 1, "type"]), "?"], (($0, name, param, $1) => {
        const idArg = param.schema.getArgument('id');
        if (!idArg || !idArg.type.equals(name.getType()))
            return null;
        const questions = D.booleanQuestion(null, param);
        if (!questions)
            return null;
        return [name, questions];
    }), undefined, {});
    $grammar.addRule("boolean_user_search_question_with_name", ["is", new $runtime.NonTerminal("constant_name", undefined), new $runtime.NonTerminal("preposition_filter", ["associatedIdType", 1, "type"]), "?"], (($0, name, param, $1) => {
        const idArg = param.schema.getArgument('id');
        if (!idArg || !idArg.type.equals(name.getType()))
            return null;
        const questions = D.booleanQuestion(null, param);
        if (!questions)
            return null;
        return [name, questions];
    }), undefined, {});
    $grammar.addRule("boolean_user_search_question_with_name", ["is", new $runtime.NonTerminal("constant_name", undefined), "a", new $runtime.NonTerminal("apv_filter", ["associatedIdType", 1, "type"]), new $runtime.NonTerminal("base_table", ["functionName", 3, "functionName"]), "?"], (($0, name, $1, param, base, $2) => {
        const idArg = param.schema.getArgument('id');
        if (!idArg || !idArg.type.equals(name.getType()))
            return null;
        const questions = D.booleanQuestion(base, param);
        if (!questions)
            return null;
        return [name, questions];
    }), undefined, {});
    $grammar.addRule("boolean_user_search_question_with_name", ["is", new $runtime.NonTerminal("constant_name", undefined), "a", new $runtime.NonTerminal("base_table", ["idType", 1, "type"]), new $runtime.NonTerminal("pvp_filter", ["functionName", 3, "functionName"]), "?"], (($0, name, $1, base, param, $2) => {
        const idArg = param.schema.getArgument('id');
        if (!idArg || !idArg.type.equals(name.getType()))
            return null;
        const questions = D.booleanQuestion(base, param);
        if (!questions)
            return null;
        return [name, questions];
    }), undefined, {});
    $grammar.addRule("boolean_user_search_question_with_name", ["is", new $runtime.NonTerminal("constant_name", undefined), "a", new $runtime.NonTerminal("base_table", ["idType", 1, "type"]), new $runtime.NonTerminal("preposition_filter", ["functionName", 3, "functionName"]), "?"], (($0, name, $1, base, param, $2) => {
        const idArg = param.schema.getArgument('id');
        if (!idArg || !idArg.type.equals(name.getType()))
            return null;
        const questions = D.booleanQuestion(base, param);
        if (!questions)
            return null;
        return [name, questions];
    }), undefined, {});
    $grammar.addRule("boolean_user_search_question_with_name", ["is", new $runtime.NonTerminal("constant_name", undefined), "a", new $runtime.NonTerminal("base_table", ["idType", 1, "type"]), new $runtime.Choice(["that", "which"]), new $runtime.NonTerminal("avp_filter", ["functionName", 3, "functionName"]), "?"], (($0, name, $1, base, $2, param, $3) => {
        const idArg = param.schema.getArgument('id');
        if (!idArg || !idArg.type.equals(name.getType()))
            return null;
        const questions = D.booleanQuestion(base, param);
        if (!questions)
            return null;
        return [name, questions];
    }), undefined, {});
    $grammar.addRule("boolean_user_search_question_with_name", ["is", new $runtime.NonTerminal("constant_name", undefined), "a", new $runtime.NonTerminal("base_table", ["idType", 1, "type"]), new $runtime.Choice(["that has", "with"]), new $runtime.NonTerminal("npp_filter", ["functionName", 3, "functionName"]), "?"], (($0, name, $1, base, $2, param, $3) => {
        const idArg = param.schema.getArgument('id');
        if (!idArg || !idArg.type.equals(name.getType()))
            return null;
        const questions = D.booleanQuestion(base, param);
        if (!questions)
            return null;
        return [name, questions];
    }), undefined, {});
    $grammar.declareSymbol("user_search_question");
    $grammar.addRule("user_search_question", [new $runtime.Choice(["no ,", ""]), new $runtime.NonTerminal("simple_user_search_question", undefined)], (($0, questions) => questions), C.paramArrayKeyFn, {});
    $grammar.addRule("user_search_question", [new $runtime.Choice(["no ,", ""]), new $runtime.NonTerminal("thingpedia_user_question", undefined), "?"], (($0, questions, $1) => questions), C.paramArrayKeyFn, { weight: (0.3) });
    $grammar.addRule("user_search_question", [new $runtime.NonTerminal("boolean_user_search_question", undefined)], ((questions) => questions), C.paramArrayKeyFn, {});
    $grammar.declareSymbol("user_search_question_for_list");
    $grammar.addRule("user_search_question_for_list", [new $runtime.NonTerminal("simple_user_search_question", undefined)], ((questions) => [null, questions]), D.userSearchQuestionForListKeyFn, {});
    $grammar.addRule("user_search_question_for_list", [new $runtime.NonTerminal("simple_user_search_question_for_list", undefined)], ((questions) => [null, questions]), D.userSearchQuestionForListKeyFn, {});
    $grammar.addRule("user_search_question_for_list", [new $runtime.NonTerminal("boolean_user_search_question_for_list", undefined)], ((questions) => [null, questions]), D.userSearchQuestionForListKeyFn, {});
    $grammar.addRule("user_search_question_for_list", [new $runtime.NonTerminal("user_search_question_with_name", undefined)], (($0) => { return $0; }), D.userSearchQuestionForListKeyFn, { identity: (true) });
    $grammar.addRule("user_search_question_for_list", [new $runtime.NonTerminal("boolean_user_search_question_with_name", undefined)], (($0) => { return $0; }), D.userSearchQuestionForListKeyFn, { identity: (true) });
}
exports.default = default_1;
;
//# sourceMappingURL=coref-questions.genie.js.map