Recent

Author Topic: SQL Grammar for Gold Parser?  (Read 2789 times)

J-23

  • Full Member
  • ***
  • Posts: 108
SQL Grammar for Gold Parser?
« on: April 04, 2019, 02:25:08 am »
Hello,
Does anyone of you have SQL Grammar for Gold Parser?

Compatible with MySQL.

greetings

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: SQL Grammar for Gold Parser?
« Reply #1 on: April 04, 2019, 07:37:01 am »
See http://goldparser.org/grammars/index.htm
Possibly needs some work to parse the non-standard features.
Specialize a type, not a var.

J-23

  • Full Member
  • ***
  • Posts: 108
Re: SQL Grammar for Gold Parser?
« Reply #2 on: April 04, 2019, 04:22:52 pm »
I've been there before, but I have not noticed. Thanks.

J-23

  • Full Member
  • ***
  • Posts: 108
Re: SQL Grammar for Gold Parser?
« Reply #3 on: April 05, 2019, 01:11:03 pm »
Here I found the SQL specifications in the BNF format. I mean mainly SQL 2003. How do you think I can face a lot of problems trying to implement it in Gold Parser?

https://ronsavage.github.io/SQL/

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: SQL Grammar for Gold Parser?
« Reply #4 on: April 05, 2019, 01:56:46 pm »
If you have a degree and had tutoring in compiler building: no.
Otherwise: yes.
I would adapt the gold grammar for SQL 87 based on te info from the link you supplied to make it a bit easier.
Note that the standard package fcl-db that comes with FreePascal contains an sql parser, scanner and abstract syntax tree and is virtually sql-2003 compatible, so maybe you should look there first?
« Last Edit: April 05, 2019, 02:00:34 pm by Thaddy »
Specialize a type, not a var.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
Re: SQL Grammar for Gold Parser?
« Reply #5 on: April 05, 2019, 02:05:18 pm »
Maybe this is more something for the Gold parser forum?

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: SQL Grammar for Gold Parser?
« Reply #6 on: April 05, 2019, 02:14:14 pm »
Maybe this is more something for the Gold parser forum?
Well, there are quite a few people on this forum using the GoldParser suite to generate Object Pascal code, More so than on the GoldParser site. So I think this is OK to ask here.Some of our forum members -including me - made the engines (1 and 5)  FPC compatible but we didn't pass that information to the GoldParser website yet.
« Last Edit: April 05, 2019, 02:18:57 pm by Thaddy »
Specialize a type, not a var.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
Re: SQL Grammar for Gold Parser?
« Reply #7 on: April 05, 2019, 04:38:43 pm »
That's like saying windows questions are on topic here because a large number of users us Windows. There is nothing pascal related in this line of questioning.

 

TinyPortal © 2005-2018