Commits

ariovistus committed 4f5c38c

getting ready for the prying eyes

Comments (0)

Files changed (2)

cnd.antlr.zip

Binary file added.
+If you're looking at this project, I assume it is because of the promise 
+of working grammars for D1 and D2. I haven't touched this project or the d 
+programming language in a while, so they might be a little out of date, but
+as of approximately summer 2010, they were to the best of my knowledge
+working well.
+
+These grammars require the netbeans fork of antlr2; for your convenience, it
+is provided in cnd.antlr.zip, as downloading the netbeans sources takes forever.
+
+For building the grammars, have a look in the makefile, as even though this is
+a netbeans project, I never bothered to figure out how to incorporate it into 
+ant.
+
+For running the grammars, my favorite technique is using the clojure wrappers
+(note the clojure bash script). Maybe modify the script to make it work for 
+you. Run the script; it starts a repl; following commands parses a file and 
+prints out the ast:
+
+(use 'org.d.compiler.ast-utils)
+(use 'org.d.compiler.visitor)
+
+(fparse2 "yerfile.d")
+(dump-ast *1)
+
+Feel free to poke around in the source code, but keep in mind there are several
+years' worth of cruft and numerous layers of restarted attempts at writing
+a d compiler. The clojure code is the most recent (and furthest developed) 
+attempt; most of the java code is obsolete. Also keep in mind that 
+Formatter.java is the main reason I never released this code sooner. Please be 
+kind.