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 bisonflex -l flexfile.l
bison -ldv bison.y
gcc bison.tab.c lex.yy.c -lflCopy 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