|
From: Lucas D. <ld...@in...> - 2009-10-02 12:58:32
|
jlex and cup are ports of lex and yacc to java, if I remember correctly. A quick google scan gives me: http://www.cs.princeton.edu/~appel/modern/java/ which is what remember using for a compilers course. jlex: http://www.cs.princeton.edu/~appel/modern/java/JLex/ cup: http://www2.cs.tum.edu/projects/cup/ I've done a bit of this kind of thing, so feel free to ask me questions. I've been wanted a fancier way to specify syntax highlighting, indentation etc for jEdit - I know a good deal about parsers, but not so much about the jEdit API's - so I'd also welcome some discussion on this. best, lucas Shlomy Reinstein wrote: > Hi, > > I intend to write a plugin that will provide some C++ features that > are normally available in an IDE such as automatic code completion and > jumping to tags according to context. Such work has been done in the > great open source C++ IDE named CodeLite, and I got the author's > permission to port his work to jEdit (as long as I maintain the > license). > His work is based on something similar to CtagsInterface, which is > accompanied by custom-made local context parsers, which retrieve > information that is not provided by Ctags like local variables and > their types. These parsers are written in yacc/lex, and to use them in > jEdit I am looking for a good, quick parser generator that outputs > Java code. > > I have absolutely no experience with this in Java. Can anyone > recommend a parser generator that suits jEdit? There are 4 different > parsers, each is very small and meant to solve a specific context > derivation task (and runs on a relatively small chunk of text). I > found ANTLR to be nice, especially due to the specialized IDE - > AntlrWorks, but I don't know how it compares to others like javacc in > terms of simplicity, performance and extensibility. > > Thanks, > Shlomy > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. |