From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ACyMHxXv62VTJgAAbAwnHQ (envelope-from ) for ; Sat, 09 Mar 2024 06:09:41 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id eIX6GxXv62VEcQAAqHPOHw (envelope-from ) for ; Sat, 09 Mar 2024 06:09:41 +0100 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 5B9A23F124 for ; Sat, 9 Mar 2024 06:09:41 +0100 (CET) DKIM-Signature: a=rsa-sha256; bh=cQPZtF8Wi0+ynN+E86arCh2ceD1O6PWOovmh9QCyTkk=; c=simple/simple; d=lists.sr.ht; h=Date:Subject:From:To:References:In-Reply-To:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1709960980; v=1; b=n3tNn82MuKRD+3ZhvSuciQuHS+HTzFPhDZEsotZyFzaftpGV9aI6V+tivHBVsZ60ErfCHwbK j5AwJvnETDdlU4D8h7MiM8v/oXCBflcEJtLQIywFnEfjbdQ8aAoDh6LD0BwUTOgWZOFjIkfAkpw CEK++cy6jnL1Rxq3oBNWGJzWn9Rsn3DJLYDFZIVhbS6+u4h5J5WBz9QynRaLo0SY3pA21VDPSwl /zji9fc/fcDhwfuH5EN/vRoxgS9WqOetocAEBHl0IFtsYvEDghM87iVdLhDKnsuvVvy0aZWywFF QyGvAIz+j0Z258CZoafd9Gv4vMqMccu3KvgofSbRQFtMw== Received: from lists.sr.ht (unknown [46.23.81.154]) by mail-a.sr.ht (Postfix) with ESMTPSA id 8E9D32022B for ; Sat, 9 Mar 2024 05:09:40 +0000 (UTC) Received: from buffalo.birch.relay.mailchannels.net (buffalo.birch.relay.mailchannels.net [23.83.209.24]) by mail-a.sr.ht (Postfix) with ESMTPS id 4DCFE2020A for <~johnnyrichard/olang-devel@lists.sr.ht>; Sat, 9 Mar 2024 05:09:39 +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 786457A27E4 for <~johnnyrichard/olang-devel@lists.sr.ht>; Sat, 9 Mar 2024 05:09:37 +0000 (UTC) Received: from uk-fast-smtpout2.hostinger.io (unknown [127.0.0.6]) (Authenticated sender: hostingeremail) by relay.mailchannels.net (Postfix) with ESMTPA id 951C67A1669 for <~johnnyrichard/olang-devel@lists.sr.ht>; Sat, 9 Mar 2024 05:09:36 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1709960976; a=rsa-sha256; cv=none; b=BxJ/FDCRiU3LHYRVCLEbhIb6eW5z3ci/OrdLHcUQ8ueSgkpbwUm1Vv37clNZSieynwIV0G hXO4/7z4+kAKYSgf2w9rzbx0cKMDCre+BI/pMAaNh34u3OPF8jGgdTnQ84fFvmXM6rtCcy u1Z0g1wbZcoeY8Ab2D/MK1eBVr1k34Rvxx5SQddPJXz9tiJWXAfEC8C7YedrkY17I/IaGq IIwWWSZkUVxkAEyyDRvc/N3eA/VAMSkpZdq4aCkCxjNWeqkBiznb7ntwoyfyirsmHo8DKP AGuZFc2uhj9Kz0knOMBDWDUojOAUq8hVufPrJ/59mAXI0neUueQBrLOG5tt1sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1709960976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to: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=+nB+hcgbksn7GmpeEn+sw050xkhQunBEe7IYaQc/DGo=; b=clFbIC4cWLR2mujdQ3+2UyHmwE4OxetwV6dy2UivWbG1/Gas5dTiEcJu8dsIxj/adGAai9 x56lBPRheSvD2iJxhz7abgejGby7bgy+z2n3DOFJW58NETIE/iXKZFvsdpbrhanVJZ9qMi n4OzwK+B2POsHSaqkpm7bfkz2aCeFGkxscnxDDwcCBORxBMLdFjgqcwbhWJYBr98Mc5991 AJHyXXOet5l23ghi1gK2/F/9P+u8HLFcHP29pJ1D0kCFMP1DoZ+r3JJ6vH0bBImh8/xlWl 05rilizlCznZlvExlNrD+ZG77gA9/zNBpKPSz/lF7xmzso2WE3hgtlydNOk0hg== ARC-Authentication-Results: i=1; rspamd-5db57bc4b6-zrnkk; 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-Invention-Language: 70b6cb2d78effb59_1709960977136_3007741548 X-MC-Loop-Signature: 1709960977136:1702112863 X-MC-Ingress-Time: 1709960977136 Received: from uk-fast-smtpout2.hostinger.io (uk-fast-smtpout2.hostinger.io [31.220.23.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.127.222.70 (trex/6.9.2); Sat, 09 Mar 2024 05:09:37 +0000 Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maniero.me; s=hostingermail1; t=1709960975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+nB+hcgbksn7GmpeEn+sw050xkhQunBEe7IYaQc/DGo=; b=fYqzXxhtsQ229mHIeZx/hdcsLPdmi2jDvxktycJuSSXq+yDMx3KM0ySurp1QurXR7ISmWd HyWd7GLEzGOB/6sRGo3eRZ1lpCujRf2IGCibcp4exm6v/bIak0KxO6D4A1d86siFV5Ujuy Zs6TgzZWkV5TkbA12O3pi/Yenw1UQzBqNm4xj8kwmX1tz0l/0BzD2rfPPh37jzeA+kxE5Q No3XC0C4c91bxgUvvp8OvCkGGxV1SMVP/mhYW4VQLQ48kioZOgqfdPCEj0qSzlbvUeBc03 KaPVx1CCUzcAPS0csNef+TAAOu0zOzwCDoqOSsffY4zligOlgXNCmMknReah0g== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 09 Mar 2024 02:09:30 -0300 Message-Id: Subject: Re: [RFC PATCH olang v1] docs: create zero programming language specification From: "Carlos Maniero" To: "Johnny Richard" , <~johnnyrichard/olang-devel@lists.sr.ht> X-Mailer: aerc 0.15.2-211-g37d5fc691aff References: <20240309000855.1059007-1-johnny@johnnyrichard.com> In-Reply-To: <20240309000855.1059007-1-johnny@johnnyrichard.com> X-CM-Envelope: MS4xfN/tRHWwr8QSDxh6JVwrf81Rs6hiAeJcuDHzhIrAPOAqRSvqC0sLgFvQaICMUUDN18GEYjDXDPIJ1UBsF8vNPoy5E4/Wde5rrwXYXmnju6bVy+o5SIT7 Mv58/WFwzVWB3ieBNmD3OvuToZOPL6XuaCTUZjUAaVGREo0lk84upbaoq7SEkhNuTyJN2nSapF/ll/0e8s5JwxbsrKqJki9GV2qSpDObukrkPDVFMhvKPan7 lULJ9YmIIAr9fK15mCyxXA== X-CM-Analysis: v=2.4 cv=HawSTDE8 c=1 sm=1 tr=0 ts=65ebef0e a=5+VMC1FZ3J4mVPAKpPmAqg==:117 a=5+VMC1FZ3J4mVPAKpPmAqg==:17 a=IkcTkHD0fZMA:10 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=xGnxgwKWAAAA:8 a=FA3e1n_ECTX6gNZqNT0A:9 a=QEXdDO2ut3YA:10 a=BXDaF_L80NY05PYiAFlV:22 a=DUiJYIVqMH-r5XzkyQWC:22 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: 5B9A23F124 X-Migadu-Scanner: mx13.migadu.com X-TUID: +qpMfh/Mbs8f > This grammar adds the token SEMICOLON (';') for every statement. I know = we > agreed make it optional, but the SEMICOLON makes the parser much more > convenient to implement. >=20 > And this is the first topic I would like to discuss. Let me know if you > agree otherwise I can adapt the grammar to make SEMICOLON optional. I understand that using line feed (LF) as an end of statement (EOS) marker can simplify the parsing process. However, at the top of my mind I see two main downsides in using LF as EOS: 1. It could increase the number of tokens that the lexer produces, requiring the parser to ignore some of them. 2. It requires an strategy to skip LF for enable multi-line statements. While the second point does add some complexity, I believe the first one only slightly alters the implementation without significantly increasing its complexity. Therefore, I'm curious about your statement that using a semicolon makes the parser much more convenient to implement. Could you elaborate on this? Have you encountered any new considerations that might complicate the implementation? > The grammar was made by using a EBNF evaluator tool[1]. >=20 > [1]: https://mdkrajnak.github.io/ebnftest/ I would add this link at the markdown, so then people can play with it. Furthermore, I was playing with the grammar you send and I did a few adjusts: - I introduced the to make SEMICOLON optional; - It seams it has a pattern in where you used DASH or UNDERLINE but IMO it reads better when standardized. - I made a simplification on . - I reordered the non-terminal keeping the single chars and strings at the bottom. ::=3D ::=3D + + = * * + * ::=3D + * * ::=3D '(' * ')' ::=3D * * ::=3D + ::=3D * + = * ::=3D * * '\n' ::=3D 'fn' ::=3D 'return' ::=3D 'u32' ::=3D #'[a-zA-Z_]' ::=3D #'[0-9]' ::=3D #'[ \t\r\n]' ::=3D ';' ::=3D '{' ::=3D '}' ::=3D ':' Other than that I would like to say thank you to always been looking forward and helping us to improve our process.