|Retrieving data from multiple lists from a single pattern firstname.lastname@example.org (Archana Deshmukh) (2023-07-21)|
|Re: Retrieving data from multiple lists from a single pattern email@example.com (Archana Deshmukh) (2023-07-25)|
|From:||Archana Deshmukh <firstname.lastname@example.org>|
|Date:||Fri, 21 Jul 2023 04:25:44 -0700|
|Injection-Info:||gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="51758"; mail-complaints-to="email@example.com"|
|Posted-Date:||24 Jul 2023 12:51:48 EDT|
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]);
The data related to first list gets overwritten.
Can I use some context like if token is padding store data to one array and if token is size save data to another array.
However, any suggestion is welcome.
[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]
Return to the
Search the comp.compilers archives again.