Parsing in Embedded Systems

  • Follow


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....
0
Reply svijayelex (1) 3/2/2010 6:02:38 AM

vijay <svijayelex@gmail.com>
  wibbled on Tuesday 02 March 2010 06: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....

http://en.wikipedia.org/wiki/Parsing

-- 
Tim Watts

Managers, politicians and environmentalists: Nature's carbon buffer.

0
Reply Tim 3/2/2010 6:25:51 AM


"vijay" <svijayelex@gmail.com> wrote in message 
news:87ae76fd-3051-42c7-8dbf-b46d6d829d95@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.

:-)


0
Reply Who 3/2/2010 9:46:32 AM

On Mon, 1 Mar 2010, vijay wrote:

> Date: Mon, 1 Mar 2010 22:02:38 -0800 (PST)
> From: vijay <svijayelex@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
0
Reply Spam 3/2/2010 5:45:53 PM

3 Replies
128 Views

(page loaded in 0.08 seconds)

Similiar Articles:













7/2/2012 7:29:35 AM


Reply: