Long time no send. Anyway, for those of you who have experience building compilers...
I am currently working on a project which parses a "user" file, written in a high level language of my own design, which references "functions" in a different "developer/engineer" file, written in a slightly lower level language of my own design. e.g.
example.mrc (User Code)
******************************
_import_(motor.dev)
START
move(10, Forward, Full)
END motor.dev (Developer/Engineer Code)
*******************************************
#Comment
%a = %up * %down
move(distance[0,16]......
{
code.....
}Obviously, both of these files use a different syntax/grammar which I have fully defined in BNF. What I what to do is build a compiler that, when instructed to compiler "example.mrc", will also be able to compile the "motor.dev" file.
Is this possible? Can I call a yyparse() for the user file and then a yy2parse() for the other file? If so, how?
Any help is greatly appreciated,
Daniel
