Mike Tang Posted at: 2025-08-23 01:31:24

Pest Book Final Chapter: Implementing AWK Parser

This project is an Awk clone implementation based on the pest parser, designed to provide a complete project example demonstrating how to use the pest parser to parse and execute Awk scripts.

The project supports regular expression patterns, string and numeric variables, most POSIX operators and some built-in functions, but does not support user-defined functions to simplify variable scope management.

AWK is a pattern scanning and data extraction language that excels at processing structured text files. Our implementation will support:

  • Pattern-action programming model
  • Regular expression matching
  • Field and record processing
  • Built-in variables and functions
  • Arithmetic and string operations
  • Control flow structures

By the end of this tutorial, you will have a fully functional AWK interpreter capable of running the following program:

BEGIN { print "Processing employee data..." }
/Engineer/ { engineers++ }
$2 > 30 { print $1, "is over 30 years old" }
END { print "Found", engineers, "engineers" }

Read: https://pest.rs/book/examples/awk.html Code: https://github.com/pest-parser/book/tree/master/examples/awk

Rasterizeddb: High-Performance Database that Scans 5 Million Rows in 115ms

My custom database Rasterized DB, written from scratch in Rust, can scan 5 million rows (full table scan) in 115 milliseconds.

It has evolved from schema-less to schema-based, is compatible with PostgreSQL dialect, and plans to introduce various advanced features. The project is still in development and stability is not yet mature, so use with caution is recommended.

Reddit | Repository: https://github.com/milen-denev/rasterizeddb

XMLity: The Most Feature-Complete XML Parsing Library

XMLity is an XML serialization/deserialization library inspired by Serde, designed for complex XML structures, using trial-and-error parsing - powerful but slightly slower.

It addresses the shortcomings of other libraries (such as yaserde, quick-xml) in namespace and complex structure support.

Comparison with other tools:

  • serde-xml-rs: Lacks complete support for namespaces and other features.
  • yaserde: Lacks support for trial-and-error deserialization, cannot fully cover XML schemas.
  • quick-xml: Lacks namespace support.

Reddit | Repository: https://github.com/lukasfri/xmlity


From Daily Newsletter Team - Bitter Melon Kid

Comments

Write Comment

No Comment