An Overview of flex and bison

BNF Grammer Basics Context-free grammars are often described using Backus-Naur Form (BNF). For example: expression : expression '+' expression | expression '-' expression | NUMBER ; This defines a rule for expression with three alternatives (productions). Each production has a leeft-hand side (LHS) and a right ...

Posted on Sat, 12 Sep 2026 16:23:55 +0000 by alfonsomr

Building a Lexical Analyzer in C# for a Custom Programming Language

Lexical Analysis Fundamentals Lexical analysis serves as the initial processing phase in compilers and interpreters, transforming source code strings into structured tokens. These tokens provide the foundation for subsequent parsing and execution phases. The lexical analyzer performs several critical functions: Scanning source text character b ...

Posted on Thu, 16 Jul 2026 17:17:34 +0000 by Saruman

PostgreSQL's Parser Implementation with Flex and Bison

Understanding PostgreSQL's Parser Architecture When examining PostgreSQL's source code, one might notice that the conventional Bison parser function yyparse is replaced by base\_yyparse(). This modification is part of PostgreSQL's customized implementation of Flex and Bison for its SQL parsing needs. The PostgreSQL parser configuration in gram. ...

Posted on Tue, 23 Jun 2026 16:50:25 +0000 by jstarkweather

Lexical Analysis Implementation in C Language

char prog[200], token[20]; char ch; int syn, p, m = 0, n, row, sum = 0; const char* kwList[10] = {"if","int","for","while","do","return","break","continue","using","namesapce"}; const char* idList[8] = {"main","a","b&quot ...

Posted on Mon, 15 Jun 2026 17:22:14 +0000 by pacome