This programs in this repository are tailored for exam purpose. In order to reduce the size of code and to reduce the complexity, error handling and other edge cases are not handled in these programs.
So if in any of the programs you find no output ( provided the input is correct and given in the correct format ), please try adding error handling and other edge cases as per your requirement.
Both LEX and YACC are tools used in compiler construction to generate lexical analyzers and parsers, respectively. So both files are required to run the program successfully.
To run YACC programs, follow these steps:
- yacc -d .y
- lex .l
- gcc y.tab.c lex.yy.c
- ./a.out
To run LEX programs, follow these steps:
- lex .l
- gcc lex.yy.c
- ./a.out
To run C programs, follow these steps:
- gcc .c
- ./a.out