This is our project for Programming Paradigms and Pragmatics course
The complete problem statement can be found here : https://drive.google.com/file/d/14WbU55wT20g_5vUm45CbeYqhrSaNCgnU/view?usp=drivesdk
- Shobhit Juglan
- Aryaman Gupta
flex BMM_Scanner.l
This will create a lex.yy.c file.
bison -d BMM_Parser.y
This will form BMM_Parser.tab.c and BMM_Parser.tab.h files.
gcc lex.yy.c BMM_Parser.tab.c
This will compile the C files together to give the executable file a.exe.
./a.exe
This will run the executable file. The program in input.txt will be checked for errors! If no errors are found, then the program just prints all the functions it found and exit the program.
- The ordering of the addresses is given correctly in the input file.
- The code is run for the purpose of detection for basic syntax errors and not semantic and logical errors.
- Incorrect Keyword
- Last line not at end
- End absent in code
- Presence of LowerCase letters
- Invalid Variable Name
- Declared Variable type not matching with assigned value
- Address not given
- Incorrect function/no function provided
- Syntax error in function call
- Variable Names: Single Upper-Case Letter (A – Z) followed by an optional single digit (0 – 9).E xamples: A, F, H, A0, Z9
- Data Types: Numeric – Integer (%,), Single Precision (!), Double Precision (#) & Strings ($)
- Type declaration uses special characters along with variable names as given above (with default being integer) Examples: P1# (double precision), N$ (string), A9 (integer), B1% (also integer), M! (single precision)