forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Portier" <>
Subject RE: [Fwd: invitation to check out dbdoc/ashkelon]
Date Wed, 31 Jul 2002 06:37:02 GMT
> -----Original Message-----
> From: Steven Noels []
> Sent: dinsdag 30 juli 2002 14:47
> To:
> Subject: Re: [Fwd: invitation to check out dbdoc/ashkelon]
> Marc Portier wrote:
>  > so a source-code-highlighting transformer would be able to parse the
>  > contents and put out the <source> with nested tags to indicate the
>  > language-independant, but rather higlight-directed portions that any
>  > language knows about: literals, keywords, comment, names,...
>  >
> As always, I start looking for projects we can steal from:
> * has JXR which does some Java
> syntax analysis

jxr seems to have been originated at, dunno if there is
license issues?

looks like a handmade parser (no syntax files, no parser generation stuff)
which means: who is going to update to the java 1.4 syntax etc etc?

also the code seems to directly output the HTML generation
not separation of output/style concerns :-(

> (
> coon/EngineWrapper.html),
> it is also being packaged inside Maven
> ( - dunnow if it
> has an XML back-end

there seems to have been a jxr -> maven link in the past (empty dirs in the
maven repos)
but the output looks too similar to be something different?

inside maven there is a parser generated with jjtree and javacc:

the grammar file is there as well: JavaParser.jjt

haven't found yet where the visitor is that generates the HTML (hopefully
XML) output...
jxr is still in there (but on a different location then I was looking
earlier),so  they don't use the javacc/jjtree approach for the java source
code highlighting

The javacc/jjtree approach has the advantage of having quite some grammar
files out there for javacc:  but
that still doesn't make the output XML of course...

challenge would be to write some JavaParserVisitor that 'dumps' stuff into a
sax contenthandler?
on the other hand: for syntax highlighting we need less detail on the syntax
of the languages I guess?

Still wondering how the editors are doing it though... maybe some
JEdit/netbeans/eclipse or other OSS editor could shed some light?

> * if we can get hold from
> a Java syntax definition file

haven't found one yet, there seems to be a conversion possible from yacc
style syntax def files to the xml version it needs.
don't know how that relates to the javacc style syntax def files, didn't
find a repository of yacc syntax files

> (,
> already packaged as a Cocoon generator.

mui sympatico, wondering though what is going to be easier for us: writing
and maintaining syntax files (how hard would that be starting from or
writing and maintinaining the XML production and cocoon hookup from some
jjtree approach? (and steal updated syntax files as they become available)

maybe the real challenge is to write some jjxml layer on top of javacc (like
jjtree did) so the XML production can be expressed more nicely.
does anyone know if jjtree and or javacc are open source?

mmm, all of this not really top of mind now, and it starts to look like the
proverbial can of *wurms*


View raw message