Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-05-10 Thread Max Vlasov
On Fri, Feb 21, 2014 at 5:24 PM, Richard Hipp  wrote:
> On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov  wrote:
>
>> Is there a machine-readable (BNF or other) grammar as equivalent to
>> the current syntax diagrams?
>
> An updated version of all-bnf.html has now been checked in at
> http://www.sqlite.org/docsrc/doc/trunk/art/syntax/all-bnf.html
>

Thanks again for the updated grammar. Don't know whether it's somehow
used for production logic (probably just kept manually synced with
it), but wanted to mention a couple of things noticed.

in the rule
  join-clause::= [ 
  ]
the construct in [] probably should be made repeated with *. At least
without this addition it prevented from parsing multiply joins.

There are no rules described for initial-select, recursive-select. So
I guessed them as synonyms for select-stmt.

Max
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Max Vlasov
On Fri, Feb 21, 2014 at 5:24 PM, Richard Hipp  wrote:
> On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov  wrote:
>
>>
>> The only one a little similar I found is
>>   http://www.sqlite.org/docsrc/artifact/873cf35adf14cf34
>>   ( mentioned as art/syntax/all-bnf.html )
>>
>
> An updated version of all-bnf.html has now been checked in at
> http://www.sqlite.org/docsrc/doc/trunk/art/syntax/all-bnf.html
>

Thanks a lot, that human-machine activity was much faster than my
writing reply post :)

My  thoughts about parsing was about using it to recognize some states
of user queries to suggest additional tasks. In a sense any query is a
small database containing for example
- the list of datasets used (might be a quick hint nearby),
- possible state of master-detail relationship (enabling menu item for
showing tow connected list views instead of the joined table)

I already tried to detect some states without parsing, but obviously
not so much is possible without full AST at hands.

Max
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Richard Hipp
On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov  wrote:

> Hi,
>
> Is there a machine-readable (BNF or other) grammar as equivalent to
> the current syntax diagrams?
>   http://www.sqlite.org/syntaxdiagrams.html
>
> The only one a little similar I found is
>   http://www.sqlite.org/docsrc/artifact/873cf35adf14cf34
>   ( mentioned as art/syntax/all-bnf.html )
>

An updated version of all-bnf.html has now been checked in at
http://www.sqlite.org/docsrc/doc/trunk/art/syntax/all-bnf.html

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Richard Hipp
On Fri, Feb 21, 2014 at 8:09 AM, Max Vlasov  wrote:

> On Fri, Feb 21, 2014 at 4:47 PM, Richard Hipp  wrote:
> > On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov 
> wrote:
> >
> >> Is there a machine-readable (BNF or other) grammar as equivalent to
> >
> > Not that I am aware of.
> >
>
> I just noticed the file ( bubble-generator-data.tcl )
>
> www.sqlite.org/docsrc/doc/tip/art/syntax/bubble-generator-data.tcl?mimetype=text/plain
> is it created by a human or by a machine?


That is the human-generated input file to the utility that creates the
bubble diagrams.

It looks like a good
> candidate, but might lack some essential information for parsing. If
> it was generated by a machine then the source of this generation might
> be next good candidate :)
>
> Max
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Max Vlasov
On Fri, Feb 21, 2014 at 4:47 PM, Richard Hipp  wrote:
> On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov  wrote:
>
>> Is there a machine-readable (BNF or other) grammar as equivalent to
>
> Not that I am aware of.
>

I just noticed the file ( bubble-generator-data.tcl )
  
www.sqlite.org/docsrc/doc/tip/art/syntax/bubble-generator-data.tcl?mimetype=text/plain
is it created by a human or by a machine? It looks like a good
candidate, but might lack some essential information for parsing. If
it was generated by a machine then the source of this generation might
be next good candidate :)

Max
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Richard Hipp
On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov  wrote:

> Hi,
>
> Is there a machine-readable (BNF or other) grammar as equivalent to
> the current syntax diagrams?
>   http://www.sqlite.org/syntaxdiagrams.html
>

Not that I am aware of.


-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Max Vlasov
Hi,

Is there a machine-readable (BNF or other) grammar as equivalent to
the current syntax diagrams?
  http://www.sqlite.org/syntaxdiagrams.html

The only one a little similar I found is
  http://www.sqlite.org/docsrc/artifact/873cf35adf14cf34
  ( mentioned as art/syntax/all-bnf.html )

but it's pretty outdated (no CTE)

Thanks

Max
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users