On 11/18/07, James Forrester <jdforrester(a)gmail.com> wrote:
It wouldn't be too hard [*] to auto-convert from
the C auto-generated
by Antler to a PHP file. Two implementations of one grammar. ISTR
seeing something about a converter; if not, doing it via the mid-step
of Java (icky, I know, but plausible) would work.
[*] - This is not an offer. Sorry. :-)
Heh. Well bizarrely enough we could actually make the target Java then
auto-translate from Java to C and PHP. The advantage here is that the
guy who wrote ANTLR seems to specialise in Java->X translators for
some reason.
Anyway, in the meantime I'm assuming that functioning ANTLR grammar,
for any target, is a huge step in the right direction.
Still stuck on some intracies of ANTLR. These three constructs seem to
be different, but I don't know how or why exactly:
1)
hello: 'hello';
2)
hello: 'h' 'e' 'l' 'l' 'o';
3)
hello: HELLO;
HELLO: 'hello';
Steve