Automating the process of finding leading/trailing set from a simple hardcoded While loop CFG in C and generating an operator precedence table from the sets. This is a very basic implementation in C.
S->w(C)bAe
O->p
C->iOn
C->iOi
A->L;A
A->f
L->i=E
E->T*F
T->i
F->n
Sis the start statewrepresentswhilekeywordprepresents conditional operators like==,<=,=>,!=brepresentsbeginArepresents the statementserepresents the end of the while loopCrepresents a conditionirepresents an identifiernrepresents a constantLrepresents an assignmentErepresents an operation of an identifier and a constant