|
Post by sumedhghaisas on May 26, 2014 14:09:06 GMT -8
I am creating a GDL parser with Bison 3.0. With command line interface it will show verbose errors, warning, etc.. I plan to add level wise optimization to it. ( like gcc, optimizations would include premiss reordering, flattening etc)
In it I have followed these rules... 1) Reserved relations : role, base, init, input, legal,next, goal, terminal, does, true, not, or, distinct These relations are predefined with appropriate degree. Cannot be overloaded. 2) All the basic rules about reserved relations like does, true, not cannot appear in the head. 3) Newly defined relation can have any degree and can be overloaded. 4) Newly defined relation has to appear in at least one fact or head of one clause. Else appropriate warnings are shown. 5) No predefined functions. Newly defined function can have any degree and can be overloaded. Has to appear in at least one fact or head of one clause else appropriate warnings are shown. 6) except these semantic analysis stratified recursion checking and other logical error checks are included.
I think GDL should have a compiler like interface for writing games.
any comments on rules?? anything more that can be added??
|
|
|
Post by Sam Schreiber on May 26, 2014 18:14:05 GMT -8
This sounds really cool! If you get this working it might be an interesting project to programmatically generate the parser in GGP Base, which right now I think was written manually.
|
|
|
Post by sumedhghaisas on May 27, 2014 13:49:06 GMT -8
I am not quite good at JAVA though. I am very comfortable in C++. Any way this C++ code can be used in GGP base??
|
|
|
Post by sumedhghaisas on Jun 3, 2014 19:11:58 GMT -8
The primary version of the parser is complete. I have uploaded the code on GitHub. Link to the repository is github.com/sumedhghaisas/gdlparserIncluded command line interface. Supports multiple files and can also generate DOT representation of the dependency graph generated.
|
|