Tag

Lexer

0 views collected around this technical thread.

IT Services Circle
IT Services Circle
Jan 19, 2025 · Backend Development

Analysis of PHP Hexadecimal Addition Bug Caused by Lexer Change from Flex to re2c

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.

LexerPHPParser
0 likes · 8 min read
Analysis of PHP Hexadecimal Addition Bug Caused by Lexer Change from Flex to re2c
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.

BNFInterpreterLexer
0 likes · 9 min read
Building a Simple Python Interpreter with PLY
Python Programming Learning Circle
Python Programming Learning Circle
Nov 26, 2021 · Fundamentals

Building an Arithmetic Interpreter in Python Using PLY

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.

BNFInterpreterLexer
0 likes · 9 min read
Building an Arithmetic Interpreter in Python Using 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.

ASTGrammarLexer
0 likes · 11 min read
Understanding SQL Parser and Its Implementation in Apache ShardingSphere
Aikesheng Open Source Community
Aikesheng Open Source Community
Apr 28, 2020 · Databases

Understanding SQL Parsing: Lexical Analysis, Syntax Analysis, and Practical Example

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.

ANTLRDruidLexer
0 likes · 4 min read
Understanding SQL Parsing: Lexical Analysis, Syntax Analysis, and Practical Example