1 year ago
#348606
Shore
What is a normal process to transfer an language format?
Hi I would like to make a light weight language transformation stuff.
By "language transformation" it means transfer language into a unified form, to eliminate synthetic sugar or eliminate useless expressions. One of the example as follow in C:
// before ==================
int a[2][2];
a[0][0] = 1;
// after ===================
int a[4];
a[0] = 1;
What I'm thinking of is to use flex and bison to find target patterns to replace.
However I don't what is the normal way of doing this kind of things, thus I would like to ask and seeking advices.
Thanks a lot!!!!
compiler-construction
0 Answers
Your Answer