On Saturday 14 August 2004 00:49, Brion Vibber wrote:
Jan Hidders wrote:
[snip]
That hard part is of course to come up with the
contex-free grammar (it
should probably be LALR(1) at that). Since I used to teach compiler
theory I might be of some help there.
Yes, and that's the *only* part that will help. Having two or three or
five intermediate formats doesn't do anything to help the problem --
making the actual parser actually work token by token will.
IMHO putting a lot of emphasis on output formats is a mistake, since it
ignores the actual problem.
FWIW I completely agree with that. Having a real parser in C/C++ generated by
a parser-generator is IMHO the core of the idea, and if you need to interface
that somehow with the rest of the PHP code then XML is a good solution. I had
the impression that this is what Magnus meant anyway, but I may have been
wishful reading there.
-- Jan Hidders