[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta-devel
Subject:    Re: [quanta-devel] Upload-Plugin
From:       Andras Mantia <amantia () kde ! org>
Date:       2008-02-11 20:40:12
Message-ID: 200802112240.17580.amantia () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Monday 11 February 2008, Niko Sams wrote:
> > Currently the parser from 3.5
> > is activated, but there is a new one in progress.
>
> What languages will be supported by this new parser?

I don't know. :) In theory, any. In practice, you need to write state 
machines that describe the language. We only started with XML.
See quanta/data/statemachines for a description and the example one we 
wrote.

The code itself is in quanta/quantacore/parsers (well, the old parser is 
also there parser.*, sa* and parsercommon.* belongs to the old one).

It parses the XML (without special areas, like PHP inside), and I 
remember that Jens (another developer who helped us) demoed to me that 
it builds the structure tree. But we need to create the state machine 
for included languages (PHP, JavaScript), make this work inside XML and, 
what is very important, implement the parse-as-you-type. That is the 
trickiest part, as you need to parse as little as possible, to be fast, 
otherwise the user experience will be bad. 
 How to store the parse result is another question. Jens wanted to store 
directly inside KHTML, but there are some problems, IIRC because KHTML 
only accepts HTML elements, not any XML. He also wanted to try using 
webkit instead. Doing so (storing the result directly in KHTML/webkit) 
would help developing the VPL mode.
 But I'm not sure we can get over on those problems, so we might do what 
we did until now: store the result in our own node tree.
 Ok, that was a quick intro to the parser. :)

Andras

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

["signature.asc" (application/pgp-signature)]

_______________________________________________
quanta-devel mailing list
quanta-devel@kde.org
https://mail.kde.org/mailman/listinfo/quanta-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic