Re: Scripting in Gnome

On 03Feb2004 04:53PM (+0000), jamie wrote:
> On Tue, 2004-02-03 at 16:31, Maciej Stachowiak wrote:
> > 
> > So call me thick, but how is XML useful for expressing syntax and
> > semantics of an arbitrary language? I work on a web browser and a
> > JavaScript implementation, so don't be afraid to use big words and
> > stuff.
> XML as opposed to what? A propriety text format? An EBNF grammar format?

All I'm trying to say is: translating arbitrary different programming
languages is a really hard problem. The only really succesful case we
have of translating many source languages to one target language is
compilers translating to machine language. And compilers are very
complicated and take a long time to do their work. Some of them have
partially data-driven syntax processing (lex-based scanners and
yacc-based parsers for instance), but none that I know of have
data-driven semantics.

I mean, yes, you can write a program that will take a formal
description of operational semantics or denotational semantics and
execute code based on this, but people only write such things as
research toys. It would take pages and pages just to describe how
numbers work in real programming languages using denotational
semantics, and nobody would understand the result.

So, explaining how you will make translation work by saying "I'll use
XML" seems like a bit of a non sequitur, and makes it seem like you
might be underestimating the difficulty of this problem.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]