Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

It consists of the project 1 and 2 which was given in the cs315 course.

Notifications You must be signed in to change notification settings

hacickn/cs315_programming_languages_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cs315_programming_languages_project

  • It consists of the project 1 and 2 which was given in the cs315 course. Project 2 is continuity of the project 1.

Project 1

Designing a language to create an adventure game.

Language Design

  • variable identifiers
  • assignment operator
  • expressions (arithmetic, relational, boolean, their combination)
  • precedence, associativity of the operators
  • loops
  • conditional statements
  • statements for input / output (to ask questions and read answers)
  • function definitions and function calls.
  • comments

Lexical Analysis

It is a lexical Analysis implementation for to preparing code to parser.

Example Programs

  • An adventure game where the goal is to escape from the monsters and find the treasures in a castle.
  • A map of a castle with 5 rooms, and specify the transitions between rooms.
  • The treasures and monsters into the rooms.
  • Some wealth and strength
  • Repeat the followings accordingly until the player is dead or quits the program
  • inform player about room contents and own status
  • move from one room to another considering walls and doors
  • pick up treasure and increase wealth
  • fight monster and reduce strength
  • eat food to have strength
  • use tools
  • buy food or tools
  • Inform the user about the final score: 2.wealth + 3.strength

Project 2

Revised and Augmented Language Design

  • variable identifiers
  • assignment operator
  • expressions (arithmetic, relational, boolean, their combination)
  • precedence, associativity of the operators
  • loops
  • conditional statements
  • statements for input / output (to ask questions and read answers)
  • function definitions and function calls.
  • comments

Implementing the Parser

It is a parser implementation which is continuity of the lexical analysis.

Example Program

Same with the project 1

NOTE

-Details can be found in the reports of the project 1 and project 2.

-My teammate was Muhammed Musab Oksas

About

It consists of the project 1 and 2 which was given in the cs315 course.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published