Re: parser in Quanta

Andras Mantia <[email protected]>
Newsgroups gmane.comp.kde.devel.quanta
Message-ID <[email protected]>
On Friday 13 January 2006 14:16, Jens Herden wrote:
> Is it? I think that Quanta is currently analysing the document first
> and then starts the parsing.

No, it starts to parse as XML. If it finds a special area (the XML DTEP 
tells us which kind of special areas can be inside), starts to parse in 
a "quick" way this to find the end of the area. Inside the node tree 
for the special area there will be created only one node (IIRC, maybe 3 
if the start and end nodes are created as part of the special area). 
Once the XML parsing is over, as soon as there is time for it, the 
parser goes through the node tree and parser in detail all those 
special area nodes and during this in detail parsing the node tree is 
completed.

> I would like to have a solution where we start the parsing and detect
> the begin of a special area, switch the parse modus and switch back
> when we detect the end of the special area.
> So one parser run should be enough to parse the HTML/XML and through
> out the special areas. Do you see any reason why this should not
> work?

I fail to see why it is different what we have now from what you say.

> So we could improve Quanta further if we would parse Javascript as
> well?

Sure. Actually there was no "real" DTEP created for JavaScript ever, so 
right now Quanta parses in a generic way (searches for { } structures 
for example, if I'm right. I wrote that part quite a long time ago.)

Andras

-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org

_______________________________________________
quanta-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/quanta-devel
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBDx+a/TQdfac6L/08RAmEZAJ9qXldkoxnr2Qfw9O+qewxCxvIS+QCg4CyC
C1vL54H3HRbJroMRUoaZQXQ=
=F8/F
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.