From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QDkdMrPxHWaxOgEA62LTzQ:P1 (envelope-from ) for ; Tue, 16 Apr 2024 05:34:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id QDkdMrPxHWaxOgEA62LTzQ (envelope-from ) for ; Tue, 16 Apr 2024 05:34:11 +0200 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; none Received: from mail-a.sr.ht (mail-a.sr.ht [46.23.81.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B460B25295 for ; Tue, 16 Apr 2024 05:34:11 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=WlvcCrHzOM4xqAEshqjslRbIFGJxWFPQr7/ym0cu7EU=; c=simple/simple; d=lists.sr.ht; h=Date:Cc:Subject:From:To:References:In-Reply-To:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1713238451; v=1; b=n0k60XfMGvyXxtP/DDn3SllQbkQrQDJ8djC9anuU0Hfoomly1jXOKMz1+9CE6H5MeK5pixsq cpitqlb+DYieSIQj7LcgWiHE7bT2DhWA6e0vYNXR+UBO63gxYBGhU17KxIVsYbY6c8TxXmYqywV IpNwoJoRibuo23OR/ZpjdbYsUgYQDOiIZxB+9zGf6HIVLWjAPMG4V1U9cBZ33AHYcTt0nYqtCJD URG/PMXWO3e/9AiuCZ9ArYqnFPzZkNJGoeCOcrazgghndIzQeol/ayVrlE3nLqBuG0TxYK43xFH 5yJvS4+mws8ioTx++RuyjFpXfMmH2J+6JXGYsaD2rsHPg== Received: from lists.sr.ht (unknown [IPv6:2a03:6000:1813:1337::154]) by mail-a.sr.ht (Postfix) with ESMTPSA id 4160720272 for ; Tue, 16 Apr 2024 03:34:11 +0000 (UTC) Received: from caracal.birch.relay.mailchannels.net (caracal.birch.relay.mailchannels.net [23.83.209.30]) by mail-a.sr.ht (Postfix) with ESMTPS id E9C922026B for <~johnnyrichard/olang-devel@lists.sr.ht>; Tue, 16 Apr 2024 03:34:09 +0000 (UTC) X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 1B055841A41 for <~johnnyrichard/olang-devel@lists.sr.ht>; Tue, 16 Apr 2024 03:34:08 +0000 (UTC) Received: from nl-srv-smtpout1.hostinger.io (unknown [127.0.0.6]) (Authenticated sender: hostingeremail) by relay.mailchannels.net (Postfix) with ESMTPA id 16354841CE8 for <~johnnyrichard/olang-devel@lists.sr.ht>; Tue, 16 Apr 2024 03:34:05 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1713238446; a=rsa-sha256; cv=none; b=BJD69qwW/vytv7oWN1JCtgR2aqiOe8bmo+BqBym8KyxU3KkikQHUPdBnbeHrnBRdESUDzR 3ujGTHv2EhxeSC5Hk8blBTUrz9pNzGzK2NC6MLnssLXay5UGCWuxfzGqSgyRklboAJL5i8 gmQz4Q+S3MitrW4GrU0TEAMq29Pj8uZzlfqYCRPpK+Fng4OrQPCevdwv7M9CetOd1uf1uv hG5riia5OI/tUIU+UuuE2mQt6b8gVo20aqUODM1iJmn6v72T8XSiGqLrnI/adQOWyn9eWg 8EuoH6w+ge2rFbr2frKT0NDwzAjwTi3VH1y+69CJLQPG0LMLfoFBlid0yEo5IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1713238446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YzG13Pi7LSHsSVIsPk2pcHvxS0ccikQBl4uPJ1Xa0UM=; b=YC6rpSKfLdJjf8D/iZ+7X9GMsrjML++GMoQWYGWPVKlD6+RS/4Yl1nlUTGBUnVoxUWtSBS 7nBbTAn1BT4U5G0Lh2ewTLm1sp/hRWM/nE7Pw8Bb5w7ogdlB/lcTSKJGWb/IXWmC7vcRa9 2OMNjzit1zq8lzWjn8G/kX+e36sKCJbUuhK7cYne0hCrmG1Nlprcz7HanDr0sDiiug61JL aIXD3B5y98x5tbFBvqki61E/zO9PhEnbVG6ZJVb+0S9clbQqoeAJccP+glfCvQvb1jhAiL OF32E8i1RQfhNO1jBWNj8xsSZypAtXM0hv7tSo2Gi6MKAM6xeNFUf3eshS1QvQ== ARC-Authentication-Results: i=1; rspamd-6f64594bc9-st7x4; auth=pass smtp.auth=hostingeremail smtp.mailfrom=carlos@maniero.me X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me X-MC-Relay: Neutral X-MailChannels-SenderId: hostingeremail|x-authuser|carlos@maniero.me X-MailChannels-Auth-Id: hostingeremail X-Occur-Madly: 4284a04c4edf9ebd_1713238446565_2339253146 X-MC-Loop-Signature: 1713238446565:3936180933 X-MC-Ingress-Time: 1713238446564 Received: from nl-srv-smtpout1.hostinger.io (nl-srv-smtpout1.hostinger.io [145.14.150.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.117.85.82 (trex/6.9.2); Tue, 16 Apr 2024 03:34:06 +0000 Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maniero.me; s=hostingermail1; t=1713238444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YzG13Pi7LSHsSVIsPk2pcHvxS0ccikQBl4uPJ1Xa0UM=; b=uMv6uudD5RDW3yU6R2Afe5X/GbmNb5VwWHW9wWTZ3cNKG2DE/TgNVnuUi72yYHnL6Stg0L yxQ6OVjAmG6i+9pMKiR9aYN2P8rcnTJaH+3+Pg3dXMT3dRfrt+bIPAyAPSxwMT2ggAwiKF 84gvItnGAmhuDJ32vzZHOgzIpbXuetXuYtFORM786vsTwhQ7Yo10EVEUo5kh6dQ5vF1tdb cIRAKwX+VrCU6aoUpUKp8rmZWIAEF4zUK1yEW+upWK/WyDGR6JsTCiWg8r5wrlfmCjRXDO HFzK+kNa0RkD8tVU97BF/ML7TVOEH+9GJK5K9cQETeCInWMV1Q9/qzDg1JlbEA== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 16 Apr 2024 00:33:58 -0300 Message-Id: Cc: "Ricardo Kagawa" Subject: Re: [PATCH olang v1] spec: ebnf: add binary expressions From: "Carlos Maniero" To: "Johnny Richard" , <~johnnyrichard/olang-devel@lists.sr.ht> X-Mailer: aerc 0.15.2-211-g37d5fc691aff References: <20240415184116.140292-1-johnny@johnnyrichard.com> In-Reply-To: <20240415184116.140292-1-johnny@johnnyrichard.com> X-CM-Analysis: v=2.4 cv=bJYQIu+Z c=1 sm=1 tr=0 ts=661df1ac a=WwxFCuf3mf1fs3oSi6/dng==:117 a=WwxFCuf3mf1fs3oSi6/dng==:17 a=IkcTkHD0fZMA:10 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=plf8rDjJAAAA:8 a=Gz7s5_CCAAAA:8 a=qAuJPrZcDUZWL4HPZ1EA:9 a=QEXdDO2ut3YA:10 a=Bds4G5PblGIA:10 a=JWTSs7K9Rhv-lrTctFka:22 a=BXDaF_L80NY05PYiAFlV:22 X-CM-Envelope: MS4xfNjDON6s/Kkk2e2fuyC8HbX0PRZVAi6JBBJ8fnpBksIUPZJGKVldgAYp7mRiZh5GT68ab6u3htNQ6LDDTh+mGOY590OaKEHBfjd6ZDQ7wHujVzg/Cg/b 7IT+arE3ie8vqlQ4aqwA6y/5iuKkt/Z2H03a4bWCTgUcAmteUhBut6iJTbV2D0vnkKpUh8UP5CNCDV6pWMP+dldnHh08fQtLXszajG+ke/5nwZqcK60lzFAF CUXgiDMJVAwFE0EAMohHlCqSeG1WzhrYV+bAJAN8woM/1L9qaTljIUkW+5AAjA+8 X-AuthUser: carlos@maniero.me List-Unsubscribe: List-Subscribe: List-Archive: Archived-At: List-Post: List-ID: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel.lists.sr.ht> Sender: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel@lists.sr.ht> X-Migadu-Flow: FLOW_IN X-Migadu-Country: NL X-Migadu-Spam-Score: -4.00 X-Spam-Score: -4.00 X-Migadu-Queue-Id: B460B25295 X-Migadu-Scanner: mx12.migadu.com X-TUID: B7t8DpaL5Byi > (* Expressions *) > - ::=3D | > + ::=3D > + ::=3D > + ::=3D ( '||' <= ows> )* > + ::=3D ( '&&' )* > + ::=3D ( '|' )* > + ::=3D ( '^' )* > + ::=3D ( '&'= )* > + ::=3D ( ('= =3D=3D' | '!=3D') )* > + ::=3D ( ('<'= | '>') )* > + ::=3D ( ('<<' | '= >>') )* > + ::=3D ( ('+= ' | '-') )* > + ::=3D ( ('*' | '/'= ) )* > + ::=3D > + | > + | '(' ')' I'd like to get your opinion: Is it really necessary to represent precedence here? Some language specifications [1] chose to omit this detail. I' more inclined to keep the spec as simple as possible, even if it makes the behavior a bit unclear. I believe it's more important to represent our grammar in the spec rather than precisely detail how olang behaves. Alternatively, we could follow Go's approach; they kept the spec simple and added explanatory text about the language's behavior. But again, I just wanna an opinion here, I'm totally OK following the spec you wrote, because I know that I suck at understanding the precedence climbing method. :-) [1]: Golang EBNF: https://go.dev/ref/spec#Expression / Rust EBNF: https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/ht= ml/grammar.html#binary-operator-expressions