Compiler Designing project on SQL update statement parsing based on Lex and Yacc.
This parser simply checks the validity of the Update statement of SQL language.
example:
Enter a SQL update query:
SQL: update table
-> set name = "val"
-> where name IS NULL;
Query is Valid!This project is built using Flex, Yacc and GNUMake. Before you can start development you need to take care of a few prerequisites.
sudo apt install flex yacc
sudo apt install make #(optional)Note: You can get GnuMake for Windows OS from http://gnuwin32.sourceforge.net/packages/make.htm
You can simply clone the project using git as:
git clone https://github.com/yuvrajsab/CD-Project.gitor you can simply download ZIP and extract it.
You can build project by just running a command using GNUMake.
make buildOr Manually:
flex update.l
yacc update.y
gcc lex.yy.c y.tab.cYou can build & run project by simply running just one command using GNUMake.
makeOr Manually (after Build):
./a.out #(for linux/macos)
./a.exe #(for windows)We have some tests in tests.txt file to check the parser which strings it is accepting. You can also add your own string in tests.txt file.
Run test using GnuMake:
make testOr Manually (after Build):
./a.out TEST #(for linux/macos)
./a.exe TEST #(for windows)