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

List:       quanta-devel
Subject:    [quanta-devel] more ideas for the parser
From:       Jens Herden <jens () kdewebdev ! org>
Date:       2006-01-20 3:47:27
Message-ID: 200601201047.32252.jens () kdewebdev ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Hi,

our new parser should be implemented as a Finite State Machine. 
	http://en.wikipedia.org/wiki/Finite_state_machine

The configuration of the parser should be in external files, so that we can 
change the behavior of the parser at any time.

The input events are the text stream character by character. 

We have to think about actions that can happen on state-in and state-out. It 
is probably possible to define a set of actions and hardcode them. The 
external configuration would refer to the internal coded action. Of course 
there are more flexible ways to implement this (plugins) but I fail to see 
where we need this yet.

Some examples:
- add the incoming character to an internal buffer
- clear the internal buffer
- call one of the builder functions to create the DOM tree



We have to think about conditions for comparing the character that comes in. I 
immediately have this in mind:
- compare with exactly one character
- compare with a set of characters
- check if the character fits in a class of characters, like whitespaces

I have another one that I want to avoid whenever possible:
- check if it match a regular expression


I think the next steps would to try to start to define the states and 
transitions. I want to find a graphical tool for this, but the one I found 
did not compile. 
	http://www.kde-apps.org/content/show.php?content=17578

Anyone a good idea what to use for this?

Jens

[Attachment #5 (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