S
sam_cit
Hi Everyone,
I'm currently working in embedded environment and hence resources
like memory are constrained. And i'm in a need to pass a entire text
file to a parser (implemented in lex/yacc) to parse it. The maximum
size of the text file is 100kb and i can't allocate a buffer to hold
the complete 100 kb of data in memory for the parser to read from.
I realise that another solution is to have the data stored in a temp
file and pass the file to the parser. However, in my case, i want to
avoid the file approach as it is performance costly.
I know that this is more of programming question than related to C,
i decided to post here as i'm implementing the logic in C. Can anyone
help suggesting other solutions?
Thanks in advance!!!
I'm currently working in embedded environment and hence resources
like memory are constrained. And i'm in a need to pass a entire text
file to a parser (implemented in lex/yacc) to parse it. The maximum
size of the text file is 100kb and i can't allocate a buffer to hold
the complete 100 kb of data in memory for the parser to read from.
I realise that another solution is to have the data stored in a temp
file and pass the file to the parser. However, in my case, i want to
avoid the file approach as it is performance costly.
I know that this is more of programming question than related to C,
i decided to post here as i'm implementing the logic in C. Can anyone
help suggesting other solutions?
Thanks in advance!!!