Re: Retrieving data from multiple lists from a single pattern

Archana Deshmukh <desharchana19@gmail.com>
Tue, 25 Jul 2023 20:58:42 -0700

          From comp.compilers

Related articles
Retrieving data from multiple lists from a single pattern desharchana19@gmail.com (Archana Deshmukh) (2023-07-21)
Re: Retrieving data from multiple lists from a single pattern desharchana19@gmail.com (Archana Deshmukh) (2023-07-25)
| List of all articles for this month |
From: Archana Deshmukh <desharchana19@gmail.com>
Newsgroups: comp.compilers
Date: Tue, 25 Jul 2023 20:58:42 -0700
Organization: Compilers Central
References: 23-07-014
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="62072"; mail-complaints-to="abuse@iecc.com"
Keywords: parse, design
Posted-Date: 26 Jul 2023 00:20:45 EDT
In-Reply-To: 23-07-014

On Monday, July 24, 2023 at 10:23:20 PM UTC+5:30, Archana Deshmukh wrote:
> Hello,
>
> I have a pattern I which contains two list items. I am able to parse list.
> However, as there are two lists in one pattern, data related to only 2nd list is stores.
>
> pattern: (padding=[1,2,3,4],data = 1, size=[1,2]);
>...
> Best Regards,
> Archana Deshmukh
> [There are lots of ways to do this. You could set a flag when you see the padding or size
> token to say where to store the list. Or you could allocate space dynamically;
> put each list in a fixed static place as you parse it, then make a copy when you see
> the ] and return it. -John]


Thanks John.


At present, I am using flag to store the data to lists. However, I was trying to figure out is there better way to do this.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.