Has anyone here use GOLD parser?
I wrote out some bnr, i am thinking about implementing it. I used gold parser to make a skelton but it looks incomplete and i'm unsure what to do. Maybe i'll try something else but has anyone here used gold parser with success to implement your own script/language?
<SkilletAudio> Your framerate proves your lack of manhood
A couple years back we used GPB to write a javascript grammar for our .NET MSIL to javascript translator/decompiler project; as I recall it worked pretty well. Most of the issues were wrestling with the grammar itself rather than the program. There are other suites that perform basically the same function, but we chose GPB because it had a handy mini-IDE, used nice clean BNF grammars rather than some special custom syntax, and also it had a modular design so that you can use any number of different engine implementations. The IDE simply takes your grammar file and produces a compiled grammar table (.cgt) file from it. This file must then be consumed by an engine to actually be used.<br><br>That strength can also be a weakness though if you don't find an engine implementation that suits your needs. The GPB website lists a bunch of available engines for a variety of languages (we were using C#). In the end though, I believe we had to modify the source of the engine we chose to more suit our needs. Unfortunately, I wasn't the one that handled that so I can't really give any advice about specific engines or the exact modifications we had to make. I did do some work on the grammar itself though, and found the IDE to be helpful, if minimalist. It provides a good testbed for checking if your grammar is correct by submitting strings to it and their corresponding AST, or where it failed if it didn't pass the grammar. There's only so much it can tell you though, and grammars can be subtly complicated beasts, especially as they grow.<br><br>I suppose my tl;dr conclusion is that I do recommend it and found it pleasant enough to work with, although with the caveat that I haven't much experience with many of the other alternatives besides lex/yacc.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement