https://github.com/beansamuel/mini_lisp_intepreter

Compiler Final Project

https://github.com/beansamuel/mini_lisp_intepreter

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.5%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Compiler Final Project

Basic Info
  • Host: GitHub
  • Owner: BeanSamuel
  • Language: Python
  • Default Branch: main
  • Size: 950 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme

README.md

MiniLISPIntepreter

Introduction

This Python script processes .lsp files, allowing users to execute specified files or process all .lsp files in a designated directory. The tool is designed to parse and evaluate expressions from Lisp files.

Features

  • Custom File Execution: Specify .lsp files to process via command-line arguments.
  • Default Directory Processing: Automatically processes all .lsp files in a specified directory if no files are provided.
  • Error Handling: Validates file existence and provides error messages to prevent crashes.

Usage

Run the Script

Ensure Python 3 is installed and save the script as main.py.

Specify Files

Run the following command to process one or more .lsp files: bash python3 main.py file1.lsp file2.lsp

Default Directory

If no files are specified, the script processes all .lsp files in the public_test_data directory: bash python3 main.py

File Structure

  • main.py: The main script for reading files, parsing content, and execution.
  • public_test_data: Directory containing public test .lsp files.

Developer Notes

Key Classes and Functions

  1. EnvironmentStack

    • Simulates the execution environment stack.
    • Extend this class as needed for additional functionality.
  2. parse_parenthesized_expression(content)

    • Parses parenthesized expressions in the content.
    • Replace with the actual implementation.

Dependencies

  • No external dependencies. The script runs with Python's standard library.

Example Output

When processing files, the output will include the following format: ==================== Processing File: file1.lsp ==================== <Parsed and evaluated results> If an error occurs, an error message will be displayed.

Owner

  • Name: SamBean
  • Login: BeanSamuel
  • Kind: user

GitHub Events

Total
  • Watch event: 1
  • Push event: 4
  • Create event: 2
Last Year
  • Watch event: 1
  • Push event: 4
  • Create event: 2