[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: parser models
John Cowan <jcowan@r...> wrote: | Arjun Ray scripsit: |> I find the while( event ) { switch( type ) { } } structure, which |> inevitably appears, more than a little clumsy. | | I don't understand what this control structure has to do with recursive | descent: I rarely if ever see such a thing. Can you exemplify? Not in classic RD, of course. The pull parser is just the same pattern, not classic RD. The while() part emerges in the handling of lists: list : item | item list ; In classic RD list() looks like this do_list( ) { do_item( ) ; if ( next token starts an item ) do_list( ) ; } which can also be done thusly: do_list( ) { while ( next token starts an item ) do_item( ) ; } If you insist on the first style, you must be a Schemer at heart. ;-)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|