"use strict";
// -*- mode: js; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Genie
//
// Copyright 2019-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>
//         Silei Xu <silei@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 });
const assert_1 = __importDefault(require("assert"));
const thingtalk_1 = require("thingtalk");
const C = __importStar(require("../ast_manip"));
async function default_1($runtime, $ttUtils, $options, $locale, $grammar, $loader) {
    $grammar.declareSymbol("table_join_replace_placeholder");
    $grammar.declareSymbol("action_replace_param_with_table");
    $grammar.declareSymbol("action_replace_param_with_stream");
    $grammar.declareSymbol("the_out_param_Any");
    $grammar.addRule("the_out_param_Any", ["the", new $runtime.NonTerminal("out_param_Any", undefined)], (($0, p) => p), C.paramKeyFn, {});
    if (!$options.flags.inference) {
        if (!$options.flags.turking) {
            $grammar.addRule("the_out_param_Any", ["its", new $runtime.NonTerminal("out_param_Any", undefined)], (($0, p) => p), C.paramKeyFn, {});
            $grammar.addRule("the_out_param_Any", ["their", new $runtime.NonTerminal("out_param_Any", undefined)], (($0, p) => p), C.paramKeyFn, {});
        }
    }
    $grammar.declareSymbol("the_out_param_pair");
    $grammar.addRule("the_out_param_pair", ["the", new $runtime.NonTerminal("out_param_Any", undefined), "and", new $runtime.NonTerminal("out_param_Any", ["functionName", 1, "functionName"])], (($0, p1, $1, p2) => {
        assert_1.default(C.isSameFunction(p1.schema, p2.schema));
        if (p1.name === p2.name)
            return null;
        return [p1, p2];
    }), C.paramArrayKeyFn, {});
    $grammar.declareSymbol("the_out_param_triple");
    $grammar.addRule("the_out_param_triple", ["the", new $runtime.NonTerminal("out_param_Any", undefined), ",", new $runtime.NonTerminal("out_param_Any", ["functionName", 1, "functionName"]), new $runtime.Choice([",", ""]), "and", new $runtime.NonTerminal("out_param_Any", ["functionName", 1, "functionName"])], (($0, p1, $1, p2, $2, $3, p3) => {
        assert_1.default(C.isSameFunction(p1.schema, p2.schema));
        assert_1.default(C.isSameFunction(p1.schema, p3.schema));
        if (p1.name === p2.name || p1.name === p3.name || p2.name === p3.name)
            return null;
        return [p1, p2, p3];
    }), C.paramArrayKeyFn, {});
    $grammar.declareSymbol("pair_projection");
    $grammar.addRule("pair_projection", [new $runtime.Choice(["both", ""]), new $runtime.NonTerminal("the_out_param_pair", undefined), "of", new $runtime.NonTerminal("with_filtered_table", ["functionName", 1, "functionName"])], (($0, outParams, $1, table) => C.makeMultiFieldProjection($loader, 'table', table, outParams)), C.expressionKeyFn, {});
    $grammar.addRule("pair_projection", [new $runtime.NonTerminal("the_out_param_triple", undefined), "of the", new $runtime.NonTerminal("with_arg_min_max_table", ["functionName", 0, "functionName"])], ((outParams, $0, table) => C.makeMultiFieldProjection($loader, 'table', table, outParams)), C.expressionKeyFn, {});
    $grammar.declareSymbol("where_question");
    $grammar.addRule("where_question", ["where is the", new $runtime.NonTerminal("with_filtered_table", ["has_geo", (true)])], (($0, table) => C.makeSingleFieldProjection($loader, 'table', thingtalk_1.Type.Location, table, 'geo')), C.expressionKeyFn, {});
    $grammar.addRule("where_question", ["where is the", new $runtime.NonTerminal("with_arg_min_max_table", ["has_geo", (true)])], (($0, table) => C.makeSingleFieldProjection($loader, 'table', thingtalk_1.Type.Location, table, 'geo')), C.expressionKeyFn, {});
    $grammar.declareSymbol("boolean_projection");
    $grammar.addRule("boolean_projection", ["does", new $runtime.Choice(["the", "", "any"]), new $runtime.NonTerminal("with_filtered_table", undefined), "have", new $runtime.NonTerminal("npp_boolean_projection", ["functionName", 2, "functionName"])], (($0, $1, table, $2, p) => C.makeSingleFieldProjection($loader, 'table', thingtalk_1.Type.Boolean, table, p)), C.expressionKeyFn, {});
    $grammar.addRule("boolean_projection", ["does", new $runtime.Choice(["the", "", "any"]), new $runtime.NonTerminal("with_filtered_table", undefined), new $runtime.NonTerminal("avp_boolean_projection", ["functionName", 2, "functionName"])], (($0, $1, table, p) => C.makeSingleFieldProjection($loader, 'table', thingtalk_1.Type.Boolean, table, p)), C.expressionKeyFn, {});
    $grammar.addRule("boolean_projection", ["is", new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_filtered_table", undefined), new $runtime.NonTerminal("pvp_boolean_projection", ["functionName", 2, "functionName"])], (($0, $1, table, p) => C.makeSingleFieldProjection($loader, 'table', thingtalk_1.Type.Boolean, table, p)), C.expressionKeyFn, {});
    $grammar.addRule("boolean_projection", ["is", new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_filtered_table", undefined), new $runtime.NonTerminal("preposition_boolean_projection", ["functionName", 2, "functionName"])], (($0, $1, table, p) => C.makeSingleFieldProjection($loader, 'table', thingtalk_1.Type.Boolean, table, p)), C.expressionKeyFn, {});
    $grammar.addRule("boolean_projection", ["is", new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_filtered_table", undefined), new $runtime.NonTerminal("npi_boolean_projection", ["functionName", 2, "functionName"])], (($0, $1, table, p) => C.makeSingleFieldProjection($loader, 'table', thingtalk_1.Type.Boolean, table, p)), C.expressionKeyFn, {});
    $grammar.addRule("boolean_projection", ["is", new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_filtered_table", undefined), new $runtime.NonTerminal("npv_boolean_projection", ["functionName", 2, "functionName"])], (($0, $1, table, p) => C.makeSingleFieldProjection($loader, 'table', thingtalk_1.Type.Boolean, table, p)), C.expressionKeyFn, {});
    $grammar.addRule("boolean_projection", ["is", new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_filtered_table", undefined), new $runtime.NonTerminal("apv_boolean_projection", ["functionName", 2, "functionName"])], (($0, $1, table, p) => C.makeSingleFieldProjection($loader, 'table', thingtalk_1.Type.Boolean, table, p)), C.expressionKeyFn, {});
    for (const proj of $loader.projections) {
        if (proj.category === 'pvp' || proj.category === 'preposition') {
            $grammar.declareSymbol("question_projection_table");
            $grammar.addRule("question_projection_table", [proj.pronoun, proj.base, new $runtime.Choice(["is", "was", "are", "were"]), new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_filtered_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), proj.canonical], (($0, $1, $2, $3, table, $4) => C.makeSingleFieldProjection($loader, 'table', null, table, proj.pslot)), C.expressionKeyFn, {});
            $grammar.declareSymbol("question_projection_table");
            $grammar.addRule("question_projection_table", [proj.pronoun, proj.base, new $runtime.Choice(["is", "was", "are", "were"]), new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_arg_min_max_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), proj.canonical], (($0, $1, $2, $3, table, $4) => C.makeSingleFieldProjection($loader, 'table', null, table, proj.pslot)), C.expressionKeyFn, {});
            if (proj.base) {
                $grammar.declareSymbol("command_projection_table");
                $grammar.addRule("command_projection_table", [proj.base, new $runtime.Choice(["that", "which", ""]), new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_filtered_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), new $runtime.Choice(["is", "was", "are", "were"]), proj.canonical], (($0, $1, $2, table, $3, $4) => C.makeSingleFieldProjection($loader, 'table', null, table, proj.pslot)), C.expressionKeyFn, {});
                $grammar.declareSymbol("command_projection_table");
                $grammar.addRule("command_projection_table", [proj.base, new $runtime.Choice(["that", "which", ""]), new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_arg_min_max_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), new $runtime.Choice(["is", "was", "are", "were"]), proj.canonical], (($0, $1, $2, table, $3, $4) => C.makeSingleFieldProjection($loader, 'table', null, table, proj.pslot)), C.expressionKeyFn, {});
            }
        }
        if (proj.category === 'avp') {
            $grammar.declareSymbol("question_projection_table");
            $grammar.addRule("question_projection_table", [proj.pronoun, proj.base, new $runtime.Choice(["do", "does", "did"]), new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_filtered_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), proj.canonical], (($0, $1, $2, $3, table, $4) => C.makeSingleFieldProjection($loader, 'table', null, table, proj.pslot)), C.expressionKeyFn, {});
            $grammar.declareSymbol("question_projection_table");
            $grammar.addRule("question_projection_table", [proj.pronoun, proj.base, new $runtime.Choice(["do", "does", "did"]), new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_arg_min_max_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), proj.canonical], (($0, $1, $2, $3, table, $4) => C.makeSingleFieldProjection($loader, 'table', null, table, proj.pslot)), C.expressionKeyFn, {});
            if (proj.base) {
                $grammar.declareSymbol("command_projection_table");
                $grammar.addRule("command_projection_table", [proj.base, new $runtime.Choice(["that", "which", ""]), new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_filtered_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), proj.canonical], (($0, $1, $2, table, $3) => C.makeSingleFieldProjection($loader, 'table', null, table, proj.pslot)), C.expressionKeyFn, {});
                $grammar.declareSymbol("command_projection_table");
                $grammar.addRule("command_projection_table", [proj.base, new $runtime.Choice(["that", "which", ""]), new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_arg_min_max_table", ["functionName", ((proj.pslot.schema.qualifiedName))]), proj.canonical], (($0, $1, $2, table, $3) => C.makeSingleFieldProjection($loader, 'table', null, table, proj.pslot)), C.expressionKeyFn, {});
            }
        }
        if (proj.category === 'reverse_verb') {
            $grammar.declareSymbol("question_projection_table");
            $grammar.addRule("question_projection_table", [proj.pronoun, proj.base, proj.canonical, new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_filtered_table", ["functionName", ((proj.pslot.schema.qualifiedName))])], (($0, $1, $2, $3, table) => C.makeSingleFieldProjection($loader, 'table', null, table, proj.pslot)), C.expressionKeyFn, {});
            $grammar.declareSymbol("question_projection_table");
            $grammar.addRule("question_projection_table", [proj.pronoun, proj.base, proj.canonical, new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_arg_min_max_table", ["functionName", ((proj.pslot.schema.qualifiedName))])], (($0, $1, $2, $3, table) => C.makeSingleFieldProjection($loader, 'table', null, table, proj.pslot)), C.expressionKeyFn, {});
            if (proj.base) {
                $grammar.declareSymbol("command_projection_table");
                $grammar.addRule("command_projection_table", [proj.base, new $runtime.Choice(["that", "which", ""]), proj.canonical, new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_filtered_table", ["functionName", ((proj.pslot.schema.qualifiedName))])], (($0, $1, $2, $3, table) => C.makeSingleFieldProjection($loader, 'table', null, table, proj.pslot)), C.expressionKeyFn, {});
                $grammar.declareSymbol("command_projection_table");
                $grammar.addRule("command_projection_table", [proj.base, new $runtime.Choice(["that", "which", ""]), proj.canonical, new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_arg_min_max_table", ["functionName", ((proj.pslot.schema.qualifiedName))])], (($0, $1, $2, $3, table) => C.makeSingleFieldProjection($loader, 'table', null, table, proj.pslot)), C.expressionKeyFn, {});
            }
        }
    }
    $grammar.declareSymbol("projection_Any");
    $grammar.addRule("projection_Any", ["the", new $runtime.NonTerminal("out_param_Any", undefined), "of", new $runtime.NonTerminal("with_filtered_table", ["functionName", 1, "functionName"])], (($0, outParam, $1, table) => C.makeSingleFieldProjection($loader, 'table', null, table, outParam)), C.expressionKeyFn, {});
    $grammar.addRule("projection_Any", ["the", new $runtime.NonTerminal("out_param_Any", undefined), "of the", new $runtime.NonTerminal("with_arg_min_max_table", ["functionName", 1, "functionName"])], (($0, outParam, $1, table) => C.makeSingleFieldProjection($loader, 'table', null, table, outParam)), C.expressionKeyFn, {});
    $grammar.declareSymbol("verb_projection_Any");
    $grammar.addRule("verb_projection_Any", [new $runtime.NonTerminal("out_param_Any", undefined), new $runtime.Choice(["do", "does"]), new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_filtered_table", ["functionName", 0, "functionName"]), "have"], ((outParam, $0, $1, table, $2) => C.makeSingleFieldProjection($loader, 'table', null, table, outParam)), C.expressionKeyFn, {});
    $grammar.addRule("verb_projection_Any", [new $runtime.NonTerminal("out_param_Any", undefined), new $runtime.Choice(["do", "does"]), new $runtime.Choice(["the", ""]), new $runtime.NonTerminal("with_arg_min_max_table", ["functionName", 0, "functionName"]), "have"], ((outParam, $0, $1, table, $2) => C.makeSingleFieldProjection($loader, 'table', null, table, outParam)), C.expressionKeyFn, {});
    $grammar.declareSymbol("stream_projection_Any");
    if (!$options.flags.nostream) {
        $grammar.addRule("stream_projection_Any", ["the", new $runtime.NonTerminal("out_param_Any", undefined), "of new", new $runtime.NonTerminal("with_filtered_table", ["functionName", 1, "functionName"])], (($0, outParam, $1, table) => C.makeSingleFieldProjection($loader, 'stream', null, table, outParam)), C.expressionKeyFn, {});
        $grammar.addRule("stream_projection_Any", ["the", new $runtime.NonTerminal("out_param_Any", undefined), "of the new", new $runtime.NonTerminal("with_arg_min_max_table", ["functionName", 1, "functionName"])], (($0, outParam, $1, table) => C.makeSingleFieldProjection($loader, 'stream', null, table, outParam)), C.expressionKeyFn, {});
        $grammar.addRule("stream_projection_Any", ["new", new $runtime.NonTerminal("with_filtered_table", ["is_monitorable", (true)])], (($0, table) => C.makeTypeBasedStreamProjection(table)), C.expressionKeyFn, {});
    }
    $grammar.declareSymbol("placeholder");
    $grammar.addRule("placeholder", ["some number"], (($0) => ({ type: thingtalk_1.Type.Number })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some value"], (($0) => ({ type: thingtalk_1.Type.Number })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["something"], (($0) => ({ type: thingtalk_1.Type.String })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some value"], (($0) => ({ type: thingtalk_1.Type.Currency })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some amount"], (($0) => ({ type: thingtalk_1.Type.Currency })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some time"], (($0) => ({ type: thingtalk_1.Type.Time })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["a certain time"], (($0) => ({ type: thingtalk_1.Type.Time })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some date"], (($0) => ({ type: thingtalk_1.Type.Date })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["a certain date"], (($0) => ({ type: thingtalk_1.Type.Date })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some time"], (($0) => ({ type: thingtalk_1.Type.Date })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["a certain time"], (($0) => ({ type: thingtalk_1.Type.Date })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some location"], (($0) => ({ type: thingtalk_1.Type.Location })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["a location"], (($0) => ({ type: thingtalk_1.Type.Location })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some place"], (($0) => ({ type: thingtalk_1.Type.Location })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["a place"], (($0) => ({ type: thingtalk_1.Type.Location })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["a certain place"], (($0) => ({ type: thingtalk_1.Type.Location })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["somewhere"], (($0) => ({ type: thingtalk_1.Type.Location })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some duration"], (($0) => ({ type: new thingtalk_1.Type.Measure('ms') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some amount of time"], (($0) => ({ type: new thingtalk_1.Type.Measure('ms') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some size"], (($0) => ({ type: new thingtalk_1.Type.Measure('byte') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["a certain size"], (($0) => ({ type: new thingtalk_1.Type.Measure('byte') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["a certain weight"], (($0) => ({ type: new thingtalk_1.Type.Measure('kg') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["a certain temperature"], (($0) => ({ type: new thingtalk_1.Type.Measure('C') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some distance"], (($0) => ({ type: new thingtalk_1.Type.Measure('m') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some length"], (($0) => ({ type: new thingtalk_1.Type.Measure('m') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some size"], (($0) => ({ type: new thingtalk_1.Type.Measure('m2') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["a certain size"], (($0) => ({ type: new thingtalk_1.Type.Measure('m2') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some volume"], (($0) => ({ type: new thingtalk_1.Type.Measure('m3') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["a certain volume"], (($0) => ({ type: new thingtalk_1.Type.Measure('m3') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some speed"], (($0) => ({ type: new thingtalk_1.Type.Measure('mps') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["a certain speed"], (($0) => ({ type: new thingtalk_1.Type.Measure('mps') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some image"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:picture') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some picture"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:picture') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some photo"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:picture') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["somebody"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:username') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["someone"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:username') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some one"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:username') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some person"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:username') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["somebody"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["someone"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some one"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some person"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some number"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some phone number"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["somebody"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["someone"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some one"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some person"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some email address"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some file"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some directory"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some folder"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:phone_number') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some url"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:url') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some website"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:url') })), C.placeholderKeyFn, {});
    $grammar.addRule("placeholder", ["some link"], (($0) => ({ type: new thingtalk_1.Type.Entity('tt:url') })), C.placeholderKeyFn, {});
}
exports.default = default_1;
;
//# sourceMappingURL=projections.genie.js.map