thanks for your tips. As i'm still completely new to jflex, i
think i'd need to answer myself
a couple of questions to get this going.
At the moment i got a working plugin where i have simply
ported the tokenizer created by
the smartyplugin. This way, i got syntax highlighting and also
the CompletionProposalComputer
is calling my extension.
Now to the fun part:
I've had a look at how jflex is used in pdt. The build.xml in
Resources/parserTools works fine
and compiles all the Lexers and Scanners. There's one
commented line though, which unfortunately
is the one i need (at least i think) :
<!-- Disabled automatic generation, since JFlex 1.2.2 is
not available for download -->
<!-- <ant dir="${antfile.dir}/highlighting/"
antfile="generatePHPTokenizer.xml" /> -->
It seems that's exactly the file the smarty developer
manipulated to extend the syntax highlighting
in smarty templates:
Actually I did it very long time ago, and since then
several things (not too much though) have been changed
in the way we compile the flex resources.
My suggestion is to start with the current jflex (which
is compatible with 1.4.3) and make the small changes to
make twig/smarty support it.
Does this help or you need more leads?
Roy
-----Original Message-----
From: pdt-dev-bounces@xxxxxxxxxxx
[mailto:pdt-dev-bounces@xxxxxxxxxxx] On
Behalf Of Robert Gr?ndler
Sent: Sunday, June 12, 2011 8:59 PM
To: PDT Developers
Subject: [pdt-dev] compile jflex grammar
Hi,
i'm trying to extend the php editor to support a
templating language (twig).
There's a smarty plugin which does something similar:
The authors have manipulated the .jflex grammar PDT uses
to generate the
parser/tokenizer.
However, the skeleton files of in DevTools don't compile
against the
current jflex version (1.4.3).
Anyone knows how to compile those .jflex files with a
recent version of
jflex?
If not, is the old version (1.2.2) of jflex available
somewhere in the
PDT repository? It seems the
binary isn't available anymore on the jflex page for
that version.