Wouldn't it be nice if the language itself would provide an interface to it's parse tree (am I using the word correctly here?), the structure and information of the programm. The language itself probably knows all the secrets/semantics and syntax it has and if it would be able to export this another application could be importing it.
I could think of an XMLish way of representing a language; s.th. like:
(probably the tag text would better be named code but you know about PM's code-Tags ;-)<programm language="perl" filename="hello_world.pl"> <scope name="global"> <function-definition name="hello" args="none"> <text> print "Hello world\n"; </text> </function-definition> <text> hello(); </text> </scope> </programm>
And then there would be some kind of stylesheet which could provide a description of how to show that programm-code.
Well, as I said, maybe I'm just plain stupid here and don't think very far, but still this strikes me as a good idea: let the language export their information so that the editor developers don't have to keep in pace... What do you think?
| Regards... | Stefan |
| you begin bashing the string with a +42 regexp of confusion | |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parse Tree Export (as XML?)
by premchai21 (Curate) on Sep 18, 2001 at 00:40 UTC |