James --

I'm open to other ideas. I've toyed with learning DAML and RDF for some
ontology stuff I'm interested in, but so far I haven't had the mental 
"click"
that would make me feel comfortable working with them. I do have a good
comfort level with XML in general.

I am pondering the sorts of transforms I could implement against the XML
I've generated (using XSLT)...

Another twist would be: can the compiler be reasonably implemented as
a handler for the SAX events generated by the parser? If so, then the XML
I'm generating today is just a textual rendering of the actual data 
structure
passed from the parser to the compiler. I'm thinking this might be 
possible
since a good amount of the optimization will occur in IMCC.

Failing the pure SAX approach (which kind of implies single-pass), the 
other
possibility would be DOM (accept the SAX events, build a tree and use
DOM to tinker with it).

XML is not a religion for me, but I am interested in pushing on it to see 
where
the boundaries of practicality are. XML occupies the following slot in my 
map:

    A common way to render (annotated) tree structures (with
    ordered children) as (mostly) plain text.

(of course, you can substitute "graph" for "tree" if you consider internal 
links).

Already, tinkering with the XML rendering of the Jako parse tree has made
me think more deeply about a few of the language issues. For example, I
need to treat strings with interpolations as expressions rather than as 
string
literals (I'm making this transformation on-the-fly in the compilation and 
SAX
rendering of string "literals" now, but it *should* happen during parsing,
making the interpolated string C<"Howdy $what world!"> result in the same
parse structure as C<'Howdy ' . $what . ' world!'> -- the former is just
syntactic sugar).


Regards,

-- Gregor





James Michael DuPont <[EMAIL PROTECTED]>
02/03/2003 08:37 AM

 
        To:     [EMAIL PROTECTED], [EMAIL PROTECTED]
        cc: 
        Subject:        Re: XML output of parse tree for Jako



--- [EMAIL PROTECTED] wrote:
> I just committed some changes to the Jako compiler that add a '-x'
> switch. Using jakoc -x will cause the compiler to emit the parse tree
> as XML (via SAX events sent to XML::Handler::YAWriter).
> 

Sounds interesting. I have to look into this,
i have dropped xml in favor of RDF, maybe we can find a common base.

mike

=====
James Michael DuPont
http://introspector.sourceforge.net/

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



Reply via email to