From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0IkCA09/BGa4QAAAqHPOHw:P1 (envelope-from ) for ; Wed, 27 Mar 2024 21:19:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 0IkCA09/BGa4QAAAqHPOHw (envelope-from ) for ; Wed, 27 Mar 2024 21:19:27 +0100 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=FfGectqb; dkim=pass header.d=johnnyrichard.com header.s=key1 header.b=UydMRFT2; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; dmarc=pass (policy=quarantine) header.from=johnnyrichard.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1711570767; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=eHAH2cSCxpWFEteGxBWAnUZQyUfcx5DNOfYjYFEYMRU=; b=zoGotQX7BlEsEj3hQVC87T80rxJf5t5Vyq5xCUOE/19Fb3dkdhLojyYdhdtoOFOKVhLBXY KAmMiqJ9b9tq/2dsRbNlfn9fDbYEB7HHaHtugeUFT2bPp4l95q48WIIaJIt0qF2uTJJ767 5nru0G4/nV5PejON6xnOqHZXdgZ1pGzP2hgBsL1QQcC5k/SGVX8iy0ZBhwvU10TRQwKz5g 3KxKa4VFJ+NXdS/2BjohwetP6ykpyswizJsePIM4l+PIfHv1gvDq+bp84LHsCb3NrISpVv /b2RJQlanvkFZ+4aajvibUeogq/1v479nJ3OYBtZjR3DU0ycsCHeIbuBuK76cQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=FfGectqb; dkim=pass header.d=johnnyrichard.com header.s=key1 header.b=UydMRFT2; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; dmarc=pass (policy=quarantine) header.from=johnnyrichard.com ARC-Seal: i=1; s=key1; d=johnnyrichard.com; t=1711570767; a=rsa-sha256; cv=none; b=Ca/zkjckBeGZQjIxPZ+ouNBahJrhmSR0aZtS9htAGa884rLSEPSWh4Y4CWJeNBpO8Pf+0x dWybaNY+FtZfCFNLJhnys8O5kbSlkSsIG8HLVARfALuiYR8v7lecp83I9ncowXOk2uZ1kW dM+3VpfA1ouOdL75fa4TJZ0sqefQrXK19JUQ1RCcydR+gY1L5ZPIuvVDtAgkMicl0rqgZQ jLYlbI1TWSKv++iK0OIf7LyKphrU5GwnMrKTOxxUFakXBN2HV1LrVotpHfuTaPE34oKKbi xR5z/AcSKaXJa1JDxmKNfAsX/rX759pYsrQO9uM8K7PAx+FonfdbOcPMU8Clqw== 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 ECDBB5D999 for ; Wed, 27 Mar 2024 21:19:26 +0100 (CET) DKIM-Signature: a=rsa-sha256; bh=kCrLTucbL2Arkh63C4TH/CE2xZvXudDLmx0lqZG9JN4=; c=simple/simple; d=lists.sr.ht; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1711570766; v=1; b=FfGectqbSYIysmtuhlXHPAxV8DWvdbZXDR3vG/MA3hTTM5r2zlvkTitkg8PFTcb+Cov7wC4c r05r5Haz2QycqRx4XsQc4sxZg4enre2e3YrF29C6DL8UtJwpMq81EPL79PEhPoEj7WTDZBrOLgw ojNSeE8tVPHjEnnOuEyjwhcimAdYHMgn1uU79aYtuqRtmXTKsVrEFCnhfoU/A+4e+ynTFM+8fyo nzJaSNHKG9dDMs3P0v3WzaOxezaieMJF3TeHp/NHx19mtITvXU8P+dQ+GjDcd52uDC1nNmfTukV iijTlbXYsPoZ6A+sBrL3sWECacUBU4BQvdiT2VfRFG1dQ== Received: from lists.sr.ht (unknown [46.23.81.154]) by mail-a.sr.ht (Postfix) with ESMTPSA id 78D3520278 for ; Wed, 27 Mar 2024 20:19:26 +0000 (UTC) Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [IPv6:2001:41d0:1004:224b::b7]) by mail-a.sr.ht (Postfix) with ESMTPS id D069D20270 for <~johnnyrichard/olang-devel@lists.sr.ht>; Wed, 27 Mar 2024 20:19:25 +0000 (UTC) Date: Wed, 27 Mar 2024 22:20:02 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1711570765; 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: in-reply-to:in-reply-to:references:references; bh=eHAH2cSCxpWFEteGxBWAnUZQyUfcx5DNOfYjYFEYMRU=; b=UydMRFT2ZdcueMIQLT7fTMo53S/en56c2InBZ/HBlkQz0meHeeFPGCVCKdKWTQdZiFmLy5 auuVoTVe+KOuSOXQHjXed+2YTf/SmAS2Fg5oLDRFYt9a5CTcXnjYW7dPFimSS1uUxrf2Uo Get8KxzWhxkC2qpwTh3h9WXsnvKeAzWNfM1MfoegJNfmvBVGjNfWNBNxxbtpVFjiI1QVbp 3ftpv9ln9UYl6CCVP/hJCUc0D/laC2k7H/+Aqx7UoqLQm0TnBXOkANRB+7xmPXP98KxmRx 1nJZ3fhKMOWTH92LhX9iKWAJxAKiuPk7KwiY+ShBh/S9lSqEoIB+MhV9udi41g== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Johnny Richard To: Carlos Maniero Cc: ~johnnyrichard/olang-devel@lists.sr.ht Subject: Re: [PATCH olang v1 1/2] docs: spec: rename program to translation-unit Message-ID: <34zmjbgj3m6wbmwccjp3prnf3l76jwbpdati5hi3xep35cka2c@lhcwkygn5jfl> References: <20240327032128.406911-1-carlos@maniero.me> <20240327032128.406911-2-carlos@maniero.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240327032128.406911-2-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-Queue-Id: ECDBB5D999 X-Spam-Score: -10.10 X-Migadu-Spam-Score: -10.10 X-Migadu-Scanner: mx11.migadu.com X-TUID: 55U5zeySRtFh On Wed, Mar 27, 2024 at 12:21:27AM -0300, Carlos Maniero wrote: > We started to rename the program node in AST to translation-unit. This Nitpick: Perhaps we can highlight the problem and solution better? Today, the AST node "program" serves as the main entry point for the grammar, potentially leading to confusion as the program ultimately becomes the final ELF binary after linking all .o files. Therefore, we have collectively decided to replace it with "translation-unit," which more accurately conveys the concept of a singular unit being translated into a single binary. This adjustment enables us to assert that a translation-unit corresponds directly to the .ol source file on a one-to-one basis. > commit also makes a few refactors on spec such as: > > - Makes EOF a end-of-statement This patch does the opposite. Make a end-of-statement a EOF as well, which I not agree. See following comments... > - create global-statements section to accommodate upcoming global > definitions. > > Signed-off-by: Carlos Maniero > --- > docs/pages/language-specification.md | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/docs/pages/language-specification.md b/docs/pages/language-specification.md > index 5769d95..4541ba8 100644 > --- a/docs/pages/language-specification.md > +++ b/docs/pages/language-specification.md > @@ -22,7 +22,9 @@ language. > > ``` > (* Entry Point *) > - ::= > + ::= ( )* This change expect that every followed new statement has no optional white space. According to your change the following expression is invalid: |fn add(): u32 { | return 0; |} | ^~~ this is a line-break (syntax error according to your grammar) | fn main(): u32 { ^~~ this is a linear-space (syntax error according to your grammar) | return 0; |} suggestion: This change fixes the problem. ::= ( ( | ))* > + > + ::= This doesn't need to be plural if it has a single "statement". > > (* Functions *) > ::= 'fn' > @@ -35,7 +37,7 @@ language. > (* Statements *) > ::= '{' ( > )* ? '}' > - ::= ';' | > + ::= ';' | | Hmmm... this is not true, this means the every end-of-statement can be a end-of-file.