Tagged articles
Parser
37 articles · Page 1 of 1
This article walks through the complete lifecycle of a MySQL SELECT statement, detailing how the client, connector, optional query cache, parser, optimizer, and executor interact to transform SQL text into an execution plan and finally return results.
Database InternalsExecutorMySQL
0 likes · 13 min read


21CTOJun 21, 2025 · Fundamentals
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.
BASICCompilerParser
0 likes · 9 min read

An in‑depth examination of a long‑standing PHP bug where the expression 0x00+2 incorrectly evaluates to 4, tracing its origin to the switch from flex to re2c in the lexer of PHP 5.3, detailing affected versions, code behavior, and the eventual fix in PHP 5.3.11.
PHPParserhexadecimal
0 likes · 8 min read

This article explains how JavaScript parsers transform source code strings into abstract syntax trees through lexical analysis and syntax parsing, covering language types, V8’s execution flow, token generation, AST construction, and practical examples, while also linking to tools like AST Explorer for further exploration.
ASTParserSyntax Parsing
0 likes · 10 min read

This article walks through how MySQL processes a SELECT query, detailing the server and storage engine layers, the roles of the connector, query cache, parser, optimizer, and executor, and provides practical command‑line examples to illustrate each step.
ConnectorDatabase ArchitectureExecutor
0 likes · 11 min read

PHP‑Parser 5.0.0 introduces a host of new classes, methods, and parser improvements—including a PhpVersion class, PHP 8 support, enhanced pretty‑printing, and updated node handling—while also deprecating older APIs; the article provides a detailed changelog and a concise usage example for parsing PHP code.
ASTCode ParsingPHP
0 likes · 9 min read

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

This article explains the fundamentals of JSX, why JSX expressions must have a single root element, and provides a step‑by‑step guide with complete code to implement a minimal JSX parser that translates JSX syntax into plain JavaScript createElement calls.
JSXJavaScriptParser
0 likes · 13 min read

This article demonstrates how to replace tightly‑coupled if‑else or switch‑case parser selection with the Service Locator Pattern in a Spring Java application, enabling easy addition of new file‑type parsers without modifying client code and adhering to the open‑closed principle.
DecouplingDesign PatternJava
0 likes · 8 min read

This tutorial walks through extending a C‑based Lisp interpreter with string support, comment parsing, built‑in print and error commands, file loading capabilities, providing complete code examples and explanations for each feature in the interpreter.
C++Lisp interpreterParser
0 likes · 10 min read

This tutorial walks through extending a C‑based Lisp interpreter by adding conditional branching, comparison built‑ins, an if keyword, and registering all built‑in functions, while providing the complete source code and explanations for each component.
C++Lisp interpreterParser
0 likes · 37 min read

This tutorial walks through adding Q‑Expression support to a Lisp‑style interpreter written in C, covering syntax definition, parser updates, implementation of head, tail, join, list, and eval functions, macro‑based assertions, and a complete source listing with compilation instructions.
C++Lisp interpreterParser
0 likes · 25 min read


政采云技术Dec 6, 2022 · Fundamentals
This guide explains common business scenarios that require custom SQL parsing, walks through setting up Antlr4 in IntelliJ IDEA, configuring Maven dependencies, generating parser code, and provides Java examples for extracting table names from Spark SQL statements, including handling of prediction modes and execution results.
Antlr4BackendJava
0 likes · 11 min read

This article explains MySQL’s internal execution flow, covering the connector’s role, permission verification, caching, parsing, optimization, execution stages, processlist states, SQL execution order, and best practices for arranging WHERE‑clause conditions to improve query performance.
Execution ProcessMySQLOptimizer
0 likes · 15 min read

This article walks through the core concepts and implementation steps of a minimal JavaScript compiler, covering tokenization, parsing into an AST, traversing with a visitor, transforming the tree, and generating target code, while also explaining the visitor pattern and polyfills.
ASTCompilerJavaScript
0 likes · 17 min read

This article walks through creating a minimal JavaScript compiler—starting from tokenizing Lisp‑style input, building an abstract syntax tree, traversing and transforming it, and finally generating equivalent C‑style code, illustrating the core parse‑transform‑generate workflow used by tools like Babel.
ASTBabelCompiler
0 likes · 13 min read

This article explains the inner workings of the TypeScript compiler, detailing each stage—from scanning source code into tokens, parsing tokens into an AST, binding symbols, performing type checking, to emitting JavaScript and declaration files—while providing code examples and diagrams of the process.
ASTBinderCompiler
0 likes · 27 min read

This article explains how to design a lightweight rule engine in Go by first using JSON‑defined rules, then leveraging Go's token scanner and AST parser to evaluate boolean expressions such as header and cookie checks, and finally discusses extending the engine with custom primitives and GoYACC for more complex grammars.
ASTDSLGo
0 likes · 16 min read

This article explains how to create a simple arithmetic expression interpreter in Python by leveraging the PLY (Python Lex‑Yacc) library, covering token definition, lexer implementation, BNF grammar, parser rules, operator precedence, error handling, and a complete runnable example.
BNFPLYParser
0 likes · 9 min read

This article explains how to create personalized Markdown syntax using the Marked library, covering basic usage, the internal six‑step rendering process, lexical analysis with regex, and step‑by‑step implementation of custom block elements like an alcohol card and video embed.
Custom SyntaxMarkdownMarked
0 likes · 14 min read

This article walks through the design and implementation of a lightweight JSON parser in Java, covering the underlying lexical and syntax analysis, token definitions, core parsing algorithms, testing strategies, and a brief demonstration of JSON beautification, providing developers with a clear understanding of JSON processing fundamentals.
JSONJavaParser
0 likes · 18 min read

This article walks through the complete process of designing a simple domain‑specific expression language, defining its grammar, generating a lexer and parser with ANTLR, implementing an AST visitor in Java, and integrating the engine into a Java project.
ANTLRCompilerDSL
0 likes · 16 min read

This article analyzes MySQL 8.0.25 source code, detailing the server architecture, parser reconstruction, prepare/rewrite stages, the optimizer transformations, and the new hypergraph optimizer, while also comparing these mechanisms with PostgreSQL’s processing pipeline.
Database InternalsHypergraphMySQL
0 likes · 12 min read

This article introduces MySQL 8.0's resource group feature, detailing its concepts, configuration commands, query hint usage, and the underlying implementation including new parser classes, platform APIs, runtime components, performance schema integration, and persistence mechanisms, with code examples throughout.
MySQLParserResource Group
0 likes · 17 min read

This article analyzes MySQL 8.0.25 source code, detailing the server‑layer architecture, parser reconstruction, query‑rewrite phases, transformation rules, and both the legacy and hypergraph optimizers, while also comparing key stages with PostgreSQL.
Database ArchitectureMySQLParser
0 likes · 13 min read

This article examines the trade‑offs between automatically generated and manually crafted SQL parsers, detailing lexical‑syntax analysis techniques, performance challenges in OLAP workloads, and the authors’ custom parser design that achieves up to 30‑50× speed gains in complex queries and bulk inserts.
ParserSQLdatabase
0 likes · 17 min read


phodalJun 7, 2021 · Fundamentals
This article presents a comprehensive guide to designing external domain‑specific languages, covering presentation modes, terminology extraction, relationship and syntax design, data‑structure definition, parser implementation with generator tools, testing strategies, and evolution techniques, illustrated with real‑world examples and code snippets.
CompilerDSLParser
0 likes · 10 min read

This tutorial explains how to use PEG.js to create a JavaScript parser that converts JCE protocol definitions into Node.js syntax, covering PEG.js basics, grammar rules, recursion, struct and interface parsing, and assembling a complete JCE parser.
ASTJCENode.js
0 likes · 9 min read


ZhiKe AIMar 11, 2021 · Backend Development
This article provides a comprehensive overview of Spring Expression Language (SpEL), detailing its supported expression types, case‑insensitive keywords, step‑by‑step usage flow, core interfaces, and concrete code examples for literals, arithmetic, relational, logical, ternary, Elvis, variable handling, and property navigation.
EvaluationContextExpression LanguageJava
0 likes · 11 min read

This article explains in detail how ClickHouse processes a user‑submitted SQL query, covering the server’s request handling, parsing, query rewrite, optimization, interpreter execution, and result transmission, while illustrating key source code snippets and architectural components.
BackendClickHouseDatabase Internals
0 likes · 18 min read

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

This article explains the fundamentals of SQL parsing, describing the roles of lexical analysis, syntax analysis, and visitors, and demonstrates the process with a concrete SELECT statement example, while also mentioning popular parsing libraries such as Druid and ANTLR.
ANTLRDruidParser
0 likes · 4 min read

This article walks through creating a JSON parser in JavaScript, covering the JSON grammar, railroad and BNF diagrams, step‑by‑step implementation of object, array and value parsing, robust error handling, and suggestions for meaningful error messages.
JSONJavaScriptParser
0 likes · 13 min read

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.
ASTCompilerJavaScript
0 likes · 23 min read

This article explains the fundamentals of JSON, its object and array structures, maps JSON types to Java equivalents, and provides a complete Java implementation of a JSON parser including token definitions, lexical analysis, and object/array construction with detailed code examples.
JSONJavaParser
0 likes · 14 min read

This article explains the fundamentals of SQL parsing, compares popular parsers, details how ANTLR defines lexical and syntactic rules for SQL, and shows how Sharding‑Sphere leverages custom and ANTLR‑based parsers to extract sharding‑relevant context while balancing performance and compatibility.
ANTLRParserlexer
0 likes · 16 min read

Understanding JavaScript parsers—such as Esprima, Acorn, and Babylon—reveals how they generate ASTs, validate syntax, prioritize operators, and more, while distinguishing eager from lazy parsing modes in V8, enabling developers to optimize code performance through tools like optimize-js.
ASTFrontend DevelopmentParser
0 likes · 4 min read
