There seems to be no mention of the actual format these sql-*-grammar.txt files are expressed in, so : What format is being used in this project, exactly?
It looks a bit like an extended version of BNF, but not quite EBNF because of some deviations:
- the document format is not specified (having chapters, paragraphs, function headers, function texts, format headers, format texts, rules, notes, etc.)
- there are text blocks between rule declarations, like
Syntax Rules in sql-2008 line 5935 and NOTE in sql-2011 line 137
- the non-standard way that repeats are declared, using
{ expression }...
- grouping syntax doesn't use standard
( expression ), but instead uses { expression } (without the 3 dots after the })
- the non-standard
!! comment prefixes
- the lack of double-enquoted literals
- the use of single-character declarations which use otherwise special characters, like
<less than operator> ::= <, <double quote> ::= ", <left bracket> ::= [, <left brace> ::={ and others
Also, there are a few irregularities in the declared rules themselves;
- some rules are declared twice (once with a comment, once as a declaration) in the same document, like
<item number> in sql-92 and <JSON path context variable> in sql-2016
- unspecified case-sensitivity of literals, like in
<reserved word> and keyword occurrences in many rules
- some rules are referred to, but not declared, like in sql-1999 :
<assertion definition>,<old or new value alias>,<attribute definition>, <source data type>, <user-defined cast definition>, <SQL data change statement>, <target table> and in sql-2003 : <contextually typed row value specification>, etc.
- some rules have multiple spaces and other non-identifier characters in them, like in sql-1999 :
<delete statement: positioned>
Could you please address these issues?
There seems to be no mention of the actual format these
sql-*-grammar.txtfiles are expressed in, so : What format is being used in this project, exactly?It looks a bit like an extended version of BNF, but not quite EBNF because of some deviations:
Syntax Rulesin sql-2008 line 5935 andNOTEin sql-2011 line 137{expression}...(expression), but instead uses{expression}(without the 3 dots after the})!!comment prefixes<less than operator> ::= <,<double quote> ::= ",<left bracket> ::= [,<left brace> ::={and othersAlso, there are a few irregularities in the declared rules themselves;
<item number>in sql-92 and<JSON path context variable>in sql-2016<reserved word>and keyword occurrences in many rules<assertion definition>,<old or new value alias>,<attribute definition>,<source data type>,<user-defined cast definition>,<SQL data change statement>,<target table>and in sql-2003 :<contextually typed row value specification>, etc.<delete statement: positioned>Could you please address these issues?