Tagged articles
5 articles
Page 1 of 1
Python Programming Learning Circle
Python Programming Learning Circle
Nov 29, 2023 · Fundamentals

Building a Simple Python Interpreter with PLY

This article guides readers through designing and implementing a basic Python interpreter that can evaluate arithmetic expressions by defining tokens, writing a lexer and parser with PLY, specifying BNF grammar, handling precedence, and assembling a runnable program that processes user input.

BNFPLYParser
0 likes · 9 min read
Building a Simple Python Interpreter with PLY
Tencent Cloud Developer
Tencent Cloud Developer
Oct 12, 2023 · Fundamentals

From 0 to 1: How to Design and Implement Your Own Scripting Language

The article walks readers through building a custom scripting language from scratch—explaining compilation basics, lexical scanning, parsing, bytecode generation, and virtual‑machine execution—using a sample language called eben to illustrate BNF syntax, variable scopes, control flow, functions, closures, object‑orientation, garbage collection, and the historical evolution of programming languages.

BNFCompilationGarbage Collection
0 likes · 46 min read
From 0 to 1: How to Design and Implement Your Own Scripting Language
MaGe Linux Operations
MaGe Linux Operations
Jan 3, 2022 · Backend Development

Build a Simple Arithmetic Interpreter in Python Using PLY

This article walks through creating a Python arithmetic interpreter with the PLY library, covering token definitions, lexer rules, BNF grammar, parser implementation, operator precedence, and a runnable REPL, providing complete code and explanations for each step.

BNFPLYPython
0 likes · 9 min read
Build a Simple Arithmetic Interpreter in Python Using PLY