Re_graph

Jul 20, 2023

Regular Expression Graphing Program

The re_graph.pl program graphs regular expressions. The guts of the regular expression engine is a simple state machine. The various states and operations in the regular expression parser can be displayed using a surprisingly simple diagram.

A few notes on what you are looking at

  • The nodes Start and Stop denote the beginning and end of the regular expression.
  • The solid squares denote atoms. Lines indicate the next state. When a line splits, the state machine will take the top line first. If it’s path is blocked it will backup and take the next lower line. This is repeated until it finds a path to the end or all paths are exhausted.
  • Brown boxes indicate a grouping operation, i.e. .
  • Green boxes indicate a zero with test. The state machine will perform the test inside the box before moving ahead.


Checkout these related ports:
  • Zxing-cpp - ZXing C++ Library for QR code recognition
  • Zu-hunspell - Zulu hunspell dictionaries
  • Zu-aspell - Aspell Zulu dictionary
  • Zq - Easier and faster alternative to jq
  • Zorba - General purpose C++ XQuery processor
  • Zenxml - Simple C++ XML Processing
  • Zed - Command-line tool to manage and query Zed data lakes
  • Yq - Command-line YAML and XML processor, jq wrapper for YAML/XML documents
  • Yould - Pronounceable word generator
  • Yodl - Easy to use but powerful document formatting/preparation language
  • Yi-hunspell - Yiddish hunspell dictionaries
  • Yi-aspell - Aspell Yiddish dictionary
  • Yelp-xsl - DocBook XSLT stylesheets for yelp
  • Yelp-tools - Utilities to help manage documentation for Yelp and the web
  • Ydiff - Diff readability enhancer for color terminals