Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRhwN-0000np-Nv for pgsql-docs@arkaria.postgresql.org; Sat, 18 Sep 2021 21:32:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mRhwL-0003DO-88 for pgsql-docs@arkaria.postgresql.org; Sat, 18 Sep 2021 21:32:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRhwK-0003DA-LU for pgsql-docs@lists.postgresql.org; Sat, 18 Sep 2021 21:32:04 +0000 Received: from resqmta-ch2-06v.sys.comcast.net ([2001:558:fe21:29:69:252:207:38]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRhwD-0004Jv-Qv for pgsql-docs@lists.postgresql.org; Sat, 18 Sep 2021 21:32:03 +0000 Received: from resomta-ch2-11v.sys.comcast.net ([69.252.207.107]) by resqmta-ch2-06v.sys.comcast.net with ESMTP id RhOimlsI0sjoSRhwBmOgCM; Sat, 18 Sep 2021 21:31:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1632000715; bh=AfY9RPOvts9Y3kwHkqTs/9IUdMcEPYdPRMb1ABsXSG8=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=loKa+FpDBy93GJJp9MSX+W3j7eVOCKbBhKRAXRT1Pp7dAuTb3zcT7oQQU8iIgiiPY nkk+v+URYjssEQfm5POdnaFg15/AFIm0c/LPxtn9Ul57HfUjNVOvs2MfXo3Yka9+B0 UwkMdDrI6yWRjKhkBdSKsgpYjVIyqbnu35pBgSrJB/ai0gdvG6qgHSzIxjo7nAe7cx R8PPsJwvOTz2C2oeiSn6YnlJQPZHFmVxr7gVyTlANqPRMcaFpv/gF1tIwhCaQVussU qtk9TFSIQS7k8MODQVkry7J/Sgo/QsD5E5QYZZCvt3ewq6EnUkeXuiA/R7Ox1ZkXNb dn/C42vAFXRzQ== Received: from shrew ([66.30.144.167]) by resomta-ch2-11v.sys.comcast.net with ESMTPA id Rhw9mzZ9p4Bn2RhwAmZKmv; Sat, 18 Sep 2021 21:31:54 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedvtddrudehkedgudehlecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucevohhmtggrshhtqdftvghsihdpqfgfvfdppffquffrtefokffrnecuuegrihhlohhuthemuceftddunecunecujfgurhepfffhvffukfggtggufgesthdtredttdervdenucfhrhhomheprhhirhcuoehrihhrrghnshestghomhgtrghsthdrnhgvtheqnecuggftrfgrthhtvghrnhepudfghfevieelffdvhfegudfhfeefveelleegfefhfffhhfehuefgteduudeuffevnecukfhppeeiiedrfedtrddugeegrdduieejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghlohepshhhrhgvfidpihhnvghtpeeiiedrfedtrddugeegrdduieejpdhmrghilhhfrhhomheprhhirhgrnhhssegtohhmtggrshhtrdhnvghtpdhrtghpthhtohepphhgshhqlhdqughotghssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-Xfinity-VMeta: sc=0.00;st=legit Received: from rir by shrew with local (Exim 4.92) (envelope-from ) id 1mRhw9-0001rX-Qw for pgsql-docs@lists.postgresql.org; Sat, 18 Sep 2021 17:31:53 -0400 Date: Sat, 18 Sep 2021 17:31:53 -0400 From: rir To: pgsql-docs@lists.postgresql.org Subject: Pg notation Message-ID: <20210918213153.fikmnsvhxnh5kq23@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello all, If there is no interest in a more formalized Postgres notation then reading this is a waste of your time. But accept the compliment that all the doc/src/sgml/ref/.sgml synopses are well and nicely done. I turned to your documentation pages' synopses to create a _very_ partial grammar for Pg SQL in Raku; just addressing pertinent commands in a small codebase. Simple stuff. I went down a rabbit hole. So now there is a grammar that could start formalizing and linting Pg's notation language in its SGML form. It uses added tags to identify and isolate commands, subrules, etc. and relies on the existing tags in and around the "Where" phrases. The added tags unambiguously define part of the notation while not restraining the visual layout to pre-existing models. The tags greatly simplify the parsing because the grammar doesn't need to identify the specific command being parsed. Rewriting the doc/src/sgml/notation.sgml file is within my ability with a monkey-see-monkey-do approach to SGML. The variations of the "Where X is:" phrases might be halved by using standard phrasing. I think that would be noticed by few readers. Mostly, this is at the "X may be:" versus "X is:" level. My purpose was to learn about parsing, more Raku, and a little more SQL. That was a success. I did not consider that I would be steeping myself in the notation language. I am temporarially a quasi-expert of trivia like there are 19 "[ , ... ]" usages--the least common form of the repeat-with-comma rule. Thanks for being Postgresql, Rob