Enki 1.1 Released
pragma
pragma_member at pathlink.com
Wed Jun 14 13:15:07 PDT 2006
In article <e6plq9$1upb$1 at digitaldaemon.com>, BCS says...
>
>pragma wrote:
>> Enki 1.1 is now available.
>
>Cool, tried it out. Didn't get to far (I haven't used a parser generator
>before, so...). The generated parser still doesn't compile out of the
>box. I dug through the code and added a few imports to the render()
>function to get it to work. Here is a patch of what I did.
>
>*** old\enki\EnkiBackend.d Wed Jun 14 11:47:30 2006
>--- new\sand\EnkiBackend.d Wed Jun 14 11:49:57 2006
>***************
>*** 184,189 ****
>--- 184,191 ----
> emit("module " ~ moduleName ~ ";");
> }
> emit("debug private import std.stdio;");
>+ emit("import enki.BaseParser;");
>+ emit("import enki.types;");
> foreach(imp; imports){
> emit("private import " ~ imp ~ ";");
> }
BCS, thanks for being patient with all this. I hope I haven't lost your
interest. ;)
What you've done here is hack the code-generator to emit the imports you need -
I like the cut of your jib. As the documentation is incomplete, I can't blame
you for trying this, but there is an easier way to do this. The .import()
directive does this job nicely.
> .import("my.import.here");
A solid example of this and other directives are in Enki's BNF definition:
http://svn.dsource.org/projects/ddl/trunk/enki/enki.bnf
You may find the .baseclass() .classname() and .code{{{ }}} directives helpful
as well. The .start() directive is now depricated, and there's the .include()
and .alias() directives that aren't used in that particular file.
- EricAnderton at yahoo
More information about the Digitalmars-d-announce
mailing list