Prev: dieresis
Next: Avoiding deadlock in malloc
From: vijay on 2 Mar 2010 01:02 Hai Folks What is Parsing... i heard from one of the folks about Parsing in Embedded Systems and he told he uses Perl Scripts for Parsing....
From: Who Am I? on 2 Mar 2010 04:46 "vijay" <svijayelex(a)gmail.com> wrote in message news:87ae76fd-3051-42c7-8dbf-b46d6d829d95(a)o16g2000prh.googlegroups.com... > What is Parsing... i heard from one of the folks about Parsing in > Embedded Systems and he told he uses Perl Scripts for Parsing.... :-) It's an old children's party game, "Parse the parcel", AKA, "Chinese Whispers". Each person hears a whisper, tries to understand it, and then passes it along as a whisper. At the end of the line, the arrived message is compared with the original. :-)
From: Spam on 2 Mar 2010 12:45 On Mon, 1 Mar 2010, vijay wrote: > Date: Mon, 1 Mar 2010 22:02:38 -0800 (PST) > From: vijay <svijayelex(a)gmail.com> > Newsgroups: comp.arch.embedded > Subject: Parsing in Embedded Systems > > Hai Folks > What is Parsing... i heard from one of the folks about Parsing in > Embedded Systems and he told he uses Perl Scripts for Parsing.... > Parsers can be many things, but they can be very simple. Here's a list parser, which will use the characters in Sep to return a list of tokens .... the Lst_t library is left as exercise for student (so as not to do *ALL* your homework). Lst_t *tokens ; tokens = s_parse( "This is my string", " \t\r" ) ; lst_dump( tokens ) ; produces ... This is my string Lst_t *s_parse( Str_t Str, Str_t Sep ){ Str_t p, q ; Lst_t *x ; if( !Str ) return( (Lst_t *) NULL ) ; x = lst_create( 10 ) ; p = Str ; while( (q = (Str_t) strsep( (Str_t *) &p, Sep )) ){ if( s_length( q ) ) lst_add( x, q ) ; } return x ; } HTH, Rob Sciuk
|
Pages: 1 Prev: dieresis Next: Avoiding deadlock in malloc |