Skip to content

💡 Comparative programming language experiments analyzing core features like Boolean logic, iteration, subprogram design, and lexical analysis through C, Go, Python, JavaScript, Kotlin, PHP, Rust, and Lex.

Notifications You must be signed in to change notification settings

ilke-kas/Programming-Languages-CS315

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Comparative Programming Language Projects

*By İlke Kaş — Bilkent University, CS315

This repository presents four distinct projects exploring core programming language concepts—including Boolean logic, iteration mechanisms, subprograms, and domain-specific language design—across multiple languages and paradigms.


1️⃣ Boolean_Operators

Purpose
To compare the behavior of Boolean logic operators across six programming languages: C, Go, Python, PHP, JavaScript, and Rust.

Functionalities

  • Evaluates logical operations (AND, OR, NOT)
  • Analyzes short-circuiting, operator precedence, and associativity
  • Tests side effects and truthy/falsy evaluations
  • Includes user-defined functions and output statements

Aims

  • Understand how logic evaluation differs between statically and dynamically typed languages
  • Compare strict typing (e.g., Go) versus coercion-based logic (e.g., JavaScript, PHP)

Report
📄 Kas_ilke_report.pdf


2️⃣ Iteration_Statements

Purpose
To investigate how loop constructs and iteration patterns are implemented and behave across multiple languages.

Functionalities

  • Uses for, while, do-while, foreach, and enhanced loops (for-in)
  • Iterates over common data structures: arrays, strings, dictionaries, sets
  • Demonstrates both index-based and iterator-based traversal
  • Uses iter() and next() where applicable

Aims

  • Compare imperative loop syntax and semantics across languages
  • Understand built-in versus manual iterator models

Report
📄 Kas_Ilke.pdf


3️⃣ Kotlin_Subprograms

Purpose
To explore subprogram structure, parameter passing, and scope behavior in Kotlin.

Functionalities

  • Implements deeply nested functions to demonstrate static scoping
  • Tests default and keyword arguments
  • Demonstrates closures using lambdas
  • Explores both primitive and reference-type parameter behavior

Aims

  • Understand variable lifetime, shadowing, and scope chains
  • Learn how Kotlin supports higher-order functions and closures

Report
📄 kas_ilke_report.pdf


4️⃣ Adventure_Language_Design

Purpose
To design a domain-specific language (DSL) for adventure games and implement a lexical analyzer using Lex.

Functionalities

  • Custom language includes method blocks, variable declarations, conditionals, loops, and I/O
  • Sample adventure game scripts provided (exampleProgram1.txt, exampleProgram2.txt)
  • Lexical analyzer (codeAD.l) detects keywords, identifiers, numbers, and custom syntax
  • Runs on Lex/Yacc compatible compiler

Aims

  • Practice token definition and language syntax creation
  • Gain experience with compiler front-end development

Report
📄 CS315Report_Team19.pdf


About

💡 Comparative programming language experiments analyzing core features like Boolean logic, iteration, subprogram design, and lexical analysis through C, Go, Python, JavaScript, Kotlin, PHP, Rust, and Lex.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published