A minicompiler to compile the switch statement in JavaScript
Use the Advanced Package Tool to install Flex and YACC
sudo apt-get update
sudo apt-get install flex
sudo apt-get install bison
flex -l flexfile.l
bison -ldv bison.y
gcc bison.tab.c lex.yy.c -lfl
Copy paste the switch statement on the terminal for syntax and semantic analysis. Errors are displayed accordingly. If no errors present, consider code snippet to have perfect switch statement syntax