Skip to content

Jk-bit/Compiler_Construction_Assignments

Repository files navigation

Assignment 1 (C program for counting number of lines in a file)

Description

	- Increments the counter when coming across the newline character '\n', 
	at the end of the file character '\0' is not counted.
	- This implementation is similar to the "wc -l" command in Linux.

How to execute

	- Execeute the prog executable by providing the filename as the argument(first argument) to the commandline .

Assignment 2 ( Brief discussion on Lex and Yacc)

Assignment 3 ( Scientific Calculator )

Description

	- A scientific calculator which is abled to do following calculations :
		- addition
		- subtraction
		- multiplication
		- division also division by zero operation
		- expression in parenthesis
		- can handle unary minus operator
		- can have single length smallcase variables	
		- supports real values
		- supports trignometric functions and inverse trignometric functions(sin, cos, tan)
	- Does take into consideration the priority of the operators.
	- Interpreted calculator like bc(ignore the fact of very long long numbers).

How to execute

	- If you make any changes in the source code, you can directly the "run.sh" 
		bash script, otherwise execute the "scientific_calculator" executable.

About

All assignments for Compiler Construction Course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages