Re: Plsql grammar - performance question

168 views
Skip to first unread message

Arsène von Wyss

unread,
Jan 7, 2013, 5:11:44 PM1/7/13
to gold-pars...@googlegroups.com
Sounds like your grammar may be a bit too complicated. Would you mind sharing it?

In any case, you might want to try GOLD V4 - it has much better memory and performance characteristics when building the tables than V5.
Message has been deleted

Nuno Braga

unread,
Jan 10, 2013, 6:44:47 AM1/10/13
to gold-pars...@googlegroups.com
Thank you for your answer.

I don't mind sharing the grammar, if you are interested i can send it to you by mail. I don't want to make it public because it isn't a finished product at all. It would help a lot if you could share your ideas about my grammar implementation.

I will try V4 as soon as i can.

Nuno Braga

unread,
Jan 10, 2013, 6:51:24 AM1/10/13
to gold-pars...@googlegroups.com
Thank you for your answer.

i may try Antlr, because i need a .Net engine... I just don't know if the performance will be better, it's a huge grammar, and it will be a pain to port it.


Terça-feira, 8 de Janeiro de 2013 2:25:53 UTC, ki escreveu:
The only version that worked was 3.4.4. Anything after was breaking even more stuff. I used Gold for many years, and it was a good grief. Switched to Bison and Antlr.

Please stay away from it!

Arsène von Wyss

unread,
Jan 10, 2013, 6:45:49 PM1/10/13
to gold-pars...@googlegroups.com
Since you're looking for a .NET engine, I invite you to try mine (BSN). While it builds on the GOLD tables, it's implementation differs a lot from the reference engine provided by Devin, and I believe that it is amongst the fastest GOLD engines for .NET.

In every source code file you'll find my e-mail address if you want to contact me - feel free to do so. ;)

Arsène

Devin Cook

unread,
Jan 15, 2013, 3:38:25 AM1/15/13
to gold-pars...@googlegroups.com
What exactly did you dislike about Version 4 and later?

On Mon, Jan 7, 2013 at 6:25 PM, ki <kizm...@gmail.com> wrote:
> The only version that worked was 3.4.4. Anything after was breaking even
> more stuff. I used Gold for many years, and it was a good grief. Switched to
> Bison and Antlr.
>
> Please stay away from it!
>
> --
> You received this message because you are subscribed to the Google Groups
> "GOLD Parsing System" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/gold-parsing-system/-/fU9ghxJ14ggJ.
>
> To post to this group, send email to gold-pars...@googlegroups.com.
> To unsubscribe from this group, send email to
> gold-parsing-sy...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/gold-parsing-system?hl=en.

ki

unread,
Jan 15, 2013, 9:48:26 PM1/15/13
to gold-pars...@googlegroups.com, mi...@devincook.com
First, Parse Tree was no longer working. It showed error "too many reductions to display, export to formatted text". We found that the huge text file (several MBs) is very hard to analyze. The Parse Tree worked without limitations in 3.4.4 only.

Second, we used C++ engine based on cgt file. Since, cgt file format had changed and the engine did not, we were not able to use newer versions of Gold.

Several bugs and lack of features are show stoppers. For example, our parser required dynamic tags. Other parser generators (Bison and Antlr) have capability to define the tags.

Nuno Braga

unread,
Jan 16, 2013, 9:38:10 AM1/16/13
to gold-pars...@googlegroups.com


Quarta-feira, 2 de Janeiro de 2013 17:53:25 UTC, Nuno Braga escreveu:
Hi,

I'm implementing a Plsql grammar based on the specification found at this Oracle site: http://docs.oracle.com/cd/E11882_01/server.112/e26088/toc.htm#BEGIN

The goal is to build a powerful plsql editor.

I'm about half way through the project but i can already parse quite complex plsql packages.

The trouble is: 

- i had to remove  the builtin plsql functions (TO_CHAR, TO_NUMBER... etc) and treat them as generic function calls because the Gold system was using about 5Gb of ram to generate the tables;

- even so, it uses about 2Gb of ram, and takes about 5m to generate the tables - around 1800 DFA states - and analyzes about 50 000 configuration sets;  

- parsing a 20 000 lines package takes about 1 minute <- this is impractble.

Question:

Is this the performance expected for such a complex grammar, or am i doing something wrong ? (i've followed the given specification, with adjustments) 

Should i have chosen another parsing system? GLR, PEG?

Also the grammar as a few ambiguities which i was unable to solve, does this have impact on performance?


Nuno Braga

unread,
Jan 16, 2013, 9:38:55 AM1/16/13
to gold-pars...@googlegroups.com, mi...@devincook.com
Hello ,

I don't intend to be disrespectful, but something is wrong with version 5 of Gold Parser.

As others suggested, I've tried version 4 and the performance diference is absolutelly huge: from 5minutes and 2Gb (gigabytes) of RAM to 5 seconds and 100Mb of RAM  

Also i can now parse a plsql package body with 20 000 lines in less then one second.

So, i'm sticking with GOLD, but with an older version.


Terça-feira, 15 de Janeiro de 2013 8:38:25 UTC, Devin Cook escreveu:
What exactly did you dislike about Version 4 and later?

On Mon, Jan 7, 2013 at 6:25 PM, ki <kizm...@gmail.com> wrote:
> The only version that worked was 3.4.4. Anything after was breaking even
> more stuff. I used Gold for many years, and it was a good grief. Switched to
> Bison and Antlr.
>
> Please stay away from it!
>
> --
> You received this message because you are subscribed to the Google Groups
> "GOLD Parsing System" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/gold-parsing-system/-/fU9ghxJ14ggJ.
>
> To post to this group, send email to gold-pars...@googlegroups.com.
> To unsubscribe from this group, send email to
Reply all
Reply to author
Forward
0 new messages