I have a question regarding how to parse nested files with the same structure using LEX/YACC.
Let's say that I have a file with the following structure
File_1
....
include File_2
include File_3
....
One possible approach is to call the function yyparse() within the YACC file each time I read a line such as
include File_n
but I understand this approach is not the good one, according to my lack of experience and poor knowledge in LEX/YACC there would be executing one LEX instance against two YACC parsing functions which may results in weird problems, isn't it?.
So, I was wondering which others options do I have?
Thanks!