From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Augustin_Ch=C3=A9neau_=28BTuin=29?= Newsgroups: gmane.emacs.devel Subject: Re: New tree-sitter mode: bison-ts-mode Date: Tue, 26 Sep 2023 13:52:09 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------Gmgu6WLaVyJkbZkJD3R0g840" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3345"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-devel To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 26 13:53:27 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ql6d5-0000gt-2X for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Sep 2023 13:53:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ql6c4-0002Vg-15; Tue, 26 Sep 2023 07:52:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ql6bx-0002VN-1q for emacs-devel@gnu.org; Tue, 26 Sep 2023 07:52:17 -0400 Original-Received: from msg-4.mailo.com ([213.182.54.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ql6bt-0003aq-J4 for emacs-devel@gnu.org; Tue, 26 Sep 2023 07:52:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1695729129; bh=KhEAPzxFmvHiyisobVhdSLO4D9DrpZfd0bw/20YwK30=; h=X-EA-Auth:Content-Type:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To; b=j+VSDJUZPm82kQ99+4LvmKip1Rn5UVvCqKadwdq/fKeSIQdtVLkrYlPIvXx5I3Cx7 0ubkRPa/pNe9A8qkTK8o/417S3yWuUvoBknA7+tKniOtazGl8gx4K+2Vf1XYseQ0IU RaljSK1WSGmulPBmcVIiwiLAHz7YogWnEbVW9JZY= Original-Received: by b221-3.in.mailobj.net [192.168.90.23] with ESMTP via ip-20.mailobj.net [213.182.54.20] Tue, 26 Sep 2023 13:52:09 +0200 (CEST) X-EA-Auth: 4kDjIiSIPLyew/YIbkEFwtCXGFUnjDlD0o5SiGAwDX5+DbiNiaqnFjTe/AyxRgUiS4iEUHggGUy8nChNl17fekgMNtwLxuOx Content-Language: fr, en-US In-Reply-To: Received-SPF: pass client-ip=213.182.54.15; envelope-from=btuin@mailo.com; helo=msg-4.mailo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311060 Archived-At: This is a multi-part message in MIME format. --------------Gmgu6WLaVyJkbZkJD3R0g840 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 24/09/2023 à 23:10, Yuan Fu a écrit : > Actually, a second thought. IIUC the reason for this change is that without these rules, no indentation is done for variable names in code like > > static myttype * > variable_name; > > static myttype > variable_name; > > This is fine in normal C code, since no indentation is the same as > zero indentation, which is what we want. But for C embedded in Bison, > no indentation is not the same as zero indentation. We want it indent > to the top-level indentation of the embedded C. E.g., > > { > static myttype > variable_name; > } > > rather than > > { > static myttype > variable_name; > } > > Right? In that case, we should really add a fallback indent rule for the embedded c in bison, such that it indents to the top-level of the embedded c. This is more robust than trying to cover all cases in the c rules. Does that make sense? > > Basically, add something like > > (catch-all bison-ts-mode--bison-parent ,bison-ts-mode-indent-offset) > > To the end of C’s indent rules. > > Yuan It does make sense, thanks. I updated bison-ts-mode to do that. --------------Gmgu6WLaVyJkbZkJD3R0g840 Content-Type: text/x-emacs-lisp; charset=UTF-8; name="bison-ts-mode.el" Content-Disposition: attachment; filename="bison-ts-mode.el" Content-Transfer-Encoding: base64 Ozs7IGJpc29uLXRzLW1vZGUgLS0tIHRyZWUtc2l0dGVyIHN1cHBvcnQgZm9yIEJpc29uIC0q LSBsZXhpY2FsLWJpbmRpbmc6IHQ7IC0qLQoKOzsgQ29weXJpZ2h0IChDKSAyMDIzIEZyZWUg U29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLgoKOzsgQXV0aG9yICAgOiBBdWd1c3RpbiBDaMOp bmVhdSA8YnR1aW5AbWFpbG8uY29tPgo7OyBLZXl3b3JkcyA6IGJpc29uIHlhY2MgbGFuZ3Vh Z2VzIHRyZWUtc2l0dGVyCgo7OyBUaGlzIGZpbGUgaXMgcGFydCBvZiBHTlUgRW1hY3MuCgo7 OyBHTlUgRW1hY3MgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQg YW5kL29yIG1vZGlmeQo7OyBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFs IFB1YmxpYyBMaWNlbnNlIGFzIHB1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IgKG9yIGJ1ZmZlciAoY3VycmVudC1idWZm ZXIpKQogICAgICAoZ290by1jaGFyIChwb2ludC1taW4pKQogICAgICAod2hlbgogICAgICAg ICAgKHJlLXNlYXJjaC1mb3J3YXJkCiAgICAgICAgICAgKHJ4CiAgICAgICAgICAgIDs7IE9u bHkgY2hlY2sgZm9yIGEgbGFuZ3VhZ2UgZGlyZWN0aXZlIGF0IHRoZSBiZWdpbm5pbmcgb2Yg YSBsaW5lCiAgICAgICAgICAgIDs7IEknbSBub3QgZW50aXJlbHkgc3VyZSBpdCBpcyBhY3R1 YWxseSBtYW5kYXRvcnksIGJ1dCBpbiBwcmFjdGljZQogICAgICAgICAgICA7OyBkaXJlY3Rp dmVzIGFyZSBhbHdheXMgb24gYSBuZXcgbGluZS4KICAgICAgICAgICAgYm9sCiAgICAgICAg ICAgICgwKyBibGFuaykKICAgICAgICAgICAgIiVsYW5ndWFnZSIKICAgICAgICAgICAgKDAr IGJsYW5rKQogICAgICAgICAgICAiXCIiCiAgICAgICAgICAgIDs7IEJpc29uIHN1cHBvcnRz IEMsIEMrKywgSmF2YSwgYW5kIEQuICBUaGV5IGNhbiBiZSBjYXBpdGFsaXplZCBvciBub3Qu CiAgICAgICAgICAgIChncm91cCAoMSsgKGluIGFscGhhICIrIikpKQogICAgICAgICAgICAi XCIiKQogICAgICAgICAgIG5pbAogICAgICAgICAgIHQpKSkKICAgIChtYXRjaC1zdHJpbmct bm8tcHJvcGVydGllcyAxKSkpCgoKKGRlZnVuIGJpc29uLXRzLW1vZGUtLWRldGVjdC1sYW5n dWFnZSAoJm9wdGlvbmFsIGJ1ZmZlcikKICAiRGVjdGVjdCB0aGUgZW1iZWRkZWQgbGFuZ3Vh Z2UgaW4gYSBCaXNvbiBidWZmZXIuCktub3duIGxhbmd1YWdlcyBhcmUgQywgQysrLCBELCBh bmQgSmF2YSwgYnV0IEQgaXMgbm90IHN1cHBvcnRlZCBhcyB0aGVyZSBpcwpubyBzdXBwb3J0 IGZvciB0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2lkZS1wICJlcGls b2d1ZSIgYm9sKSkpKSkKCgooZGVmdW4gYmlzb24tdHMtbW9kZS0tYmlzb24tcGFyZW50IChf bm9kZSBfcGFyZW50IGJvbCAmcmVzdCBfKQogICJHZXQgdGhlIHBhcmVudCBvZiB0aGUgYmlz b24gbm9kZSBhdCBCT0wuIgogICh0cmVlc2l0LW5vZGUtc3RhcnQgKHRyZWVzaXQtbm9kZS1w YXJlbnQgKHRyZWVzaXQtbm9kZS1hdCBib2wgJ2Jpc29uKSkpKQoKCihkZWZ1biBiaXNvbi10 cy1tb2RlLS1pbmRlbnQtcnVsZXMgKCkKICAiSW5kZW50IHJ1bGVzIHN1cHBvcnRlZCBieSBg Ymlzb24tdHMtbW9kZScuIgogIChsZXQKICAgICAgKChjb21tb24KICAgICAgICBgKCgobm9k ZS1pcyAiXmRlY2xhcmF0aW9uJCIpCiAgICAgICAgICAgY29sdW1uLTAgMCkKICAgICAgICAg ICgoYW5kIChwYXJlbnQtaXMgIl5kZWNsYXJhdGlvbiQiKQogICAgICAgICAgICAgICAgKG5v dCAobm9kZS1pcyAiXmNvZGVfYmxvY2skIikpKQogICAgICAgICAgIGNvbHVtbi0wIDIpCiAg ICAgICAgICAoKGFuZCAocGFyZW50LWlzICJjb21tZW50IikgKGMtdHMtY29tbW9uLWxvb2tp bmctYXQgPyopKQogICAgICAgICAgIGMtdHMtY29tbW9uLWNvbW1lbnQtc3RhcnQtYWZ0ZXIt Zmlyc3Qtc3RhciAtMSkKICAgICAgICAgICgoYW5kIChwYXJlbnQtaXMgImNvbW1lbnQiKSAo Yy10cy1jb21tb24tbG9va2luZy1hdCA/fCA/XFwgP2ApICkKICAgICAgICAgICBjLXRzLWNv bW1vbi1jb21tZW50LXN0YXJ0LWFmdGVyLWZpcnN0LXN0YXIgLTIpCiAgICAgICAgICAoYy10 cy1jb21tb24tY29tbWVudC0ybmQtbGluZS1tYXRjaGVyCiAgICAgICAgICAgYy10cy1jb21t b24tY29tbWVudC0ybmQtbGluZS1hbmNob3IKICAgICAgICAgICAxKQogICAgICAgICAgKChw YXJlbnQtaXMgImNvbW1lbnQiKSBwcmV2LWFkYXB0aXZlLXByZWZpeCAwKQoKICAgICAgICAg IDs7IE9wZW5pbmcgYW5kIGNsb3NpbmcgYnJhY2tldHMgInt9IiBvZiBkZWNsYXJhdGlvbnMK ICAgICAgICAgICgoYW5kIChwYXJlbnQtaXMgIl5kZWNsYXJhdGlvbiQiKQogICAgICAgICAg ICAgICAgKG5vZGUtaXMgIl5jb2RlX2Jsb2NrJCIpKQogICAgICAgICAgIGNvbHVtbi0wIDAp CiAgICAgICAgICAoKGFuZCAobi1wLWdwICJ9IiAiIiAiXmRlY2xhcmF0aW9uJCIpKQogICAg ICAgICAgIGNvbHVtbi0wIDApCiAgICAgICAgICAoKHBhcmVudC1pcyAiXmRlY2xhcmF0aW9u JCIpIHBhcmVudCAyKQogICAgICAgICAgKChub2RlLWlzICJeZ3JhbW1hcl9ydWxlJCIpIGNv bHVtbi0wIDApCiAgICAgICAgICAoKGFuZAogICAgICAgICAgICAocGFyZW50LWlzICJeZ3Jh bW1hcl9ydWxlJCIpCiAgICAgICAgICAgIChub2RlLWlzICI7IikpCiAgICAgICAgICAgY29s dW1uLTAgYmlzb24tdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQogICAgICAgICAgKChhbmQgKHBh cmVudC1pcyAiXmdyYW1tYXJfcnVsZSQiKQogICAgICAgICAgICAgICAgKG5vZGUtaXMgInwi KSkKICAgICAgICAgICBjb2x1bW4tMCBiaXNvbi10cy1tb2RlLWluZGVudC1vZmZzZXQpCiAg ICAgICAgICAoKGFuZCAocGFyZW50LWlzICJeZ3JhbW1hcl9ydWxlJCIpCiAgICAgICAgICAg ICAgICAobm90IChub2RlLWlzICJeZ3JhbW1hcl9ydWxlX2RlY2xhcmF0aW9uJCIpKQogICAg ICAgICAgICAgICAgKG5vdCAobm9kZS1pcyAiXmFjdGlvbiQiKSkpCiAgICAgICAgICAgY29s dW1uLTAgLCgrIGJpc29uLXRzLW1vZGUtaW5kZW50LW9mZnNldCAyKSkKICAgICAgICAgICgo b3IKICAgICAgICAgICAgKG5vZGUtaXMgIl5hY3Rpb24kIikKICAgICAgICAgICAgKG5vZGUt aXMgIl59JCIpKQogICAgICAgICAgIGNvbHVtbi0wIDEyKQogICAgICAgICAgOzsgU2V0ICcl JScgYXQgdGhlIGJlZ2lubmluZyBvZiB0aGUgbGluZQogICAgICAgICAgKChvcgogICAgICAg ICAgICAoYW5kIChwYXJlbnQtaXMgIl5ncmFtbWFyX3J1bGVzX3NlY3Rpb24kIikKICAgICAg ICAgICAgICAgICAobm9kZS1pcyAiJSUiKSkKICAgICAgICAgICAgKG5vZGUtaXMgIl5ncmFt bWFyX3J1bGVzX3NlY3Rpb24kIikpCiAgICAgICAgICAgY29sdW1uLTAgMCkKICAgICAgICAg IChuby1ub2RlIHBhcmVudC1ib2wgMCkpKSkKICAgIGAoKGJpc29uIC4gLGNvbW1vbikKICAg ICAgOzsgSW1wb3J0IGFuZCBvdmVycmlkZSBlbWJlZGRlZCBsYW5ndWFnZXMgcnVsZXMgdG8g YWRkIGFuIG9mZnNldAogICAgICAsKHBjYXNlIGJpc29uLXRzLW1vZGUtZW1iZWRkZWQtbGFu Z3VhZ2UKICAgICAgICAgKCdjIGAoYwogICAgICAgICAgICAgICAoKGJpc29uLXRzLW1vZGUt LWJpc29uLW1hdGNoZXItYWN0aW9uICJ0cmFuc2xhdGlvbl91bml0IikKICAgICAgICAgICAg ICAgIGJpc29uLXRzLW1vZGUtLWJpc29uLXBhcmVudCAsYmlzb24tdHMtbW9kZS1pbmRlbnQt b2Zmc2V0KQogICAgICAgICAgICAgICAoKGJpc29uLXRzLW1vZGUtLWJpc29uLW1hdGNoZXIt bm90LWVwaWxvZ3VlICJ0cmFuc2xhdGlvbl91bml0IikKICAgICAgICAgICAgICAgIGNvbHVt bi0wICxiaXNvbi10cy1tb2RlLWluZGVudC1vZmZzZXQpCiAgICAgICAgICAgICAgICxAKGFs aXN0LWdldCAnYyAoYy10cy1tb2RlLS1nZXQtaW5kZW50LXN0eWxlICdjKSkKICAgICAgICAg ICAgICAgKChiaXNvbi10cy1tb2RlLS1jYXRjaC1hbGwgImFjdGlvbiIpCiAgICAgICAgICAg ICAgICBiaXNvbi10cy1tb2RlLS1iaXNvbi1wYXJlbnQgLGJpc29uLXRzLW1vZGUtaW5kZW50 LW9mZnNldCkKICAgICAgICAgICAgICAgKChub3QgKGJpc29uLXRzLW1vZGUtLWNhdGNoLWFs bCAiZXBpbG9ndWUiKSkKICAgICAgICAgICAgICAgIGNvbHVtbi0wICxiaXNvbi10cy1tb2Rl LWluZGVudC1vZmZzZXQpKSkKICAgICAgICAgKCdjcHAgYChjcHAKICAgICAgICAgICAgICAg ICAoKGJpc29uLXRzLW1vZGUtLWJpc29uLW1hdGNoZXItYWN0aW9uICJ0cmFuc2xhdGlvbl91 bml0IikKICAgICAgICAgICAgICAgICAgYmlzb24tdHMtbW9kZS0tYmlzb24tcGFyZW50ICxi aXNvbi10cy1tb2RlLWluZGVudC1vZmZzZXQpCiAgICAgICAgICAgICAgICAgKChiaXNvbi10 cy1tb2RlLS1iaXNvbi1tYXRjaGVyLW5vdC1lcGlsb2d1ZSAidHJhbnNsYXRpb25fdW5pdCIp CiAgICAgICAgICAgICAgICAgIGNvbHVtbi0wICxiaXNvbi10cy1tb2RlLWluZGVudC1vZmZz ZXQpCiAgICAgICAgICAgICAgICAgLEAoYWxpc3QtZ2V0ICdjcHAgKGMtdHMtbW9kZS0tZ2V0 LWluZGVudC1zdHlsZSAnY3BwKSkKICAgICAgICAgICAgICAgICAoKGJpc29uLXRzLW1vZGUt LWNhdGNoLWFsbCAiYWN0aW9uIikKICAgICAgICAgICAgICAgICAgYmlzb24tdHMtbW9kZS0t Ymlzb24tcGFyZW50ICxiaXNvbi10cy1tb2RlLWluZGVudC1vZmZzZXQpCiAgICAgICAgICAg ICAgICAgKChub3QgKGJpc29uLXRzLW1vZGUtLWNhdGNoLWFsbCAiZXBpbG9ndWUiKSkKICAg ICAgICAgICAgICAgICAgY29sdW1uLTAgLGJpc29uLXRzLW1vZGUtaW5kZW50LW9mZnNldCkp KQogICAgICAgICAoJ2phdmEgYChqYXZhCiAgICAgICAgICAgICAgICAgICgoYmlzb24tdHMt bW9kZS0tYmlzb24tbWF0Y2hlci1hY3Rpb24gInByb2dyYW0iKQogICAgICAgICAgICAgICAg ICAgYmlzb24tdHMtbW9kZS0tYmlzb24tcGFyZW50ICxiaXNvbi10cy1tb2RlLWluZGVudC1v ZmZzZXQpCiAgICAgICAgICAgICAgICAgICgoYmlzb24tdHMtbW9kZS0tYmlzb24tbWF0Y2hl ci1ub3QtZXBpbG9ndWUgInByb2dyYW0iKQogICAgICAgICAgICAgICAgICAgYmlzb24tdHMt bW9kZS0tYmlzb24tcGFyZW50ICxiaXNvbi10cy1tb2RlLWluZGVudC1vZmZzZXQpCiAgICAg ICAgICAgICAgICAgICxAamF2YS10cy1tb2RlLS1pbmRlbnQtcnVsZXMKICAgICAgICAgICAg ICAgICAgKChiaXNvbi10cy1tb2RlLS1jYXRjaC1hbGwgImFjdGlvbiIpCiAgICAgICAgICAg ICAgICAgICBiaXNvbi10cy1tb2RlLS1iaXNvbi1wYXJlbnQgLGJpc29uLXRzLW1vZGUtaW5k ZW50LW9mZnNldCkKICAgICAgICAgICAgICAgICAgKChub3QgKGJpc29uLXRzLW1vZGUtLWNh dGNoLWFsbCAiZXBpbG9ndWUiKSkKICAgICAgICAgICAgICAgICAgIGNvbHVtbi0wICxiaXNv bi10cy1tb2RlLWluZGVudC1vZmZzZXQpKSkpKSkpCgoKKGRlZmluZS1kZXJpdmVkLW1vZGUg Ymlzb24tdHMtbW9kZSBwcm9nLW1vZGUgIkJpc29uIgogICJBIG1ham9yLW1vZGUgZm9yIEJp c29uIGJhc2VkIG9uIHRyZWUtc2l0dGVyLiIKICAod2hlbiAodHJlZXNpdC1yZWFkeS1wICdi aXNvbikKICAgICh1bmxlc3MgYm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WRkZWQtbGFuZ3VhZ2UKICAgICAg ICAgICAgICAgICAgICAoYmlzb24tdHMtbW9kZS0tbWVyZ2UtZmVhdHVyZS1saXN0cwogICAg ICAgICAgICAgICAgICAgICBiaXNvbi10cy1tb2RlLS1mb250LWxvY2stZmVhdHVyZS1saXN0 CiAgICAgICAgICAgICAgICAgICAgIChwY2FzZSBiaXNvbi10cy1tb2RlLWVtYmVkZGVkLWxh bmd1YWdlCiAgICAgICAgICAgICAgICAgICAgICAgKCdjIGMtdHMtbW9kZS0tZmVhdHVyZS1s aXN0KQogICAgICAgICAgICAgICAgICAgICAgICgnY3BwIGMtdHMtbW9kZS0tZmVhdHVyZS1s aXN0KQogICAgICAgICAgICAgICAgICAgICAgICgnamF2YSBqYXZhLXRzLW1vZGUtLWZlYXR1 cmUtbGlzdCkpKQogICAgICAgICAgICAgICAgICBiaXNvbi10cy1tb2RlLS1mb250LWxvY2st ZmVhdHVyZS1saXN0KSkKCiAgICAoc2V0cS1sb2NhbCB0cmVlc2l0LXNpbXBsZS1pbWVudS1z ZXR0aW5ncwogICAgICAgICAgICAgICAgYCgoIkdyYW1tYXIiCiAgICAgICAgICAgICAgICAg ICAiXFxgZ3JhbW1hcl9ydWxlX2RlY2xhcmF0aW9uXFwnIgogICAgICAgICAgICAgICAgICAg bmlsCiAgICAgICAgICAgICAgICAgICAobGFtYmRhIChub2RlKSAodHJlZXNpdC1ub2RlLXRl eHQgbm9kZSB0KSkpKSkKCiAgICAoYy10cy1jb21tb24tY29tbWVudC1zZXR1cCkKCiAgICAo c2V0cS1sb2NhbCB0cmVlc2l0LXNpbXBsZS1pbmRlbnQtcnVsZXMKICAgICAgICAgICAgICAg IChiaXNvbi10cy1tb2RlLS1pbmRlbnQtcnVsZXMpKQoKICAgIChzZXRxLWxvY2FsIHRyZWVz aXQtbGFuZ3VhZ2UtYXQtcG9pbnQtZnVuY3Rpb24gJ2Jpc29uLXRzLW1vZGUtLWxhbmd1YWdl LWF0LXBvaW50LWZ1bmN0aW9uKQoKCiAgICAoaWYgYmlzb24tdHMtbW9kZS1lbWJlZGRlZC1s YW5ndWFnZQogICAgICAgIChzZXRxLWxvY2FsIHRyZWVzaXQtcmFuZ2Utc2V0dGluZ3MKICAg ICAgICAgICAgICAgICAgICAodHJlZXNpdC1yYW5nZS1ydWxlcwogICAgICAgICAgICAgICAg ICAgICA6ZW1iZWQgYmlzb24tdHMtbW9kZS1lbWJlZGRlZC1sYW5ndWFnZQogICAgICAgICAg ICAgICAgICAgICA6aG9zdCAnYmlzb24KICAgICAgICAgICAgICAgICAgICAgOmxvY2FsIHQK ICAgICAgICAgICAgICAgICAgICAgJygoZW1iZWRkZWRfY29kZSkgQGNhcHR1cmUpKSkKICAg ICAgKHRyZWVzaXQtcGFyc2VyLWNyZWF0ZSAnYmlzb24pKQoKICAgICh0cmVlc2l0LW1ham9y LW1vZGUtc2V0dXApKSkKCihwcm92aWRlICdiaXNvbi10cy1tb2RlKQo7OzsgYmlzb24tdHMt bW9kZS5lbCBlbmRzIGhlcmUK --------------Gmgu6WLaVyJkbZkJD3R0g840--