Tagged articles
8 articles
Page 1 of 1
21CTO
21CTO
Jun 21, 2025 · Fundamentals

How to Build a Toy BASIC‑to‑Go Compiler in a Weekend

An experienced programmer shares a weekend project that builds a simplified BASIC variant, toybasic, and a three‑stage compiler written in Go—using Nex for lexical analysis, goyacc for parsing, and custom code generation—to translate BASIC programs into Go code, complete with examples and source links.

BASICParsercompiler
0 likes · 9 min read
How to Build a Toy BASIC‑to‑Go Compiler in a Weekend
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
JD Tech Talk
JD Tech Talk
Dec 16, 2020 · Databases

Understanding SQL Parser and Its Implementation in Apache ShardingSphere

This article explains the fundamentals of SQL parsing, covering lexer and parser mechanisms, context‑free grammar concepts, LL(1) and LR(1) parsing techniques, and demonstrates how Apache ShardingSphere implements a flexible, multi‑dialect SQL parser with features such as formatting, parameterization, and extensibility.

ASTParserSQL
0 likes · 11 min read
Understanding SQL Parser and Its Implementation in Apache ShardingSphere
WecTeam
WecTeam
Oct 29, 2019 · Fundamentals

How to Build a Custom Arithmetic Parser with AST and Vector Extensions in JavaScript

This tutorial walks through constructing a JavaScript arithmetic parser using a finite‑state lexer, a stack‑based parser that builds an abstract syntax tree (AST), and an evaluator that supports numbers, operators, parentheses, vectors, and custom symbols like @rot and @dot, complete with visual demos.

ASTJavaScriptParser
0 likes · 23 min read
How to Build a Custom Arithmetic Parser with AST and Vector Extensions in JavaScript