Markup Language (SGML/XML) Parsing/Processing?

Laurence Rozier lrozier at thepattern.com
Wed Sep 22 12:43:15 UTC 1999


Hi,

Have you looked at the JPython, the open-source implementation of Python
integrated with the Java platform? Complete docs can be found at
http://www.jpython.org.

Regards,
Laurence

"Göran Hultgren" wrote:

> Hi!
>
> ---Adriano <apeluso at peg.it> wrote:
> > At 1:20 -0700 21-09-1999, "G–ran" Hultgren wrote:
> > >I have been playing with a thought of creating a Squeak plugin
> > >integrating a Python interpreter into Squeak to be able to use Python
> > >objects and classes transparently. Python in turn uses Swig a lot to
> > >bring in external libraries, if Squeak had a good integration with
> > >Python we would get a lot of stuff "for free".
> >
> > [...]
> >
> > > ... On the other hand Python
> > >has a LOT of cool stuff, like wxPython for instance.
> >
> > >Then going in another direction perhaps CORBA support in Squeak would
> > >cover Python and other stuff as well... BUT, on the other hand it
> > >could be much easier to integrate a Python interpreter. And Python
> has
> > >CORBA support! :-)
> >
> > I don't understand HOW does your Python interpreter work? Do you
> have to
> > import Python classes in any way? How?
>
> Well, www.python.org has a lot of very good documentation, but in
> principle you fire up the interpreter and then it loads .py source
> files from disk. Each source file is a module and can import other
> modules (files that is). Compilation to byte codes is done on the fly
> and is typically not a separate step as with for example Java.
>
> > Or does it work even leaving the Python classes in the Python
> enviroinment?
>
> Hmmm, Python does not have an "environment" as Squeak has. Or more
> precisely you do not typically save the complete object memory as an
> image...
>
> > If so, how does it communicate with the Python world?
>
> I think you lost me there... :-)
>
> > Has Pyton also an XML parser? If so, it'd be really nice, that'd
> become
> > 'our' XML parser seamlessly.
>
> Yes it has, multiple in fact. A good start at:
> http://www.stud.ifi.uio.no/~lmariusg/download/python/xml/index.html
>
> > And, I wonder, would the Python stuff rely on Python
> > processes/threads/memory management, o, Python Virtual
> > Machine/Kernel/Fundamentals?
>
> Yes, I would think that you probably would start with a "loose"
> embedding where the embedded Python interpreter handles it's own
> stuff. But since Python by default has a rather simple reference
> counting scheme instead of a complete garbage collector, it might be
> quite easy to hold Python objects from within Squeak. I am not an
> expert, perhaps someone else could elaborate - or tell me that
> embedding a Python intepreter just plainly is a dumb idea! :-)
>
> > >Dave Newman who had a mostly working version of T-Gen for Squeak back
> > >in mars - please - post it! :-) I do not care for the UI as long as I
> > >can use it in a workspace! T-Gen would be a very nice tool to use for
> > >building parsers of all kinds.
> >
> > What's T-Gen?
>
> It is a program for generating parser - "Translator Generator". It
> takes a lexikal and grammatical description as input and spits out a
> couple of classes that can parse such a grammar. Very neat. Used it
> very successfully a couple of years ago to build a compiler that
> crosscompiled a freaky BASIC language to Smalltalk.
>
> regards, Göran
>
> ===
> Göran Hultgren, gohu at rocketmail.com, icq#:6136722
> GSM: +46 709 472152, http://195.22.65.4
> "First they ignore you. Then they laugh at you.
> Then they fight you. Then you win." -- Gandhi
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.com address at http://mail.yahoo.com





More information about the Squeak-dev mailing list