Repository navigation
Does Syntax.rules.txt contain all rules? #29
Copy link
Copy link
Open
Description
First of all, @ronsavage and @jleffler thank you so much for sharing these resources.
I'm currently working through the newest SQL 2023 BNF:
- https://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_IEC_9075-1_2023_ed_6_-_id_76583_Publication_PDF_(en).zip
- https://standards.iso.org/iso-iec/9075/-2/ed-6/en/
From the generated Syntax.rules.txt I was only able to find three rules, I'm not sure if I'm not understanding the document or if in fact it is incomplete?
The following is a list of all the !! See the Syntax Rules. rules I've found in the new BNF. I've marked the ones that I could find in Syntax.rules.txt
-
<space> -
<identifier start> -
<identifier extend> -
<Unicode escape character>https://en.m.wikipedia.org/wiki/Escape_character -
<non-double quote character>(this would be any character that does not match<double quote>) -
<whitespace>https://en.m.wikipedia.org/wiki/Whitespace_character -
<truncating whitespace>https://en.m.wikipedia.org/wiki/Whitespace_character (this rule is never used in the BNF) -
<bracketed comment contents> -
<newline>https://en.m.wikipedia.org/wiki/Whitespace_character -
<non-quote character>(this would be any character that does not match<quote>) -
<non-escaped character>(this would be any character that does not match<escaped character>) -
<escaped character>https://en.m.wikipedia.org/wiki/Escape_character -
<JSON path literal> -
<JSON path string literal> -
<JSON path numeric literal> -
<JSON path identifier> -
<JSON path key name> -
<implementation-defined JSON representation option>(not in the rules, similiar to<preparable implementation-defined statement>) -
<preparable implementation-defined statement> -
<SQLSTATE class code>(in the rules the name is<SQLSTATE class value>) -
<SQLSTATE subclass code>(in the rules the name is<SQLSTATE subclass value>) -
<host label identifier> -
<host PL/I label variable> -
<embedded SQL Ada program> -
<Ada host identifier> -
<embedded SQL C program> -
<C host identifier> -
<embedded SQL COBOL program> -
<COBOL host identifier> -
<embedded SQL Fortran program> -
<Fortran host identifier> -
<embedded SQL MUMPS program> -
<MUMPS host identifier> -
<embedded SQL Pascal program> -
<Pascal host identifier> -
<embedded SQL PL/I program> -
<PL/I host identifier> -
<direct implementation-defined statement>(not in the rules, similiar to<preparable implementation-defined statement>)
Metadata
Metadata
Assignees
Labels
No labels
Activity
ronsavage commentedon Mar 13, 2025
Schultzer commentedon Mar 14, 2025
All good, I checked of some others that I found in the file https://github.com/ronsavage/SQL/blob/master/Syntax.rules.txt
But still looks like there is some missing rules, unless I just don’t know how to read, which there is a high likelihood of 😂
ronsavage commentedon Mar 14, 2025
Schultzer commentedon Mar 14, 2025
I would like to know what the rules are for which are not in the current file, e.g non-double quote character, whitespace and non-escaped character.
Here is a list of the rules I could find in the file, although there is still quite a few missing: #29 (comment)
ronsavage commentedon Mar 14, 2025
Schultzer commentedon Mar 14, 2025
I see, for my needs I can properly assume a lot of them. e.g whitespace, newline and etc. And the rest I will ignore. If I ever come by those other standards, I’ll create a PR to update the file with the missing rules.
ronsavage commentedon Mar 14, 2025