This repository contains the code for the course CS F363: Compiler Construction at BITS Pilani. The code is written in Python and the course is taught by Dr Ramprasad Joshi.
- Extetricks: A domain-specific language for configuring and scripting a Tetris-like game.
- gameEngine: A simple game engine that can be used to create text-based games. (provided by the instructor)
- parser: A parser developed during the course, Uses Bison to define the grammar rules of Extetricks and generates a parser to create an abstract syntax tree.
- scanner: A scanner developed during the course, Uses Flex to define the lexical analysis rules and generates a scanner that breaks down the input Extetricks code into tokens.
- Makefile: A makefile to build the project, test it on sample inputs.
- README.md: This file.
- Clone the repository.
- Run
make clean
to remove any previous builds. - Run
make build
to build the project. - Run
make test
to test the project on sample inputs. - Run
make run
to run the project.
![]() |
![]() |
-
New Game: Start a fresh game session.
-
Pause: Temporarily halt the current game.
-
Save State: Save the current game state to continue later.
-
Exit/Quit: Close the game application.
-
About: View information about the game and its development.
-
Score Display: The player's score is displayed as "Number of lines cleared = [Score]."
-
Game Over: The game ends when no more moves are possible, and a "Game Over" message is displayed.
The code for the game engine is provided by the instructor. The code for the parser and scanner is developed in discussion with the following students:
- Shreyas V (2020B2A71350G)
- Shah Rahil Kirankumar (2020B2A71677G)
- Pranav Srikanth (2020B5A71865G)
- Nandish Chokshi (2020B1A72031G)
- Anish Sreenivas (2020B3A71464G)