Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost StateChart and Template parameters
From: Andreas Huber (ahd6974-spamboostorgtrap_at_[hidden])
Date: 2009-07-27 10:19:37


"Etienne Philip Pretorius" <icewolfhunter_at_[hidden]> wrote in message
news:4A6C81AA.1060502_at_gmail.com...
> XML Specification:
>
> document := prolog element Misc*
>
> IE 3 distinct states.
>
> First state 'prolog':
> xml declaration (maximum of 1 occurence)
> OR
> comment (no upper limit)
> OR
> process instruction (no upper limit)
> OR
> white space (no upper limit)
>
> Including 'start element' and 'empty element' as to detect state
> transition from prolog to element according to the above definition.
>
> The event to fire that of is well a range of bytes that will match
> 'prolog' and if it does not match anything or matches xml declaration more
> than once and error should be thrown.
>
> So at a high level the state machine is keeping track on what I would
> expect to be my next set of valid xml entity constructs.
>
> The only way that the state machine knows that it must 'advance' to the
> next state is when I pass the iterators for the content is needs to search
> and it matches the conditions for it to advance.

Hmmm, you are probably using the wrong tool. Although you can use
Boost.Statechart for parsing, I would definitely not recommend it. It is too
heavy-weight for such a task. Boost.Spirit will almost certainly lead to
better results.

HTH,

-- 
Andreas Huber
When replying by private email, please remove the words spam and trap
from the address shown in the header. 

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net