Posts

Showing posts with the label thoth

Day 1 - Building the Lexer for Our New Programming Language

Image
   Day 1 - Building the Lexer for Our New Programming Language Welcome to Day 1 of our journey in creating a new programming language! Today, we’re diving into the foundational step of building the lexer, which is a crucial component in interpreting our code. Let’s explore the details of what we accomplished, the keywords we chose, and the rationale behind them. What We Achieved Today 1. Lexer Implementation: We successfully implemented the lexer for our new programming language. The lexer, or lexical analyzer, is responsible for breaking down source code into tokens that the parser can understand. This process is essential for interpreting and compiling code. File Created: lexer.py Main Functionality: Tokenization of the source code into identifiable units like keywords, identifiers, operators, and numbers. Token Types: We defined various token types, including NUMBER , IDENTIFIER , INK (our variable keyword), and more. 2. Keywords Chosen: For variable declarations, we...

Building Thoth: Crafting a New Programming Language - Part 1

Image
  Welcome to the inaugural post of our series on building Thoth , a new programming language tailored for efficient data analysis. In this first installment, we’ll delve into the critical initial steps: defining the language’s purpose, selecting the programming paradigm, and designing its syntax. These foundational steps are pivotal in shaping Thoth and ensuring it meets our goals effectively. 1. Defining the Language Purpose Defining the purpose of a programming language is akin to setting its mission statement. It provides direction and clarity on what the language aims to achieve and how it differs from existing languages. For Thoth , our objective is to create a language that excels in data manipulation and analysis, bridging the gap between existing general-purpose languages and specialized data tools. Core Objectives: Enhanced Data Analysis: Thoth is designed to simplify complex data analysis tasks. It will provide built-in functions and syntax optimized for data operatio...