I have been working on developing a script language which ports methods from the java.awt.Graphics
class into commands like
setcolor_0,127,214,255 //R,G,B,Alphaor
fillrect_50,25,100,75 //x,y,w,hinto a picture, so that I could avoid having to write an entire program every time I wanted to create a certain image. The language itself is currently limited to pseudofunctions and commands (mapped directly to Graphics method calls), plus a few output specifiers as a header to each script, but I want to add more. The script is processed in one program which serves as both parser and interpreter, but my method of processing the input Strings directly is inadequate for what I want to do.
While I have searched and found plenty of parser and lexer generators, I keep running into the same two problems with the parser-generators, that being either
- The generated parser will require some form of runtime dependency(/-ies) which only the generator can provide (e.g.: Beaver's products needing its own runtime files), or
- The generator does not appear to have been fully developed, or if this not the case, then the generator still makes at least one disagreeable assumption. (e.g.: Jay's method of generating source code without enclosing class markings and assumption that all classes will be in the same file.)
So in addition to avoiding these things, I am looking for a parser-generator which also has plenty of open documentation (which is why I would like to steer clear of ANTLR), and which outputs Java source code (I would prefer that the output be for as recent a version of Java as is possible, but that is not very important to me).
tl;dr: I need a parser-generator which:
- Is available along with plenty of documentation (external or otherwise) at no cost to myself.
- Builds a parser
- that does not require external dependencies to run,
- outputs Java source code (which is both recent (perhaps I might call it at 1.5 or later?) and easy to read), and which
- generates a properly encapsulated class.