Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1004 Bytes

README.md

File metadata and controls

30 lines (24 loc) · 1004 Bytes

CS3071 - Compiler Design

My solutions for the assignments.

Assignment 1 Even Numbers

(flex/lex) Count the number of even numbers inputted.

Assignment 2 Comments

(flex/lex) Remove comments (i.e. comments in code) from input.

Assignment 3 Plates

(flex/lex) Check the Irish registration plate and determine how old the car is.

Assignment 4 Roman Numerals

Flex/Bison (or lex/yacc) Calculates the inputted roman numerals. First version is lazy work but passed all tests. Will change hard coded syntax error detection when I have time to something more elegant.

Assignment 5 Roman Numerals

Flex/Bison (or lex/yacc) Calculates the inputted roman numerals and converts to integers. Looks at the operand, and performs required calculation. Then a function is called to convert the integers back to roman numerals.

Assignment 6 Calculator with Variables

Flex/Bison (or lex/yacc) Calculator which can assign variables and does functions such as plus minus divide and multiply.